Skip to content

Errors, limits and retries

These apply to every route in the API reference. Each call sends your key as Authorization: Bearer <key>, as in Use the API. GET /health is the one route that needs no key.

Every error has the same body:

{
"error": {
"code": "rate-limited",
"message": "The API key sent too many requests. Try again later"
}
}

Each code comes with one status. Act on code. Treat a code you don’t know by its status: new ones may be added.

Status Code What to do
400 invalid-request Fix the request. message names the fields that are wrong
401 unauthenticated Send a working key. It may be revoked or expired
403 forbidden Use a key with the access this call needs
404 not-found Check the path. A space other than personal answers this
409 conflict The source ID is used by other content, or its memory was forgotten past undoing. Use a new source ID
409 key-limit You or your business hold as many working keys as allowed. Revoke one first
409 forget-undone The Idempotency-Key belongs to a forget that was undone. Send a new key
409 user-erased The user was erased while the request was on its way. Nothing was done
409 space-refused The space can’t be served as it stands. Nothing was done. Don’t retry: contact support
409 space-full The space is full. Nothing was kept. Forgetting frees room only when its 30-day undo window closes
413 too-large Send a smaller body
415 unsupported-media-type Send Content-Type: application/json
429 rate-limited Wait the seconds in Retry-After
429 open-forgets The space holds 5,000 open forgets. Wait until frees_at, or undo one
500 internal Try again
503 unavailable Try again. With Retry-After, nothing was done: wait that long first

The models behind a space stop when it’s idle. The first write, recall or forget after a quiet spell can find them starting, and gets:

HTTP/1.1 503 Service Unavailable
Retry-After: 30
{ "error": { "code": "unavailable", "message": "This space is starting. Nothing was done: try again in 30 seconds" } }

Nothing was done. Send the same request again after 30 seconds. Starting takes about 46 seconds, so the first retry may get the same answer: retry until it succeeds.

  • A key may send 600 requests a minute, your keys together 2,000, and your business’s keys together 6,000. Past that, 429 rate-limited with Retry-After: 60.
  • A space makes at most 200 forgets an hour (UTC clock hours), counting forgets that matched nothing. Past that, a forget changes nothing and answers 429 rate-limited with Retry-After set to the seconds left in the hour, up to 3,600. Its body alone adds "limit": "forgets-per-hour", so you can tell it from the per-minute limits without reading the message.
  • A write’s body may be up to 512 KiB, a recall’s 64 KiB and a forget’s 16 KiB. Past that, 413 too-large.
  • Retry 500, 503 and 429 rate-limited, waiting Retry-After when it’s sent. Don’t wait longer than 60 seconds, except for a forget’s 429 rate-limited, which can ask you to wait up to an hour: queue that forget rather than block on it.
  • A write is safe to retry: the same source and content changes nothing.
  • A forget is safe to retry with an Idempotency-Key.
  • Don’t retry open-forgets until frees_at. It sends no Retry-After.