> For the complete documentation index, see [llms.txt](https://docs.coda.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coda.co/codapay/archived-tokenization-api-2.0/http-status-code-and-error-code.md).

# HTTP Status Code & Error Code

## <mark style="color:purple;">HTTP Status Code</mark>

| HTTP Code | Description                   |
| --------- | ----------------------------- |
| 200       | Everything worked as expected |
| 201       | Successfully Created          |

## <mark style="color:purple;">Error Code</mark>

<table><thead><tr><th width="148.33333333333331">HTTP Status</th><th width="128">Status Code</th><th>Description</th></tr></thead><tbody><tr><td>400</td><td>400</td><td>Server encountered a request that violated validation constraint or invalid Http Method or invalid validation and so on</td></tr><tr><td>401</td><td>401</td><td>The user is unauthorized</td></tr><tr><td>404</td><td>404</td><td>The requested resources do not exist</td></tr><tr><td>422</td><td>422</td><td>Server understands the request but there are issues with provided data</td></tr><tr><td>500</td><td>500</td><td>Unexpected error occurred on the server side</td></tr></tbody></table>

## <mark style="color:purple;">Sample Error Responses</mark>

{% tabs %}
{% tab title="Example 1" %}

```
{
    "errors": [
        {
            "message": "There was an issue with the data you provided. Please check again. pmt_s"
        }
    ],
    "status": 422,
    "title": "Unprocessable Entity"
}
```

{% endtab %}

{% tab title="Example 2" %}

```
{
    "errors": [
        {
            "message": "phone_number size must be between 12 and 16"
        },
        {
            "message": "phone_number must match \"\\+[0-9]+\""
        }
    ],
    "status": 400,
    "title": "Constraint Violation"
}
```

{% endtab %}

{% tab title="Example 3" %}

```
{
    "errors": [
        {
            "message": "Something went wrong on the server. Please try again later."
        }
    ],
    "status": 500,
    "title": "Internal Server Error"
}
```

{% endtab %}

{% tab title="Example 4" %}

```
{
    "message": "Unauthorized"
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.coda.co/codapay/archived-tokenization-api-2.0/http-status-code-and-error-code.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.
