Skip to main content

API reference

Error codes

Reference for all API error codes and how to handle them.

HTTP status codes

CodeMeaning
200Success
202Accepted - Batch or file job queued
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
402Payment Required - Out of credits, or plan renewal needed
403Forbidden - Insufficient permissions
404Not Found - Endpoint doesn't exist
413Payload Too Large - Request body exceeds the limit
429Too Many Requests - Rate limited
500Server Error - Try again later
503Service Unavailable - Retry with backoff
504Gateway Timeout - Upstream verification timed out

Error response format

Errors use the same envelope as successful responses, with success: false and the detail under error. Branch on error.code rather than matching error.message, which is free text. Quote error.request_id when contacting support.

{
  "success": false,
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid email format",
    "request_id": "89eac422-6b08-4d18-986b-ab3e1ed3aa57"
  }
}

Common error codes

HTTPerror.codeSolution
400BAD_REQUESTCheck the request body and email format
401UNAUTHORIZEDSend a valid key in X-API-Key
401API_KEY_SUSPENDED / API_KEY_REVOKEDIssue a new key in the dashboard
402INSUFFICIENT_CREDITSAdd more credits
402PAYMENT_REQUIREDUpgrade or renew your plan
403FORBIDDENAccess denied for a reason the codes below do not cover
403INSUFFICIENT_SCOPEThe key is valid but not scoped for this route — issue one that is (an app connected by signing in: connect it again asking for the scope as well as the ones it already has — unless the message says a connected app can never be given it; then use an API key with every scope the message names, or have the account owner act in the dashboard)
403PLAN_UPGRADE_REQUIREDYour plan does not include this feature — no key of any scope reaches it
403PLAN_LIMIT_EXCEEDEDYou are at your plan’s limit for this feature — delete one or upgrade
404NOT_FOUNDCheck the path and any resource id
413PAYLOAD_TOO_LARGEReduce the payload, or use the File Upload API
429RATE_LIMITEDBack off using Retry-After
500INTERNAL_ERRORRetry; contact support with the request id
503SERVICE_UNAVAILABLERetry with exponential backoff
504GATEWAY_TIMEOUTUpstream verification timed out; retry

Something wrong or missing here?

Tell us what to fix. Your email goes to the support team with this article's title already filled in.

Send feedback

Still need help?

Email support@kawaa.com. If your question is about a bulk job, include its job ID from the dashboard.

Contact support