> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thena.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create ticket

> MCP tool to create a new ticket in the Thena platform.

import Admonition from '@theme/Admonition';

### MCP tool: `create_ticket`

Creates a new ticket in the Thena platform. Useful for support, issue tracking, or workflow automation.

<Admonition type="note">
  The required fields are <code>title</code>, <code>requestorEmail</code>, and <code>teamId</code>. All other fields are optional.
</Admonition>

### Example prompt

```prompt theme={null}
Create a ticket titled "Sample Support Request - Login Issues" for user john.doe@example.com in the ENG team.
```

<Admonition type="info">
  When you use this prompt in a chat with the model (with the MCP tool registered), the model will automatically call the <code>create\_ticket</code> tool with the correct arguments.
</Admonition>

### Input parameters

| Name               | Type      | Required | Description                             |
| ------------------ | --------- | -------- | --------------------------------------- |
| title              | string    | Yes      | The title of the ticket                 |
| requestorEmail     | string    | Yes      | The email of the requestor              |
| teamId             | string    | Yes      | The team ID to create the ticket in     |
| description        | string    | No       | The description of the ticket           |
| accountId          | string    | No       | The ID of the account                   |
| assignedAgentId    | string    | No       | The ID of the assigned agent            |
| assignedAgentEmail | string    | No       | The email of the assigned agent         |
| dueDate            | string    | No       | The due date of the ticket (ISO format) |
| submitterEmail     | string    | No       | The email of the submitter              |
| statusId           | string    | No       | The ID of the status                    |
| statusName         | string    | No       | The name of the status                  |
| priorityId         | string    | No       | The ID of the priority                  |
| priorityName       | string    | No       | The name of the priority                |
| sentimentId        | string    | No       | The ID of the sentiment                 |
| metadata           | object    | No       | Additional metadata                     |
| typeId             | string    | No       | The ID of the ticket type               |
| isPrivate          | boolean   | No       | Whether the ticket is private           |
| source             | string    | No       | The source of the ticket                |
| aiGeneratedTitle   | string    | No       | AI generated title                      |
| aiGeneratedSummary | string    | No       | AI generated summary                    |
| attachmentUrls     | string\[] | No       | URLs of attachments                     |
| customFieldValues  | array     | No       | Custom field values                     |
| performRouting     | boolean   | No       | Whether to perform routing              |
| formId             | string    | No       | The ID of the form                      |

### Response fields

Below are the fields you may see in the response:

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>id</td><td>string</td><td>Ticket unique ID</td></tr>
    <tr><td>ticketId</td><td>number</td><td>Ticket number</td></tr>
    <tr><td>title</td><td>string</td><td>Ticket title</td></tr>
    <tr><td>description</td><td>string</td><td>Ticket description</td></tr>
    <tr><td>status</td><td>string</td><td>Current status</td></tr>
    <tr><td>priority</td><td>string</td><td>Priority</td></tr>
    <tr><td>account</td><td>string</td><td>Account name</td></tr>
    <tr><td>accountId</td><td>string</td><td>Account ID</td></tr>
    <tr><td>teamId</td><td>string</td><td>Team ID</td></tr>
    <tr><td>teamName</td><td>string</td><td>Team name</td></tr>
    <tr><td>ticketIdentifier</td><td>string</td><td>Ticket identifier</td></tr>
    <tr><td>isPrivate</td><td>boolean</td><td>Whether the ticket is private</td></tr>
    <tr><td>formId</td><td>string</td><td>Form ID</td></tr>
    <tr><td>requestorEmail</td><td>string</td><td>Requestor email</td></tr>
    <tr><td>submitterEmail</td><td>string</td><td>Submitter email</td></tr>
    <tr><td>customFieldValues</td><td>array</td><td>Custom field values</td></tr>
    <tr><td>customerContactId</td><td>string</td><td>Customer contact ID</td></tr>
    <tr><td>customerContactFirstName</td><td>string</td><td>Customer contact first name</td></tr>
    <tr><td>customerContactLastName</td><td>string</td><td>Customer contact last name</td></tr>
    <tr><td>customerContactEmail</td><td>string</td><td>Customer contact email</td></tr>
    <tr><td>sentimentId</td><td>string</td><td>Sentiment ID</td></tr>
    <tr><td>sentiment</td><td>string</td><td>Sentiment</td></tr>
    <tr><td>createdAt</td><td>string (ISO8601)</td><td>Creation timestamp</td></tr>
    <tr><td>updatedAt</td><td>string (ISO8601)</td><td>Last update timestamp</td></tr>
  </tbody>
</table>

Other top-level fields in the response:

| Field     | Type    | Description                               |
| --------- | ------- | ----------------------------------------- |
| data      | object  | The created ticket object                 |
| status    | boolean | Whether the creation succeeded            |
| message   | string  | Status message                            |
| timestamp | string  | Time the response was generated (ISO8601) |

***

### Sample response

```json theme={null}
{
  "data": {
    "id": "4T62TX0K104VT3S3W9AYN99C6DDVY",
    "ticketId": 3,
    "title": "Sample Support Request - Login Issues",
    "description": "Customer is experiencing difficulty logging into their account. They report receiving an \"invalid credentials\" error message even though they're certain their password is correct. This started happening after the recent system update. Customer has tried resetting password but the issue persists.",
    "status": "Open",
    "priority": "Medium",
    "account": "test",
    "accountId": "8PBKJHXJ10YPPEHTQ0682FSNFNAYG",
    "teamId": "T88WCYYHPS",
    "teamName": "ENG",
    "teamIdentifier": "ENG",
    "ticketIdentifier": "ENG-3",
    "subTeamId": "T88WCYYHPS",
    "subTeamName": "ENG",
    "subTeamIdentifier": "ENG",
    "isPrivate": false,
    "formId": "FOCCF4KKYBR",
    "requestorEmail": "john.doe@example.com",
    "submitterEmail": "john.doe@example.com",
    "customFieldValues": [],
    "customerContactId": "MS62TX0K10A80KRD8N9JN99THJM3Y",
    "customerContactFirstName": "John",
    "customerContactLastName": "Doe",
    "customerContactEmail": "john.doe@example.com",
    "sentimentId": "4MNKDHSJ10HTNG1C7XD40HBANC03Y",
    "sentiment": "Neutral",
    "createdAt": "2025-07-24T08:51:10.785Z",
    "updatedAt": "2025-07-24T08:51:10.785Z"
  },
  "status": true,
  "message": "Ticket created successfully",
  "timestamp": "2025-07-24T08:51:10.824Z"
}
```

<Admonition type="tip">
  Always pass an object as input, even if empty, to avoid errors when calling the tool directly.
</Admonition>

***
