> For the complete documentation index, see [llms.txt](https://docs.enclaive.cloud/enclaive-multi-cloud-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enclaive.cloud/enclaive-multi-cloud-platform/developers/api/client-api/support/ticket.md).

# Ticket

The "Ticket" section comprises endpoints for creating, deleting, and managing tickets for users. This section empowers users to initiate, remove, and efficiently handle support tickets, ensuring effective communication and issue resolution with the support team.

## Create ticket

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/api/tickets`

Create a ticket for the support team.

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

#### Request Body

| Name                                      | Type      | Description      |
| ----------------------------------------- | --------- | ---------------- |
| content<mark style="color:red;">\*</mark> | String    | message          |
| subject<mark style="color:red;">\*</mark> | String    | subject          |
| files<mark style="color:red;">\*</mark>   | \[String] | \[123456] \| \[] |

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

```json
"1990418667"
```

{% endtab %}
{% endtabs %}

## Get tickets

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/api/tickets`

Get all the tickets that the customer has created.

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

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

```json
[
    {
        "id": "1990450156",
        "createdAt": 1699351160000,
        "lastActivity": 1699351160971,
        "stage": 1,
        "subject": "Test"
    },
    {
        "id": "1990418667",
        "createdAt": 1699351201000,
        "lastActivity": 1699351201546,
        "stage": 1,
        "subject": "test1"
    }
]
```

{% endtab %}
{% endtabs %}

## Get ticket

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/api/tickets/{id}`

Get information on a specific ticket.

#### Path Parameters

| Name                                 | Type   | Description            |
| ------------------------------------ | ------ | ---------------------- |
| id<mark style="color:red;">\*</mark> | String | Ticket ID (1990418667) |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

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

```json
{
    "id": "1990418667",
    "createdAt": 1699351201000,
    "updatedAt": 1699351202000,
    "content": "test1",
    "stage": 1,
    "subject": "test1"
}
```

{% endtab %}
{% endtabs %}

## Create nested

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/api/tickets/{id}`

Add another ticket to an already created ticket.

#### Path Parameters

| Name                                 | Type   | Description            |
| ------------------------------------ | ------ | ---------------------- |
| id<mark style="color:red;">\*</mark> | String | Ticket ID (1990418667) |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

#### Request Body

| Name                                      | Type      | Description      |
| ----------------------------------------- | --------- | ---------------- |
| content<mark style="color:red;">\*</mark> | String    | message          |
| subject<mark style="color:red;">\*</mark> | String    | subject          |
| files<mark style="color:red;">\*</mark>   | \[String] | \[123456] \| \[] |

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

```json
{}
```

{% endtab %}
{% endtabs %}

## Close ticket

<mark style="color:red;">`DELETE`</mark> `{{BASE_URL}}/api/tickets/{id}`

Close a specific ticket.

#### Path Parameters

| Name                                 | Type   | Description            |
| ------------------------------------ | ------ | ---------------------- |
| id<mark style="color:red;">\*</mark> | String | Ticket ID (1990418667) |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

{% tabs %}
{% tab title="204: No Content " %}

```json
{}
```

{% endtab %}
{% endtabs %}
