Documentation menu

API reference

Error codes reference

Every Wayline API error code with its HTTP status, what it means, whether to retry and how to fix it. Linked from each error's docs_url.

Updated Dec 1, 2026 View Markdown

All errors share one envelope with a stable code. The docs_url in each error links straight to the matching section below. Errors are never billed. For retry strategy, see Errors & retries.

json
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded.",
    "request_id": "req_01JD8Q4ZK7V3",
    "docs_url": "https://www.wayline.cloud/docs/errors#rate-limited"
  }
}

402 Payment Required: SPEND_LIMIT_REACHED

You set a monthly spend limit on the billing page and this calendar month (UTC) has reached it. The request is refused before any work is done and is not billed. Raise or remove the limit and retry; there is nothing else to change.

http
HTTP/1.1 402 Payment Required
Content-Type: application/json
X-Request-Id: req_4f1c9a2b7d3e4f50a1b2c3d4e5f60718

{
  "error": {
    "code": "SPEND_LIMIT_REACHED",
    "message": "Monthly spend limit reached.",
    "request_id": "req_4f1c9a2b7d3e4f50a1b2c3d4e5f60718",
    "docs_url": "https://www.wayline.cloud/docs/errors#spend-limit-reached"
  }
}

Other 402 codes use the same body: PAYMENT_REQUIRED (no card on file, or the account is suspended after unpaid invoices) and FREE_QUOTA_EXHAUSTED. Do not retry a 402 automatically.

429 Too Many Requests and Retry-After

RATE_LIMITED means your key sent more requests per second or per minute than its plan allows. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a 429 adds Retry-After with the whole number of seconds to wait.

http
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 1
X-RateLimit-Limit: 50
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1
X-Request-Id: req_7e6d5c4b3a2918076f5e4d3c2b1a0918

{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded.",
    "request_id": "req_7e6d5c4b3a2918076f5e4d3c2b1a0918",
    "docs_url": "https://www.wayline.cloud/docs/errors#rate-limited"
  }
}

Wait at least Retry-After seconds, then retry with exponential backoff and jitter. TEST_KEY_LIMIT_REACHED (429) is a test key's daily cap; it resets at midnight UTC, so Retry-After can be hours.

All error codes

INVALID_API_KEYHTTP 401Don’t retry

The key is missing, malformed, revoked or unknown.

Fix: Send the key as Authorization: Bearer <key>. Check it was copied completely and hasn’t been revoked in the dashboard.

KEY_EXPIREDHTTP 401Don’t retry

The key passed its expiration date.

Fix: Create a new key in the dashboard and rotate it into your secrets store.

KEY_NOT_ALLOWED_FROM_ORIGINHTTP 403Don’t retry

The request’s Origin is not in the key’s allowed origins.

Fix: Add the origin (e.g. https://app.yourcompany.com) to the key’s restrictions, or call from your backend.

KEY_NOT_ALLOWED_FROM_IPHTTP 403Don’t retry

The caller’s IP is outside the key’s allowed CIDR ranges.

Fix: Add your server’s egress IP range to the key’s restrictions.

SCOPE_NOT_ALLOWEDHTTP 403Don’t retry

The key is not allowed to call this endpoint.

Fix: Edit the key’s scopes in the dashboard or use a key with access to this endpoint.

ACCOUNT_DISABLEDHTTP 403Don’t retry

The account has been disabled.

Fix: Contact support.

PAYMENT_REQUIREDHTTP 402Don’t retry

The account is suspended for an unpaid balance.

Fix: Update your payment method on the billing page. Requests resume once the balance is paid.

FREE_QUOTA_EXHAUSTEDHTTP 402Don’t retry

Free units are used up and no payment method is on file.

Fix: Add a payment method on the billing page to continue with usage-based billing.

SPEND_LIMIT_REACHEDHTTP 402Don’t retry

This month’s spend limit has been reached.

Fix: Raise or remove the spend limit on the billing page, or wait for the next calendar month (UTC).

TEST_KEY_LIMIT_REACHEDHTTP 429Retry after Retry-After

The test key’s daily request cap is used up.

Fix: Wait until the cap resets (UTC midnight) or use a live key.

RATE_LIMITEDHTTP 429Retry after Retry-After

Too many requests for your plan’s rate limit.

Fix: Wait for the number of seconds in Retry-After, then retry with exponential backoff and jitter.

INVALID_REQUESTHTTP 400Don’t retry

A parameter is missing or invalid. The field property names it.

Fix: Fix the named field. See the endpoint reference for accepted values.

INVALID_COORDINATEHTTP 400Don’t retry

A coordinate could not be parsed or is out of range.

Fix: Send lat,lng in that order with latitude −90…90 and longitude −180…180.

OUT_OF_COVERAGEHTTP 400Don’t retry

A point is outside every enabled region.

Fix: Check the Coverage page. Swapped lat/lng is the most common cause.

PROFILE_UNAVAILABLEHTTP 400Don’t retry

The requested routing profile (for example motorcycle) is not offered in this region.

Fix: Use a profile listed under profiles for the region in GET /v1/coverage, or omit profile to use car.

GEOCODING_UNAVAILABLEHTTP 400Don’t retry

Geocoding (address search or reverse geocoding) is not offered in this region yet.

Fix: Check the Coverage page for regions with geocoding.

MAP_UNAVAILABLEHTTP 400Don’t retry

Static map images and map tiles are not offered in this region yet.

Fix: Check the Coverage page for regions with maps.

CROSS_REGION_REQUESTHTTP 400Don’t retry

Points fall in different regions; routes cannot span regions.

Fix: Split the request so all points of one request are in the same region.

TOO_MANY_ELEMENTSHTTP 400Don’t retry

The matrix, batch or waypoint count exceeds your plan limit.

Fix: Split the request into smaller tiles or contact sales for higher limits.

NO_ROUTEHTTP 404Don’t retry

No drivable route connects the points (e.g. an island without a ferry).

Fix: Check the points are reachable by car. Snap them with /v1/nearest first if they are off-road.

NO_SEGMENTHTTP 400Don’t retry

Could not find a matching road segment for the specified coordinate, bearing, or radius.

Fix: Check that coordinates are near a drivable road, or increase the snap radius.

UPSTREAM_UNAVAILABLEHTTP 503Retry with backoff

The routing engine for the region is temporarily unavailable.

Fix: Retry with exponential backoff and jitter. Check the status page if it persists.

PRICING_UNAVAILABLEHTTP 503Retry with backoff

No price is configured for this endpoint yet, so the request was not served or charged.

Fix: Retry later. Contact support if it persists.

INTERNAL_ERRORHTTP 500Retry with backoff

An unexpected error on our side.

Fix: Retry with backoff. If it persists, contact support with the request_id.

Google-compatible endpoint errors

/maps/api/distancematrix/json returns Google-style statuses (INVALID_REQUEST, MAX_ELEMENTS_EXCEEDED, OVER_QUERY_LIMIT, REQUEST_DENIED, UNKNOWN_ERROR) in the status field with an error_message, so existing Distance Matrix error handling keeps working. See the migration guide.