Error Handling
Error codes, troubleshooting, and idempotency
All API errors follow a consistent envelope with machine-readable error codes.
Error response format
Always log the request_id (also in the X-Request-Id header) — it’s required for support lookups.
Error codes
Idempotency
All POST endpoints accept an Idempotency-Key header for safe retries:
How it works:
- First request with a given key executes normally and caches the response
- Subsequent requests with the same key and same body return the cached response (no duplicate side effects)
- Same key with a different body returns
409 IDEMPOTENCY_KEY_REUSED - Keys expire after 24 hours
Idempotency keys are scoped per organization and per endpoint. The same key string can be used on different endpoints without collision.
Retry strategy
Request IDs
Every response includes a unique request_id in both the response body and the X-Request-Id header. When contacting support, always include this ID for fast diagnosis.