Overview
The Inbox API returns consistent error responses with actionable information. This guide covers all error codes, their causes, and recovery strategies.Error Response Format
All errors follow this structure:| Field | Description |
|---|---|
code | Programmatic identifier for the error type |
message | Human-readable description |
status | HTTP status code |
HTTP Status Codes
| Status | Meaning | Common Causes |
|---|---|---|
400 | Bad Request | Invalid parameters, malformed JSON |
401 | Unauthorized | Missing or invalid API token |
403 | Forbidden | Token lacks required permissions |
404 | Not Found | Resource doesn’t exist |
409 | Conflict | Duplicate resource or state conflict |
422 | Unprocessable Entity | Valid JSON but invalid data |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Server-side issue |
Authentication Errors
UNAUTHORIZED
Status: 401 When it occurs:- API token is missing from the request
- API token is invalid or malformed
- API token has expired or been revoked
- Verify the
Authorizationheader is present:Authorization: Bearer YOUR_TOKEN - Check for extra spaces or newlines in the token
- Generate a new token from your Inbox dashboard
FORBIDDEN
Status: 403 When it occurs:- Token is valid but lacks access to the resource
- Resource belongs to a different team
- Feature not available on your plan
- Verify the resource belongs to your team
- Check if your plan includes the requested feature
- Contact support if you believe this is an error
Resource Errors
THREAD_NOT_FOUND
Status: 404 When it occurs:- Thread ID doesn’t exist
- Thread was deleted
- Using platform ID instead of Inbox ID
- Verify you’re using the Inbox ID (
thread_xxx), not the platform ID - Use
/threads/lookupto find threads by prospect platform ID - Check if the thread was deleted
PROSPECT_NOT_FOUND
Status: 404 When it occurs:- Prospect ID doesn’t exist
- Platform ID doesn’t match any known prospect
- Prospect was never in a conversation with your team
- Verify the platform ID is correct (X user IDs are numeric strings)
- Prospects are created when they first message you or when you start a thread
- Use
/prospects/lookupto check if a prospect exists
ACCOUNT_LINK_NOT_FOUND
Status: 404 When it occurs:- Account link ID doesn’t exist
- Using platform ID instead of Inbox ID
- Account was disconnected
- List account links to get valid IDs:
GET /account-links - Use the Inbox ID (
acc_xxx), not the X user ID
TAG_NOT_FOUND
Status: 404 When it occurs:- Tag ID doesn’t exist
- Tag was deleted
- List tags to get valid IDs:
GET /tags - Create the tag if it doesn’t exist
STATUS_NOT_FOUND
Status: 404 When it occurs:- Status ID doesn’t exist
- Status was deleted
- List statuses to get valid IDs:
GET /statuses - Create the status if it doesn’t exist
MEMBER_NOT_FOUND
Status: 404 When it occurs:- Member ID doesn’t exist
- Member was removed from the team
- List members to get valid IDs:
GET /members
Validation Errors
VALIDATION_ERROR
Status: 400 When it occurs:- Required field is missing
- Field value is wrong type
- Value exceeds limits
- Check required fields for the endpoint
- Verify data types match the API spec
- Ensure string lengths are within limits
INVALID_CURSOR
Status: 400 When it occurs:- Cursor object is malformed
- Cursor is from a different query
- Cursor has expired
- Use cursors exactly as returned from the API
- Don’t modify cursor values
- Start over from page 1 if cursor errors persist
State Errors
DUPLICATE_THREAD
Status: 409 When it occurs:- Thread already exists for this prospect-account pair
DUPLICATE_TAG
Status: 409 When it occurs:- Tag with same name already exists
DUPLICATE_STATUS
Status: 409 When it occurs:- Status with same name already exists
Rate Limiting
RATE_LIMITED
Status: 429 When it occurs:- Too many requests in a short period
- Check the
Retry-Afterheader for wait time - Implement exponential backoff
- Reduce request frequency
Error Handling Pattern
A comprehensive error handler for all error types:Best Practices
Always check error codes, not just messages
Always check error codes, not just messages
Error messages may change, but codes are stable:
Validate before sending requests
Validate before sending requests
Catch validation errors locally before making API calls to improve user experience.
Log errors with context
Log errors with context
Include request details for debugging:
Handle 404s gracefully
Handle 404s gracefully
Missing resources are often recoverable - create them or suggest alternatives.