> For the complete documentation index, see [llms.txt](https://api-docs.everreal.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.everreal.co/helpers/errors.md).

# Errors

The API answers with standard HTTP status codes. For an error, the answer also holds JSON with the details. The table below lists the status codes.

{% hint style="info" %}
A GraphQL call almost always answers 200 OK. Read the `errors` list to find the details of an error. The table below lists the exceptions.
{% endhint %}

### HTTP StatusCode <a href="#errors-http-status-codes" id="errors-http-status-codes"></a>

| Code | Title                 | Description                                                                                                                                                                                                                                                                                                   |
| ---- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200  | OK                    | The request was successful. For GraphQL, also read the `errors` list.                                                                                                                                                                                                                                         |
| 400  | Bad request           | Bad request. An [EverReal Go](https://api-docs.everreal.co/key-concepts.md#everreal-go-and-paid-plans) account cannot use the reporting API: the answer is `400` with a JSON body (see below).                                                                                                                |
| 401  | Unauthorized          | No valid token, or the [partner](https://api-docs.everreal.co/key-concepts.md#partner) of the host is not the partner of the [current company](https://api-docs.everreal.co/key-concepts.md#default-company-and-current-company) of the [user](https://api-docs.everreal.co/key-concepts.md#user-and-member). |
| 403  | Forbidden             | Your API key or token is not allowed to do this.                                                                                                                                                                                                                                                              |
| 404  | Not found             | The resource does not exist. For GraphQL: a top-level `companyId` variable that is not one of the [companies](https://api-docs.everreal.co/key-concepts.md#company) of the user.                                                                                                                              |
| 405  | Method not allowed    | A `GET` request on the GraphQL endpoint with a data query. Use `POST`.                                                                                                                                                                                                                                        |
| 429  | Too Many Requests     | The rate limit was exceeded.                                                                                                                                                                                                                                                                                  |
| 50X  | Internal Server Error | An error occurred with our API.                                                                                                                                                                                                                                                                               |

### GraphQL errors

Each GraphQL error has `extensions.code` and, for most refusals, `extensions.errorLocale`. The locale key says what went wrong. Some errors also have `extensions.payload`. The payload is a **JSON string**, not an object. Parse it to read it.

```json
{
  "errors": [{
    "message": "companyId must be a valid uuid",
    "extensions": { "code": "BAD_USER_INPUT", "errorLocale": "reporting.api.filter.uuidInvalid" }
  }],
  "data": null
}
```

| code              | Meaning                                                                                                                            |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `UNAUTHENTICATED` | No valid token, or no company on the token.                                                                                        |
| `FORBIDDEN`       | The token does not have the [scope](https://api-docs.everreal.co/key-concepts.md#scope) for this operation.                        |
| `BAD_USER_INPUT`  | An argument is wrong. The [`errorLocale`](https://api-docs.everreal.co/key-concepts.md#errorlocale) and the message say which one. |
| `NOT_FOUND`       | The record does not exist in your company or partner. A record of another company gives the same answer.                           |
| `CONFLICT`        | The record changed during the call. Send the call again.                                                                           |
| `UPSTREAM_ERROR`  | A service behind the API did not answer. Try again.                                                                                |

### Common error keys

| errorLocale                             | When                                                                                                                                                                                             |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `reporting.api.filter.uuidInvalid`      | A filter id (`companyId`, `propertyId`, `propertyGroupId`, `ownerId` or `userId`) is not a [uuid](https://api-docs.everreal.co/key-concepts.md#uuid). Code `BAD_USER_INPUT`.                     |
| `companyScopedToken.notFoundForCompany` | The `companyId` argument names a company where you are not a member, or a company of another partner. Code `NOT_FOUND`. See [Access model](https://api-docs.everreal.co/master/access-model.md). |
| `reporting.api.goAccount.notAllowed`    | An EverReal Go account called the reporting API.                                                                                                                                                 |

The answer for an EverReal Go account is HTTP `400` with this body:

```json
{
  "errors": [{
    "message": "EverReal Go accounts cannot use the reporting API",
    "extensions": { "code": "FORBIDDEN", "errorLocale": "reporting.api.goAccount.notAllowed" }
  }]
}
```
