Errors
The SmartSuite REST API follows HTTP status code semantics. 2xx codes signify success, 4xx mostly represent user error, 5xx generally correspond to a server error. Error responses return a JSON-encoded body, and its shape varies by error. The body provides specific error conditions and human-readable messages to identify the source of the error.
For example, a field-validation error is keyed by field name, with an array of messages:
Example: validation error
{
"page_size": ["\"5\" is not a valid choice."]
}
Other errors can return a single message, for example:
Example: generic error
{
"err": "Internal error"
}
Success code
| Code | Message | Description |
|---|---|---|
| 200 | OK | Request completed successfully. Delete endpoints also return 200, with the deleted object in the body. |
| 201 | Created | A new object was created. Returned by Create Solution, Create Table, Create Record, Bulk Add Records, Add Comment and Create View. |
User error codes
| Code | Message | Description |
|---|---|---|
| 400 | Bad Request | The request was invalid or could not be parsed. |
| 401 | Unauthorized | Provided credentials were invalid or do not have authorization to access the requested resource. |
| 403 | Forbidden | Accessing a protected resource with API credentials that don’t have access to that resource. |
| 404 | Not Found | Route or resource is not found. This error is returned when the request hits an undefined route, or if the resource doesn’t exist (e.g. has been deleted). |
| 422 | Invalid Request | The request data is invalid. |
| 429 | Too Many Requests | The rate limit was exceeded. See Rate Limits. |
Server error codes
| Code | Message | Description |
|---|---|---|
| 500 | Internal Server Error | The server encountered an unexpected condition. |
| 502 | Bad Gateway | SmartSuite’s servers are restarting or an unexpected outage is in progress. You should rarely encounter this error, and should retry requests if it is generated. |
| 503 | Service Unavailable | The server could not process your request in time. The server could be temporarily unavailable, or it could have timed out processing your request. You should retry the request with backoffs. |