Skip to main content
All error responses follow a consistent format.

Error Response Format

{
  "error": {
    "code": "USER_NOT_FOUND",
    "message": "User not found",
    "detail": null
  }
}
FieldTypeDescription
codestringMachine-readable error code for programmatic handling
messagestringHuman-readable error description
detailobject | nullAdditional context when available

HTTP Status Codes

StatusMeaning
400Bad Request. Invalid input or validation error.
401Unauthorized. Invalid or missing API key.
403Forbidden. Valid API key but insufficient permissions.
404Not Found. Resource does not exist.
409Conflict. Resource already exists or state conflict.
500Internal Server Error. Contact support if persistent.

Handling Errors

Use the code field for programmatic error handling:
if (response.error.code === 'USER_NOT_FOUND') {
  // Handle missing user
} else if (response.error.code === 'DUPLICATE_PHONE_NUMBER') {
  // Handle duplicate phone
}

Retries

For 5xx errors, retry with exponential backoff. For 4xx errors, fix the request before retrying.