Skip to main content

Error format

Errors return an HTTP status and a JSON body with a machine-readable code and a human-readable message:
Branch on code, not message: messages can be reworded, codes are stable. Some errors add a fields array naming the fields at fault:
Validation errors (a malformed or unknown field) use the code BAD_REQUEST, with message describing the first problem found:

Error codes

Rate limits

Each partner account can make 300 requests per minute to the customer endpoints. The limit is per account, not per IP address, so other partners never use up your budget. Over the limit, requests return 429 Too Many Requests until the minute rolls over. Your current limits are in your configuration under limits.

Retrying

  • On 401 INVALID_PARTNER_TOKEN, get a new token and retry once.
  • On 429 and 5xx, retry with exponential backoff. For invest, resend with the same Idempotency-Key.
  • Don’t retry other 4xx errors unchanged: they fail the same way again.