Errors
ClinikAPI uses standard HTTP status codes and returns structured error responses.Error Response Format
HTTP Status Codes
Error Codes
Method Override Is Not Supported
Send the HTTP method you mean. Requests carryingX-HTTP-Method-Override,
X-HTTP-Method or X-Method-Override are rejected with 400 and
METHOD_OVERRIDE_REJECTED, whatever the value.
A request whose real method disagrees with the one being executed breaks two
guarantees this API depends on: that a GET never modifies data, and that the
audit log records the operation that actually happened. The SDK never sends
these headers.
SDK Error Handling
The SDK throws typed errors that you can catch:Automatic Retries
The SDK automatically retries on5xx errors and 429 (rate limit) responses with jittered exponential backoff:
- Default: 2 retries
- Backoff: random jitter up to
min(1000 * 2^attempt, 10000)ms - Configurable via
retriesoption:
Rate Limits
The rate limit is a per-minute ceiling on how fast you can call the API. The window is 60 seconds and rolling — exhaust it and the next minute starts fresh.
It applies to all traffic, test and live alike, and is shared across every
key in the organization. Exceeding it returns
429 with code RATE_LIMITED.
The current state comes back on every response:
The rate limit and the monthly quota are different limits that both return
429. The rate limit is about speed (per minute); the quota below is about
volume (per month). Check the error code to tell them apart:
RATE_LIMITED versus MONTHLY_QUOTA_EXCEEDED.meta:
Monthly Quotas & Overage
Separate from the per-minute rate limit, every organization has one shared monthly request pool — all API keys and all sub-organizations draw from the same quota. On paid plans only live requests are billable; test traffic is metered but free. On the Sandbox plan every request counts. The pool resets on the 1st of each month (UTC).The sandbox pool
Test traffic is free, but not unlimited. Every paid plan gets a separate monthly sandbox allowance equal to its live allowance — Pro includes 600,000 live requests and 600,000 sandbox requests. They are independent pools: spending one never touches the other.
Sandbox usage comes back on responses to a test key:
Exhausting it returns
429 with code SANDBOX_QUOTA_EXCEEDED. Overage
billing does not extend it — sandbox traffic is never billed, so there is
nothing to invoice; the pool simply resets on the 1st. On the Sandbox plan
there is no separate pool at all, because test requests are already what
consume the 1,000.
Quota state is returned on every authenticated response:
What happens at the limit depends on your overage billing setting (Dashboard → Billing):
- Overage billing off (default): requests past the quota are rejected with
429and codeMONTHLY_QUOTA_EXCEEDEDuntil the month resets. Your bill never exceeds your plan price. - Overage billing on (paid plans): traffic keeps flowing and extra requests are added to your next invoice at your plan’s overage rate ($0.003/request).