2xx means success, a 4xx means the request was rejected (and usually tells you how to fix it), and a 5xx means something went wrong on our side.
Error shape
Every error returns the same JSON envelope:message— a clear, actionable description.details— optional structured context (an object, array, or string), ornull.
Status codes
Writes and 403
A 403 on a write means one of two things.
The key is read only. Access is chosen when a key is created and can’t be changed afterwards. Create a key with read and write access in Settings → API Keys.
code in details so you can branch on them:
Reads keep working in every one of these cases, so a reporting integration is never taken down by a billing problem.
Handling errors
Check the status code first, then readerror.message. Retry only idempotent requests on 429 and 5xx, using exponential backoff. Never blindly retry 4xx responses other than 429 — the request needs to change first.
Every GET is safe to retry, and so is POST /leads: leads are deduplicated by the person they resolve to, so a retry returns the existing lead rather than creating a second one. See Writing data.