Docs Memory API

Errors

Errors use HTTP status codes and a consistent JSON body. Retry only what is safe to retry.

#Error format

Error body
{ "error": { "type": "invalid_request", "message": "text must not be empty", "field": "text", "requestId": "req_5Kc…" } }

#Status codes

StatusTypeMeaningRetry?
400invalid_requestMalformed JSON or invalid fieldNo — fix the request
401unauthenticatedMissing or invalid keyNo
402insufficient_creditsCredit balance is exhaustedAfter buying credits or the monthly reset
403forbiddenKey type or plan does not allow this (e.g. webhooks on Pay as you go)No
404not_foundUnknown record, job, identity or audienceNo
409conflictSame idempotency key with a different bodyNo — use a new key
413payload_too_largeRecord or batch exceeds the project’s size limitSplit and resend
429rate_limitedOver requests per minuteYes, after Retry-After
500/503internal / unavailableServer-side problemYes, with backoff and the same idempotency key

#Retrying safely

  • Use exponential backoff with jitter, starting around 500 ms, capped at about 30 s.
  • Always reuse the idempotency key when retrying a write.
  • Log requestId; include it when you contact support.