Developer docsErrors
Basics

Errors

Every error is a status code and one sentence in an error field. What each code means, and what to do.

Updated View as Markdown

When something goes wrong, the API answers with a status code and a JSON body with one field, error, that says what happened in a sentence:

{ "error": "This key doesn't have the \"write\" scope." }

The sentence is written for people, so you can show it or log it. Don't match on its exact words; they may get clearer. Use the status code.

Status codes

CodeWhat happenedWhat to do
400Something in the request is missing or not allowed, or the body isn't valid JSONFix the request. The message names each field, like body: Too small
401No key, or the key is wrong or revokedCheck the Authorization: Bearer rk_… header
403The key doesn't have the scope this needsMake a key with that scope. See Keys and scopes
404No such conversation, or one the key can't seeCheck the id. Someone else's private inbox always answers 404
429More than 120 requests in a minute with this keyWait a few seconds, then try again. See Rate limits
500Something went wrong on our sideTry again shortly. If it keeps happening, write to hello@userookery.com

Bad input

A 400 for bad input lists every problem at once, separated by semicolons, each starting with the field:

{ "error": "status: Invalid option: expected one of \"open\"|\"waiting\"|\"closed\"" }

Each endpoint's fields, with their limits, are in the API reference.

Retrying

Retry a 429 or a 500, and a timeout or dropped connection, after a short wait. Before retrying a request that creates something, like a note or a reply, read Retries: a retry can make a second one.