The Rocket.Chat REST API uses standard HTTP response codes to indicate whether an API request was successful or if an error occurred. Each response includes a status code and, in most cases, a message that provides additional context to help you troubleshoot.
The following table summarizes the most common response codes and their meanings:
Status codes | Description |
|---|---|
| The API request is successfully processed. |
| The request was successful, and a new resource has been created. |
| The request was successful, but there is no response body. Commonly returned after a successful |
| The request could not be processed due to missing or invalid parameters. Check the request format and required fields. |
| Authentication failed because the user ID or token is invalid or expired. Obtain a valid token using the authentication endpoint. |
| The authenticated user does not have permission to perform this action. Verify the assigned roles and permissions. |
| The requested resource could not be found. Check the endpoint URL or resource identifier. |
| The request could not be completed due to a conflict with the current resource state (for example, trying to create a duplicate record). |
| The client has sent too many requests in a given period. Wait or reduce the request rate before retrying. |
| The server encountered an unexpected condition. Try again later or check the server logs for more information. |
| The server is temporarily unavailable or undergoing maintenance. Retry the request after some time. |
Example error response:
{
"success": false,
"error": "The field 'username' is required",
"errorType": "error-invalid-params"
}This structure helps you identify whether a request failed due to invalid input, authentication issues, or temporary server conditions.