Skip to main content

Errors

Every error has the same shape.

Error response
{  "error": {    "code": "VERSION_CONFLICT",    "message": "The link changed. Fetch it again before editing."  },  "requestId": "a4b804977e4b8dd8"}

Branch on error.code, not on message, which may change. Every response, including errors, has an X-Request-Id header with the same value as requestId.

StatusCodeMeaning and what to do
400INVALID_JSONThe body isn't valid UTF-8 JSON.
400INVALID_CURSORBad, expired or mismatched cursor. Start the list again.
400INVALID_PRECONDITIONIf-Match isn't an ETag. Send it exactly as received.
401INVALID_API_TOKENMissing, wrong, revoked or replaced token. Copy the current one from the API page.
403API_UNAVAILABLEThe API isn't enabled for your account.
403CREATOR_NOT_ELIGIBLEYour account can't publish right now, for example while it's under review. Check the dashboard or contact support.
403ORIGIN_NOT_ALLOWEDThe request came from a web page. Call the API from your server.
404LINK_NOT_FOUNDThe link doesn't exist or isn't yours.
409IDEMPOTENCY_CONFLICTThis key was used for a different request. Use a new key.
409LINK_NOT_EDITABLERevoked, under review, or destination temporarily locked. See Update a link.
409LEGACY_SHARED_CONTENT_UNSUPPORTEDContent shared with another link or widget. Edit it in the dashboard.
412VERSION_CONFLICTThe link changed. Read it again and resend.
413PAYLOAD_TOO_LARGEBody over 16 KiB.
415UNSUPPORTED_MEDIA_TYPESend Content-Type: application/json.
422INVALID_LINKA field is missing, invalid or unknown. Check the rules for each field.
422INVALID_IDEMPOTENCY_KEYKey must be 16 to 128 visible ASCII characters.
428PRECONDITION_REQUIREDSend If-Match with the link's ETag.
429RATE_LIMITEDToo many requests. Wait for Retry-After.
429DAILY_QUOTA_EXCEEDEDDaily creation limit reached. Wait for Retry-After (00:00 UTC).
503API_UNAVAILABLEThe API is temporarily turned off. Try again later.
503DEPENDENCY_UNAVAILABLETemporary problem on our side. Retry with backoff; for writes, reuse the same Idempotency-Key.