Skip to main content
Every API error is a problem document (application/problem+json, RFC 9457):
Read the code field in your code. The title and detail are for humans and can change; the code is stable. The type is a stable URI for the code.

Rate limits

Every /v1/** and /auth/** request is limited by client IP. GET /health and OPTIONS preflight requests are never counted. Over the limit you get 429 with code rate_limited and a Retry-After header, in seconds. Wait that many seconds, then retry. The phone routes have their own limits: 5 wrong codes close one challenge (too_many_attempts), and a phone number accepts 5 codes per hour (phone_rate_limited).

All codes

400 — the request is wrong

401 — you are not authenticated

403 — you are authenticated, but not allowed

This is the most useful code to handle. Read code to know which 403 you have. The CDN also sends the same value in the X-Segmnt-Error header, so a player can read the cause without parsing the body. See How playback protection works.

404 — not found

409 — the resource is in the wrong state

A 409 means the request is valid, but the resource is not ready for it.

410 — gone

422 — the request conflicts with an earlier one

429 — too many requests

500, 502, 503 — our side

A retry rule of thumb

  • Retry 429 (after Retry-After) and 5xx.
  • Do not retry 400, 401, 403, 404, 409, 410 or 422 as-is. Fix the request, or wait for the state to change.

Where to go next