# POST /v1/ticket

<mark style="color:green;">`POST`</mark> **/v1/ticket**

**Headers**

| Name            | Value                                |
| --------------- | ------------------------------------ |
| Content-Type    | application/json                     |
| X-Challenge     | Mandatory header for creating ticket |
| X-Forwarded-For | Host where the message came from     |

**Body**

<table><thead><tr><th width="203">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>description</td><td>ticket description</td></tr><tr><td>subject</td><td>ticket subject</td></tr><tr><td>type</td><td>ticket type</td></tr><tr><td>email</td><td>email address</td></tr></tbody></table>

```javascript
{
    "description": "sample description",
    "subject": "sample subject",
    "type": "inquiry",
    "email": "sample@email.com",
}
```

**Request**

{% tabs %}
{% tab title="Curl" %}

```url
curl --location 'https://relay.sspwallet.io/v1/ticket' \
--header 'Content-Type: application/json' \
--header 'X-Challenge: sample' \
--header 'X-Forwarded-For: 103.0.113.165' \
--data-raw '{
    "description": "sample description", 
    "subject": "sample subject", 
    "type": "inquiry", 
    "email": "sample@email.com" 
}'
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200 - Success" %}

```json
{
    "status": "success",
    "data": {
        "info": "Ticket created successfully."
    }
}
```

{% endtab %}

{% tab title="400 - Failed Response" %}

```json
// List of messages:
// No description specified
// No subject specified
// No type specified
// No email specified
// Invalid request
// Description is too long
// Subject is too long
// Email is invalid
// Type is too long
// Ticket already submitted

{
    "status": "error",
    "data": {
        "name": "Error",
        "message": "<message>"
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://sspwallet.gitbook.io/docs/ssp-relay-development/project-folders/src/routes.ts/post-v1-ticket.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
