Skip to content
Getting started

Errors

Collect uses conventional HTTP status codes and returns a consistent JSON error envelope so you can branch on a stable code rather than parsing messages.

Error shape#

Every error carries a stable code, a human-readable message, and an optional details object:

{
  "code": "validation_failed",
  "message": "Validation failed",
  "details": {
    "fieldErrors": { "email": "Invalid email" }
  }
}

Status codes#

CodeHTTPWhen
bad_request400Malformed request — e.g. invalid JSON or a bad query parameter.
unauthorized401Missing, invalid, or revoked API key.
forbidden403API not enabled for the workspace, or the key lacks a scope.
not_found404The resource doesn't exist in your workspace.
conflict409The request conflicts with existing state (e.g. a duplicate email).
validation_failed422The body failed validation. See details.fieldErrors.
idempotency_in_flight425An earlier request with the same Idempotency-Key is still running.
rate_limited429Too many requests. See details.retryAfterMs.
internal_error500Something went wrong on our side. Safe to retry.

A reused Idempotency-Key with a different body returns 409 idempotency_conflict — see the idempotency guide.