# Ticket

**All the endpoints that can be called on the Ticket controller.**

Endpoints that require the `TICKET_READ` permission:

* `GET` index
* `GET` item

Endpoints that require the `TICKET_CREATE` permission:

* `POST` index

Endpoints that require the `TICKET_UPDATE` permission:

* `PUT` item
* `POST` setPriority

Endpoints that require the `TICKET_DELETE` permission:

* `DELETE` item
* `DELETE` multi

Endpoints that require the `SET_STATUS` permission:

* `POST` setStatus
* `PUT` solveUnfinishedTickets

Endpoints that require the `TICKET_BATCH` permission:

* `POST` batch

## index

> \*\*Returns all tickets with optional filters such as search queries, views and result limits.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Ticket","description":"**All the endpoints that can be called on the Ticket controller.**\n\nEndpoints that require the `TICKET_READ` permission:\n\n- `GET` index\n    \n- `GET` item\n    \n\nEndpoints that require the `TICKET_CREATE` permission:\n\n- `POST` index\n    \n\nEndpoints that require the `TICKET_UPDATE` permission:\n\n- `PUT` item\n    \n- `POST` setPriority\n    \n\nEndpoints that require the `TICKET_DELETE` permission:\n\n- `DELETE` item\n    \n- `DELETE` multi\n    \n\nEndpoints that require the `SET_STATUS` permission:\n\n- `POST` setStatus\n    \n- `PUT` solveUnfinishedTickets\n    \n\nEndpoints that require the `TICKET_BATCH` permission:\n\n- `POST` batch"}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/ticket":{"get":{"tags":["Ticket"],"summary":"index","description":"**Returns all tickets with optional filters such as search queries, views and result limits.**","responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## index

> \*\*Creates a new empty ticket.\*\*\
> \
> Data can be added directly, but also through other /ticket endpoints.

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Ticket","description":"**All the endpoints that can be called on the Ticket controller.**\n\nEndpoints that require the `TICKET_READ` permission:\n\n- `GET` index\n    \n- `GET` item\n    \n\nEndpoints that require the `TICKET_CREATE` permission:\n\n- `POST` index\n    \n\nEndpoints that require the `TICKET_UPDATE` permission:\n\n- `PUT` item\n    \n- `POST` setPriority\n    \n\nEndpoints that require the `TICKET_DELETE` permission:\n\n- `DELETE` item\n    \n- `DELETE` multi\n    \n\nEndpoints that require the `SET_STATUS` permission:\n\n- `POST` setStatus\n    \n- `PUT` solveUnfinishedTickets\n    \n\nEndpoints that require the `TICKET_BATCH` permission:\n\n- `POST` batch"}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/ticket":{"post":{"tags":["Ticket"],"summary":"index","description":"**Creates a new empty ticket.**\n\nData can be added directly, but also through other /ticket endpoints.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"brandID":{"type":"string","description":"type: `number`"},"channelID":{"type":"string","description":"type: `number`"},"direction":{"type":"string","description":"type: `^inbound|outbound$`"},"from":{"type":"string","description":"type: `string`"},"fromName":{"type":"string","description":"type: `string` = ' '"},"to":{"type":"string","description":"type: `string`"},"title":{"type":"string","description":"type: `string`"},"assignedGroupID":{"type":"string","description":"type: `number` = 0"},"formID":{"type":"string","description":"type: `number` = null"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## item

> \*\*Returns all the data of this ticket.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Ticket","description":"**All the endpoints that can be called on the Ticket controller.**\n\nEndpoints that require the `TICKET_READ` permission:\n\n- `GET` index\n    \n- `GET` item\n    \n\nEndpoints that require the `TICKET_CREATE` permission:\n\n- `POST` index\n    \n\nEndpoints that require the `TICKET_UPDATE` permission:\n\n- `PUT` item\n    \n- `POST` setPriority\n    \n\nEndpoints that require the `TICKET_DELETE` permission:\n\n- `DELETE` item\n    \n- `DELETE` multi\n    \n\nEndpoints that require the `SET_STATUS` permission:\n\n- `POST` setStatus\n    \n- `PUT` solveUnfinishedTickets\n    \n\nEndpoints that require the `TICKET_BATCH` permission:\n\n- `POST` batch"}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/ticket/{ticketID}":{"get":{"tags":["Ticket"],"summary":"item","description":"**Returns all the data of this ticket.**","parameters":[{"name":"ticketID","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## item

> \*\*Updates the fields of this ticket.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Ticket","description":"**All the endpoints that can be called on the Ticket controller.**\n\nEndpoints that require the `TICKET_READ` permission:\n\n- `GET` index\n    \n- `GET` item\n    \n\nEndpoints that require the `TICKET_CREATE` permission:\n\n- `POST` index\n    \n\nEndpoints that require the `TICKET_UPDATE` permission:\n\n- `PUT` item\n    \n- `POST` setPriority\n    \n\nEndpoints that require the `TICKET_DELETE` permission:\n\n- `DELETE` item\n    \n- `DELETE` multi\n    \n\nEndpoints that require the `SET_STATUS` permission:\n\n- `POST` setStatus\n    \n- `PUT` solveUnfinishedTickets\n    \n\nEndpoints that require the `TICKET_BATCH` permission:\n\n- `POST` batch"}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/ticket/{ticketID}":{"put":{"tags":["Ticket"],"summary":"item","description":"**Updates the fields of this ticket.**","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"externalPrimaryID":{"type":"string","description":"type: `string` = null\n\nThe external primary ID of the customer this ticket belongs to."},"title":{"type":"string","description":"type: `string` = null"},"status":{"type":"string","description":"type: `^(solved|closed)$` = null"}}}}}},"parameters":[{"name":"ticketID","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## item

> \*\*Deletes all the data of this ticket.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Ticket","description":"**All the endpoints that can be called on the Ticket controller.**\n\nEndpoints that require the `TICKET_READ` permission:\n\n- `GET` index\n    \n- `GET` item\n    \n\nEndpoints that require the `TICKET_CREATE` permission:\n\n- `POST` index\n    \n\nEndpoints that require the `TICKET_UPDATE` permission:\n\n- `PUT` item\n    \n- `POST` setPriority\n    \n\nEndpoints that require the `TICKET_DELETE` permission:\n\n- `DELETE` item\n    \n- `DELETE` multi\n    \n\nEndpoints that require the `SET_STATUS` permission:\n\n- `POST` setStatus\n    \n- `PUT` solveUnfinishedTickets\n    \n\nEndpoints that require the `TICKET_BATCH` permission:\n\n- `POST` batch"}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/ticket/{ticketID}":{"delete":{"tags":["Ticket"],"summary":"item","description":"**Deletes all the data of this ticket.**","parameters":[{"name":"ticketID","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## multi

> \*\*Deletes multiple tickets given in an array.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Ticket","description":"**All the endpoints that can be called on the Ticket controller.**\n\nEndpoints that require the `TICKET_READ` permission:\n\n- `GET` index\n    \n- `GET` item\n    \n\nEndpoints that require the `TICKET_CREATE` permission:\n\n- `POST` index\n    \n\nEndpoints that require the `TICKET_UPDATE` permission:\n\n- `PUT` item\n    \n- `POST` setPriority\n    \n\nEndpoints that require the `TICKET_DELETE` permission:\n\n- `DELETE` item\n    \n- `DELETE` multi\n    \n\nEndpoints that require the `SET_STATUS` permission:\n\n- `POST` setStatus\n    \n- `PUT` solveUnfinishedTickets\n    \n\nEndpoints that require the `TICKET_BATCH` permission:\n\n- `POST` batch"}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/ticket/multi":{"delete":{"tags":["Ticket"],"summary":"multi","description":"**Deletes multiple tickets given in an array.**","responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## setStatus

> \*\*Sets the status of the tickets given in an array.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Ticket","description":"**All the endpoints that can be called on the Ticket controller.**\n\nEndpoints that require the `TICKET_READ` permission:\n\n- `GET` index\n    \n- `GET` item\n    \n\nEndpoints that require the `TICKET_CREATE` permission:\n\n- `POST` index\n    \n\nEndpoints that require the `TICKET_UPDATE` permission:\n\n- `PUT` item\n    \n- `POST` setPriority\n    \n\nEndpoints that require the `TICKET_DELETE` permission:\n\n- `DELETE` item\n    \n- `DELETE` multi\n    \n\nEndpoints that require the `SET_STATUS` permission:\n\n- `POST` setStatus\n    \n- `PUT` solveUnfinishedTickets\n    \n\nEndpoints that require the `TICKET_BATCH` permission:\n\n- `POST` batch"}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/ticket/setStatus":{"post":{"tags":["Ticket"],"summary":"setStatus","description":"**Sets the status of the tickets given in an array.**","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"type: `^(new|open|pending|holding|solved|closed)$`"},"ticketIDs[]":{"type":"string","description":"type: `number`"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## setPriority

> \*\*Sets the priority of the tickets given in an array.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Ticket","description":"**All the endpoints that can be called on the Ticket controller.**\n\nEndpoints that require the `TICKET_READ` permission:\n\n- `GET` index\n    \n- `GET` item\n    \n\nEndpoints that require the `TICKET_CREATE` permission:\n\n- `POST` index\n    \n\nEndpoints that require the `TICKET_UPDATE` permission:\n\n- `PUT` item\n    \n- `POST` setPriority\n    \n\nEndpoints that require the `TICKET_DELETE` permission:\n\n- `DELETE` item\n    \n- `DELETE` multi\n    \n\nEndpoints that require the `SET_STATUS` permission:\n\n- `POST` setStatus\n    \n- `PUT` solveUnfinishedTickets\n    \n\nEndpoints that require the `TICKET_BATCH` permission:\n\n- `POST` batch"}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/ticket/setPriority":{"post":{"tags":["Ticket"],"summary":"setPriority","description":"**Sets the priority of the tickets given in an array.**","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"priority":{"type":"string","description":"type: `^(low|medium|high|urgent)$`"},"ticketIDs[]":{"type":"string","description":"type: `number`"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## unlinkCustomerFromTicket

> \*\*Unlinks the customer from the ticket provided.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Ticket","description":"**All the endpoints that can be called on the Ticket controller.**\n\nEndpoints that require the `TICKET_READ` permission:\n\n- `GET` index\n    \n- `GET` item\n    \n\nEndpoints that require the `TICKET_CREATE` permission:\n\n- `POST` index\n    \n\nEndpoints that require the `TICKET_UPDATE` permission:\n\n- `PUT` item\n    \n- `POST` setPriority\n    \n\nEndpoints that require the `TICKET_DELETE` permission:\n\n- `DELETE` item\n    \n- `DELETE` multi\n    \n\nEndpoints that require the `SET_STATUS` permission:\n\n- `POST` setStatus\n    \n- `PUT` solveUnfinishedTickets\n    \n\nEndpoints that require the `TICKET_BATCH` permission:\n\n- `POST` batch"}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/ticket/unlinkCustomerFromTicket":{"post":{"tags":["Ticket"],"summary":"unlinkCustomerFromTicket","description":"**Unlinks the customer from the ticket provided.**","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"ticketID":{"type":"string","description":"type: `number`"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## batch

> \*\*Performs miscellaneous actions on tickets given in an array.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Ticket","description":"**All the endpoints that can be called on the Ticket controller.**\n\nEndpoints that require the `TICKET_READ` permission:\n\n- `GET` index\n    \n- `GET` item\n    \n\nEndpoints that require the `TICKET_CREATE` permission:\n\n- `POST` index\n    \n\nEndpoints that require the `TICKET_UPDATE` permission:\n\n- `PUT` item\n    \n- `POST` setPriority\n    \n\nEndpoints that require the `TICKET_DELETE` permission:\n\n- `DELETE` item\n    \n- `DELETE` multi\n    \n\nEndpoints that require the `SET_STATUS` permission:\n\n- `POST` setStatus\n    \n- `PUT` solveUnfinishedTickets\n    \n\nEndpoints that require the `TICKET_BATCH` permission:\n\n- `POST` batch"}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/ticket/batch":{"post":{"tags":["Ticket"],"summary":"batch","description":"**Performs miscellaneous actions on tickets given in an array.**","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"TicketIDs":{"type":"string","description":"type: `^[0-9, ]+$`\n\nCan be multiple ID's comma-separated (space allowed)."},"actions[0][actionType]":{"type":"string","description":"type: `string`\n\nNeeds to be an action type."},"actions[0][value]":{"type":"string","description":"type: `string`\n\nNeeds to be the value the action would use."}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```


---

# 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://docs.omnidesk.io/omnidesk/api-specification/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.
