> For the complete documentation index, see [llms.txt](https://developers.neowit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.neowit.io/rest-api/error-codes.md).

# Error codes

## Common response body

Most API endpoints return a common response body when an errors occurs. These responses can contain useful hints while developing or debugging, but is not designed to be directly shown to the user.

```json
{
  "reason": "invalid space",
  "status": "bad request",
  "traceID": "123wedt",
  "validations": {
    "user.email": "required"
  }
}
```

<table><thead><tr><th width="163.33333333333331">Field</th><th width="122">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>reason</code></td><td><code>string</code></td><td>A summary of what when wrong.</td></tr><tr><td><code>status</code></td><td><code>string</code></td><td>Text version of the response code.</td></tr><tr><td><code>traceID</code></td><td><code>string</code></td><td>An id that may be supplied to support for internal debugging.</td></tr><tr><td><code>validations</code></td><td><code>object</code></td><td>Hints of fields that failed validating.</td></tr></tbody></table>

## 400 - Bad Request <a href="#id-400" id="id-400"></a>

This is most likely due to an invalid argument as a part of a path, query parameter, or request body. Please see the error message for more information.

## 401 - Unauthorized <a href="#id-401" id="id-401"></a>

The user or the Service Account can not be authenticated towards our API.

### Access Tokens

If you are using an Access Token received from our OAuth2 endpoint, please note that these are only valid for *one hour*. For uninterrupted operations using Access Tokens, make sure to get a new one before the previous one expires.

See our [Authentication guide](/rest-api/authentication.md) for more details.

## 403 - Forbidden <a href="#id-403" id="id-403"></a>

The user or service account does not have access to this resource.

## 404 - Not found <a href="#id-404" id="id-404"></a>

The requested resource could not be found. Make sure the URL is correct. Note that the resource may have been removed after it was discovered.

## 409 - Conflict <a href="#id-409" id="id-409"></a>

The resource you're trying to create already exists. This can happen for certain resources which have unique constraints (for example named tags).

## 500 - Internal server error <a href="#id-500" id="id-500"></a>

An internal error occurred in our services.

These may be intermittent, and in general we recommend re-trying with an exponential backoff with a minimum of 1-second delay. If your integration sends many requests our way, we also recommend adding jitter to this retry mechanism to stop thundering herds.

If these errors persist over a longer period, check our [Status page](https://neowit.statuspage.io/). If nothing is showing up there, get in touch with [Support](https://support.neowit.io/). Please include the `traceID` from the response body if this is present, as it can help support and our engineering team figure out what when wrong quicker.

## 503 - Service Unavailable <a href="#id-503" id="id-503"></a>

See [500 - Internal server error](#500)

## 504 - Gateway timeout <a href="#id-504" id="id-504"></a>

See [500 - Internal server error](#500)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.neowit.io/rest-api/error-codes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
