Skip to main content
The Varmo API uses standard HTTP status codes to indicate whether a request succeeded or failed. Codes in the 2xx range indicate success; codes in the 4xx range indicate a client error you can correct; codes in the 5xx range indicate an unexpected server-side problem. All error responses include a JSON body with error and message fields to help you identify and handle the issue programmatically.

Error response shape

Every error response body follows this structure:
Use the error field to branch your error-handling logic, and surface the message field in logs or internal alerts for easier debugging.

Error reference

Rate limit errors (429)

When your API key exceeds 1,000 requests per minute, the API returns a 429 Too Many Requests response. The response includes a Retry-After header with the number of seconds you must wait before making another request. Retrying immediately without respecting this header will continue to return 429 responses and will not advance your rate limit window.
Read the Retry-After header and wait the specified duration before retrying:

Troubleshooting common issues

A 401 Unauthorized error means the API cannot validate your key. Check the following:
  • Your Authorization header must use the exact format Bearer <API_KEY> — including the Bearer prefix with a single space between Bearer and your key.
  • There should be no leading or trailing whitespace around your key value.
  • The key must be active. If you recently rotated or revoked the key, update all clients with the new value.
Correct header format:
A newly registered dispatch is not immediately queryable. Dispatch records take up to 60 seconds to propagate across Varmo’s systems before they are visible via GET /v1/status/{id}. If you receive a 404 immediately after creating a dispatch, wait at least 60 seconds and try again before concluding that the record does not exist.
A confidence_level of Low means Varmo has limited historical delivery data for the card’s destination postal code. This results in a delivery window (min to max) that is wider than usual to account for the increased uncertainty. The prediction is still valid — you should display it to users alongside the recommended_message from ui_suggestion, which is already calibrated for lower-confidence scenarios.
Webhook delivery order is not guaranteed — network conditions can cause later events to arrive before earlier ones. Do not rely on arrival order to determine the current state of a dispatch. Instead, use the dispatch_date timestamp field in the response body to sort events chronologically and derive the latest status from the most recent timestamp.