> ## 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.

# Update ticket status

> MCP tool to update the status of a ticket in the Thena platform.

import Admonition from '@theme/Admonition';

### MCP tool: `update_ticket_status`

Updates the status of a ticket in the Thena platform. Useful for workflow automation, ticket management, and support operations.

<Admonition type="note">
  You must provide the ticket <code>id</code> and either <code>statusId</code> or <code>statusName</code>.
</Admonition>

### Example prompt

```prompt theme={null}
Set the status of ticket CT4NVX0K10YJQ3X0185THN9R6H9M3 to "Closed"
```

<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>update\_ticket\_status</code> tool with the correct arguments.
</Admonition>

### Input parameters

| Name       | Type   | Required | Description                    |
| ---------- | ------ | -------- | ------------------------------ |
| id         | string | Yes      | The ID of the ticket to update |
| statusId   | string | No       | The ID of the status to set    |
| statusName | string | No       | The name of the status to set  |

### Response fields

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

***

### Sample response

The response includes the updated ticket object and metadata about the operation.

```json theme={null}
{
  "data": {
    "id": "CT4NVX0K10YJQ3X0185THN9R6H9M3",
    "ticketId": 2,
    "title": "Sample Ticket: Database Connection Timeout",
    "description": "Customer is experiencing intermittent database connection timeouts when running reports. The issue occurs approximately 3-4 times per day and is affecting their ability to generate monthly analytics. Error message shows 'Connection timeout after 30 seconds'. This started after the recent server maintenance window.",
    "source": "api",
    "status": "Closed",
    "priority": "High",
    "teamId": "THEWWYV55X0JJL",
    "teamName": "team one",
    "teamIdentifier": "TON",
    "ticketIdentifier": "TON-2",
    "subTeamId": "THEWWYV55X0JJL",
    "subTeamName": "team one",
    "subTeamIdentifier": "TON",
    "isPrivate": false,
    "formId": "FORR9U22U7IIB",
    "requestorEmail": "admin@clientcompany.com",
    "submitterEmail": "admin@clientcompany.com",
    "customFieldValues": [],
    "customerContactId": "RS4NVX0K10ATNQZ5999JKW37R6MTP",
    "customerContactFirstName": "Admin",
    "customerContactLastName": "",
    "customerContactEmail": "admin@clientcompany.com",
    "statusId": "JA4VETZJ10DFXHB06KTBYAJTQANZT",
    "priorityId": "NA4VETZJ10MXCXEDAXBVRZYG5SFSE",
    "sentimentId": "QA4VETZJ10FKVJQFS2QSBW5QWC3HD",
    "sentiment": "Neutral",
    "storyPoints": null,
    "aiGeneratedTitle": null,
    "aiGeneratedSummary": null,
    "createdAt": "2025-07-24T09:18:59.914Z",
    "updatedAt": "2025-07-24T09:41:20.842Z"
  },
  "status": true,
  "message": "Ticket updated successfully!",
  "timestamp": "2025-07-24T09:41:20.981Z"
}
```

<Admonition type="tip">
  Either <code>statusId</code> or <code>statusName</code> must be provided.
</Admonition>

***
