Skip to main content
The Leadey API uses conventional HTTP status codes. A 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), or null.

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.
The workspace can’t write. If the trial has expired, an invoice is long overdue, or the subscription was cancelled, writes are blocked through the API just as they are in the Cockpit. These errors carry a 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 read error.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.