Skip to content
Last updated

Errors

Every call that fails answers in the same shape:

{
  "ok": false,
  "error": {
    "code": "insufficient_scope",
    "message": "This API key is missing the required 'lists:read' scope (read your Lists and their rows, and download them).",
    "scope": "lists:read"
  }
}
  • code is short and never changes. Write your code against it.
  • message is one plain sentence for a person to read. Its words may change.
  • Some codes add a field, such as scope, limit, resets_in_seconds or current.

Every answer has an X-Request-Id header, even a failed one. Tell us that id if you ask for help with a call.

Every code, and what to do

StatusCodeWhat it meansWhat to do
401missing_or_malformed_keyNo key was sent, or the header is not Authorization: Bearer <key>.Send the header with the word Bearer, a space, then the whole key.
401invalid_keyThe key is not known. It may be revoked, or copied wrong.Check you copied the whole key. Make a new key if it was revoked.
403insufficient_scopeThe key does not have the scope this call needs. error.scope names it.Make a key with that scope. A key's scopes cannot be changed after it is made.
403person_requiredThe call tried to decide a change the assistant proposed. Only a person in the app can.Open the link in the app and decide there.
404not_foundNothing with that id exists, or it belongs to another account.Check the id. Ids come from a list or read call.
409revision_conflictSomeone changed the work after you read it. error.current holds the newer version.Read error.current, make your change to it, and send it again.
409step_changedThat step changed after you read it.Read the plan again, then send the change.
409idempotency_conflictYou sent an Idempotency-Key you used before, with a different body.Use a new key for a new request. Reuse a key only to retry the same request.
409conversation_busyThe assistant is still answering in that conversation.Wait for that answer, then ask again.
409pausedAssistant work is paused for now. Nothing is wrong with your call.Try again later.
422invalid_queryA query parameter did not make sense, such as a bad date.Read the message, fix the parameter, and send it again.
422invalid_requestThe body did not make sense, or it has a field the route does not take.Read the message, fix the body, and send it again.
422thread_too_longThe conversation is too long to carry on.Start a new conversation.
429rate_limitedThe key made too many calls.Wait for the seconds in the Retry-After header, then try again.
429budget_exhaustedThe assistant has used all it may spend today.Try again after the Retry-After header's seconds.
503database_unavailableThe API cannot reach its data right now.Try again in a little while.
503model_unavailableThe assistant could not answer right now.Try again in a little while.

Retry safely

A call that changes work takes an Idempotency-Key header. Send the same key and the same body to retry, and the work is done once, not twice.

Retry a 429 or a 503 after a wait. Do not retry a 401, 403, 404 or 422 without a change; it fails the same way again.