Skip to main content

Error Response Format

All errors return a JSON body with at minimum a message field:
Some endpoints return additional context in a details array or an error string field depending on the API version.

HTTP Status Codes

Response body examples by status code

400 — Bad request (invalid parameter)
401 — Unauthorized (expired token)
403 — Forbidden (insufficient role)
404 — Not found
422 — Business validation failure
500 — Internal server error

Auth Errors (401 / 403)

401 — Token expired

Tokens have a finite lifetime (expires_in seconds). When one expires, every request returns 401.
Fix: Request a new token from /oauth/token and retry. In production, refresh proactively before expiry rather than waiting for a 401.

401 — Missing certificate

If the mTLS handshake fails because no client certificate is presented:
Fix: Ensure --cert and --key are included in every request. See Troubleshooting for certificate debugging steps.

403 — Insufficient role

A valid token from a user role that doesn’t have access to the endpoint. Fix: Confirm the API user has the COMPANY_OWNER or required role. Role requirements vary by endpoint.

Business Error Codes

Clara API returns business-specific error codes for validation failures. These appear in the code or message field of the response body.

Cards

Users

Transactions / Filtering

Digital Account (Brazil)


Rate Limits

Requests are rate-limited per client certificate across all endpoints. Limits are applied separately to read (GET) and write (POST, PATCH, DELETE) operations — write endpoints have lower limits. When you exceed the limit, the API returns 429 Too Many Requests:
Retry strategy: Use exponential backoff with jitter. A safe starting point:
For sustained high-volume use cases, contact your Clara integration team to discuss limit increases.

Retry Guidance


Support Contacts

If you encounter persistent errors not covered here: