> For the complete documentation index, see [llms.txt](https://developer.leaderos.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.leaderos.net/support/tickets.md).

# Tickets

## Get tickets

<mark style="color:blue;">`GET`</mark> `https://yourwebsite.com/api/support/tickets`

{% tabs %}
{% tab title="200: OK " %}

```json
[
    {
        "id": "1",
        "accountID": "1",
        "categoryID": "3",
        "title": "I need help!",
        "statusID": "2",
        "readStatus": "1",
        "updateDate": "2022-09-15 10:54:46",
        "creationDate": "2022-09-15 10:51:02",
        "categoryName": "Other",
        "messages": [
            {
                "id": "3",
                "accountID": "1",
                "message": "please **help** me!",
                "writeLocation": "1",
                "creationDate": "2022-09-15 10:53:46"
            },
            {
                "id": "4",
                "accountID": "3",
                "message": "<p><strong>How can I help you?</strong></p>",
                "writeLocation": "2",
                "creationDate": "2022-09-15 10:54:46"
            }
        ]
    },
    {
        "id": "2",
        "accountID": "1",
        "categoryID": "1",
        "title": "Cheater report!",
        "statusID": "2",
        "readStatus": "1",
        "updateDate": "2022-09-15 10:54:27",
        "creationDate": "2022-09-15 10:52:07",
        "categoryName": "Cheat",
        "messages": [
            {
                "id": "1",
                "accountID": "1",
                "message": "please **help** me!",
                "writeLocation": "1",
                "creationDate": "2022-09-15 10:53:27"
            },
            {
                "id": "2",
                "accountID": "3",
                "message": "<p>thanks banned!</p>",
                "writeLocation": "2",
                "creationDate": "2022-09-15 10:54:27"
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

## Get a ticket

<mark style="color:blue;">`GET`</mark> `https://yourwebsite.com/api/support/tickets/<id>`

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "id": "6",
    "accountID": "1",
    "categoryID": "1",
    "title": "Deneme Başlık!2",
    "statusID": "1",
    "readStatus": "0",
    "updateDate": "2023-07-19 20:13:37",
    "creationDate": "2023-07-19 20:13:37",
    "category": {
        "id": "1",
        "name": "Cheat"
    },
    "messages": [
        {
            "id": "6",
            "accountID": "1",
            "message": "Merhaba deneme içerikkk2",
            "writeLocation": "1",
            "creationDate": "2023-07-19 20:13:37"
        }
    ]
}
```

{% endtab %}

{% tab title="404: Not Found Ticket not found" %}

```json
{
    "status": false,
    "error": "TICKET_NOT_FOUND",
    "message": "Ticket not found!"
}
```

{% endtab %}
{% endtabs %}

## Create ticket

<mark style="color:green;">`POST`</mark> `https://yourwebsite.com/api/support/tickets/<id>`

#### Request Body

| Name                                         | Type   | Description                                                                                                                                                      |
| -------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| accountID<mark style="color:red;">\*</mark>  | String |                                                                                                                                                                  |
| categoryID<mark style="color:red;">\*</mark> | String |                                                                                                                                                                  |
| title<mark style="color:red;">\*</mark>      | String |                                                                                                                                                                  |
| message<mark style="color:red;">\*</mark>    | String |                                                                                                                                                                  |
| statusID                                     | String | <p>Default: 1 (Open)</p><p><strong>1:</strong> Open</p><p><strong>2:</strong> Answered</p><p><strong>3:</strong> User-Reply</p><p><strong>4:</strong> Closed</p> |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "success": true,
    "data": {
        "id": "6"
    }
}
```

{% endtab %}
{% endtabs %}

## Close ticket

<mark style="color:green;">`POST`</mark> `https://yourwebsite.com/api/support/tickets/<id>/close`

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "success": true,
    "data": {
        "id": "6"
    }
}
```

{% endtab %}

{% tab title="404: Not Found Ticket not found" %}

```json
{
    "status": false,
    "error": "TICKET_NOT_FOUND",
    "message": "Ticket not found!"
}
```

{% 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://developer.leaderos.net/support/tickets.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.
