Errors
In this guide, we will talk about what happens when something goes wrong while you work with the rooomSpaces API.
API leverages conventional HTTP response codes to indicate the success or failure of an API request. Generally, codes in the 2xx
range indicate success; codes in the 4xx
range indicate an error that failed given the information provided (e.g., a required parameter was missing, an invalid id was provided, etc.); codes in the 5xx
range indicate an internal error with rooomSpacess servers, which should be rare.
You can use this information to understand better what has gone wrong and how to fix it.
Status codes
These codes are consistent for all endpoints.
200 OK
By default if everything worked as expected a 200 status code will be returned.
201 Created
This is a non-committal response from rooomSpaces API. For example, a request to create a new space will return a 201 status code.
400 Bad Request
You're input/parameters are not valid or missing for the endpoint.
{
"error": {
"code": "bad_request",
"message": "Bad request"
}
}
401 Unauthorized
You're not authorized to use the endpoint. This usually happens due to missing an API key.
{
"error": {
"code": "unauthorized",
"message": "Not authorized"
}
}
402 Payment Required
Insufficient funds in the account associated with the provided API key.
404 Not found
The requested resource doesn't exist. For example, when you try to retrieve a task by its ID but provided an invalid ID, you will get a 404 status code.
429 Too Many Requests
You've exceeded the rate limit for the endpoint. You can find more information about rate limits here.