Response codes
Comprehensive guide to HTTP status codes returned by the Messaging API, including success and error responses with detailed explanations.
The Messaging API returns conventional HTTP status codes to indicate the success or failure of API requests. Understanding these codes helps you handle responses appropriately and troubleshoot issues effectively.
Best practices
Status code categories
2xx status codes
Successful requests return status codes in the 2xx range, indicating that your request was received, understood, and processed successfully.
| Status Code | Description |
|---|---|
| 200 OK | The request was successful and the server has returned the requested data. |
| 201 Created | The resource has been successfully created or retrieved. This indicates successful POST requests. |
| 202 Accepted | The request was accepted for processing, but will be processed in the background asynchronously. |
| 204 No content | The resource was successfully updated or deleted, but no content is returned in the message body. |
4xx status codes
Failed requests return status codes in the 4xx range, indicating issues with the request itself, such as authentication problems or malformed data.
| Status Code | Description |
|---|---|
| 400 Bad Request | The request could not be processed due to incorrect or missing parameters or payload data. Check your request format. |
| 401 Unauthorized | The authentication credentials provided are not valid. Verify your API key or authentication token. |
| 403 Forbidden | The authenticated user does not have permission to view the requested resource. Check your access permissions. |
| 404 Not Found | The resource required does not exist. Verify the endpoint URL and resource ID. |
| 415 Unsupported Media Type | The content type provided is not supported by the server. Ensure you're using the correct Content-Type header. |
| 422 Unprocessable Entity | The request was well-formed but could not be processed due to semantic errors. |
💡 Note: Some API calls also return a JSON response body containing a relevant message object or document payload along with the status code.
Quick reference
2xx Success
Request processed successfully. Safe to proceed with response data.
4xx Client Error
Issue with your request. Check authentication, parameters, or permissions.
422 Special Case
User-friendly error messages that can be displayed directly to end users.
Updated 5 days ago
