> For the complete documentation index, see [llms.txt](https://docs.lime-pay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lime-pay.com/api-documentation/support-tickets-api/api-codes.md).

# API Codes

When something goes wrong, the API returns a JSON object with a `code` and a `message` explaining what happened.

### Error Response Format

```json
{
    "code": "ERROR_CODE",
    "message": "Human-readable error description"
}
```

### Error Codes

| Code                     | HTTP Status | Description                                                                                                                           |
| ------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `UNAUTHORIZED`           | 401         | Session expired or invalid token. Log in again.                                                                                       |
| `FORBIDDEN`              | 403         | Your account does not have the required permission. Contact your account administrator.                                               |
| `NOT_FOUND`              | 404         | The ticket or resource does not exist. Double-check the ID.                                                                           |
| `DEPOSIT_NOT_REVIEWABLE` | 400         | The deposit cannot be flagged for review. It may not exist, belong to another merchant, or not enough time has passed since creation. |
| `INVALID_DOCUMENT`       | 400         | Invalid file or document type when uploading an attachment.                                                                           |

{% hint style="info" %}
If you receive a `401 UNAUTHORIZED` error, your session has expired. Simply call the Login Endpoint again to get a new BEARER\_TOKEN.
{% endhint %}

### Required Capabilities

Some endpoints require specific capabilities assigned to your user account. If you receive a `403 FORBIDDEN` error, contact your account administrator to verify your permissions.

| Capability             | Required for                      |
| ---------------------- | --------------------------------- |
| `TICKETS_CREATE`       | Creating draft tickets            |
| `TICKETS_CONFIRM`      | Confirming and submitting tickets |
| `DEPOSITS_FLAG_REVIEW` | Flagging deposits for review      |

{% hint style="warning" %}
If you are missing a capability, reach out to your account manager or contact our support team at `integration@lime-pay.com`.
{% endhint %}


---

# 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.lime-pay.com/api-documentation/support-tickets-api/api-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.
