Skip to content
Menu

Search the site

Type to search guides, blog, API and product.

↑ ↓ to move · Enter to open · Esc to close

API Reference

API

Error Codes

Error handling reference for the TBit API

View as Markdown

Looking for why a WhatsApp message was not delivered? See WhatsApp delivery errors.

All errors follow a consistent JSON structure:

json
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Activity not found"
  }
}
StatusCodeDescription
400VALIDATION_ERRORInvalid request body or query parameters
401UNAUTHORIZEDMissing or invalid API key
404NOT_FOUNDResource not found or does not belong to your agent
405METHOD_NOT_ALLOWEDHTTP method not supported for this endpoint
409CONFLICTResource already exists (e.g., contact with this channel)
422SEND_FAILEDTemplate send failed (e.g., no messaging window)
429RATE_LIMITEDRate limit exceeded (100 requests/minute)
500INTERNAL_ERRORUnexpected server error

Every response includes rate limit information in headers:

HeaderDescription
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetTimestamp (ms) when the window resets

Best practices for handling API errors:

  • Always check the HTTP status code before parsing the response body
  • Implement exponential backoff for 429 (rate limit) errors
  • Log error codes and messages for debugging
  • Do not retry 400 or 401 errors: fix the request first