> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spotdx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors & status codes

> The status codes and error format for Spot's API

Successful requests will return a `200 - OK` HTTP status code. If the request fails, the response will contain a key
`error` on the top level, and a 4XX or 5XX HTTP status code. Errors are returned as JSON objects in the following
format:

```json theme={null}
{
  "error": {
    "code": 400,
    "type": "bad_request",
    "details": [
      "first_name: Field is required"
    ]
  }
}
```

The error type will be one of `bad_request`, `not_found`, `unauthorized`, `forbidden`, `rate_limit_exceeded`, `server_error`.

A full list of returned status codes can be found below:

| Status Code | Description |
| - | - |
| `200 - OK` | Everything worked as expected. |
| `400 - Bad Request` | The request was unacceptable, often due to missing a required parameter. |
| `401 - Unauthorized` | No valid API key provided. |
| `403 - Forbidden` | The API key doesn't have permissions to perform the request. |
| `404 - Not Found` | The requested resource doesn't exist. |
| `429 - Too Many Requests` | Too many requests hit the API too quickly. We currently don't rate limit requests, but we may do in future. |
| `500, 502, 503, 504 - Server Errors` | Something went wrong on our end. This is rare. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.