Skip to main content

Error format

Every error has the same shape: "ok": false and an error object with a stable code, a human-readable message and, for some codes, details.
Branch on code, not on message: messages can change.

Error codes

Each endpoint in the API reference lists the statuses it can return.

Rate limits

Every answer to a valid key, errors included, carries the state of its window. When the key’s window and the organization’s differ, the headers describe the one with fewer requests left. Over a limit, the API answers 429 RATE_LIMITED with a Retry-After header: wait that many seconds before retrying. Answers without a valid key (401, and the 429 for too many failed authentications from your IP) carry Retry-After when limited, but no X-RateLimit-* headers.

Retrying writes

A write that fails with 500, times out or loses its connection may or may not have happened. Before retrying it, read the resource to see whether the change is there.

Idempotency-Key

The opportunity and record writes accept an Idempotency-Key header; the webhook writes do not. The API reference lists it on each write that accepts it.
  • The value is 1 to 255 printable ASCII characters, without spaces. Use a new value for each write, such as a UUID.
  • Keys are scoped to your API key. A retry with the same key and the same request (method, path, query and body) within 24 hours gets the answer stored for the first one, with the header Idempotent-Replayed: true, and does not run again. Answers below 500, errors included, are stored.
  • Answers of 500 and above are not stored: the key is released, and a retry runs the write again. Check the resource before retrying.
  • The same key with a different request answers 422 IDEMPOTENCY_KEY_REUSED.
  • While the first request is still running, a retry answers 409 IDEMPOTENCY_KEY_IN_PROGRESS. Wait and retry.

Dry runs

Writes that support it accept ?dryRun=true: the API checks and plans the write and answers as if it were done, with dryRun: true, but writes nothing and sends no webhook event. An Idempotency-Key is ignored on a dry run. The API reference shows which writes accept Idempotency-Key and dryRun.

Request size and text

  • Request bodies are limited to 1,048,576 bytes.
  • Text values are trimmed before they are checked, so a length limit applies to the trimmed value. Lengths count Unicode characters (code points).