> For the complete documentation index, see [llms.txt](https://developers.socialboards.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-ticket-category.md).

# Update Ticket Category

{% hint style="warning" %}
All API requests should contain [authorization headers](/docs/apis/tickets/authorization-headers.md).
{% endhint %}

#### Request

```json
PATCH /tickets/{ticketId}/category
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to update</td></tr></tbody></table>

### Add or update category

#### Request Body

```json
{
    "id": 23445
}
```

The request body should contain the serialized JSON model with the Id of the specified category.

<table><thead><tr><th>Field</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>id</td><td>nullable integer</td><td>no</td><td>Id of category you want to set up</td></tr></tbody></table>

### Remove category

To remove a category from the ticket you need to send `null` or empty object as model. Also, it will work for requests without body at all.

#### Request Body

```json
null // or {}
```

#### Response

```json
{
  "data": {},
  "errorCode": -1,
  "errorText": null
}
```


---

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

```
GET https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-ticket-category.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.
