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

# Tickets

Support: list, create, retrieve, update, delete and search.

Operations to manage support tickets.

## GET /tickets

> List tickets

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Tickets","description":"Manage support tickets: list, create, retrieve, update, delete and search."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Production"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"M&S installation token. Send it in the `authtoken` header of every request."}},"schemas":{"Ticket":{"type":"object","description":"A support ticket.","properties":{"id":{"type":"integer"},"client_id":{"type":"string"},"project_id":{"type":"string"},"ticket_type_id":{"type":"string"},"title":{"type":"string"},"created_by":{"type":"string"},"requested_by":{"type":"string"},"created_at":{"type":"string"},"status":{"type":"string"},"last_activity_at":{"type":"string"},"assigned_to":{"type":"string"},"labels":{"type":"string"},"ticket_type":{"type":"string"},"company_name":{"type":"string"},"assigned_to_user":{"type":"string"}}},"ApiMessage":{"type":"object","description":"Generic status response for write and delete operations.","properties":{"status":{"type":"boolean","description":"`true` if the operation succeeded."},"message":{"type":"string","description":"Human-readable result message."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/tickets":{"get":{"tags":["Tickets"],"operationId":"listTickets","summary":"List tickets","responses":{"200":{"description":"Tickets.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## POST /tickets

> Create ticket

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Tickets","description":"Manage support tickets: list, create, retrieve, update, delete and search."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Production"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"M&S installation token. Send it in the `authtoken` header of every request."}},"schemas":{"TicketCreate":{"type":"object","description":"Data to create a ticket.","required":["title","client_id","requested_by_id","ticket_type_id","description","assigned_to"],"properties":{"title":{"type":"string"},"client_id":{"type":"string"},"requested_by_id":{"type":"string","description":"ID of the requesting contact."},"ticket_type_id":{"type":"string"},"description":{"type":"string"},"assigned_to":{"type":"string","description":"ID of the assigned agent."},"ticket_labels":{"type":"string","description":"Optional. Label IDs separated by commas."}}},"ApiMessage":{"type":"object","description":"Generic status response for write and delete operations.","properties":{"status":{"type":"boolean","description":"`true` if the operation succeeded."},"message":{"type":"string","description":"Human-readable result message."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/tickets":{"post":{"tags":["Tickets"],"operationId":"createTicket","summary":"Create ticket","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TicketCreate"}}}},"responses":{"200":{"description":"Ticket created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## GET /tickets/{id}

> Get ticket by ID

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Tickets","description":"Manage support tickets: list, create, retrieve, update, delete and search."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Production"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"M&S installation token. Send it in the `authtoken` header of every request."}},"schemas":{"Ticket":{"type":"object","description":"A support ticket.","properties":{"id":{"type":"integer"},"client_id":{"type":"string"},"project_id":{"type":"string"},"ticket_type_id":{"type":"string"},"title":{"type":"string"},"created_by":{"type":"string"},"requested_by":{"type":"string"},"created_at":{"type":"string"},"status":{"type":"string"},"last_activity_at":{"type":"string"},"assigned_to":{"type":"string"},"labels":{"type":"string"},"ticket_type":{"type":"string"},"company_name":{"type":"string"},"assigned_to_user":{"type":"string"}}},"ApiMessage":{"type":"object","description":"Generic status response for write and delete operations.","properties":{"status":{"type":"boolean","description":"`true` if the operation succeeded."},"message":{"type":"string","description":"Human-readable result message."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"NotFound":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/tickets/{id}":{"get":{"tags":["Tickets"],"operationId":"getTicket","summary":"Get ticket by ID","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"},"description":"Resource identifier."}],"responses":{"200":{"description":"Ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## PUT /tickets/{id}

> Update ticket

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Tickets","description":"Manage support tickets: list, create, retrieve, update, delete and search."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Production"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"M&S installation token. Send it in the `authtoken` header of every request."}},"schemas":{"TicketUpdate":{"description":"Data to update a ticket (same fields as creation).","allOf":[{"$ref":"#/components/schemas/TicketCreate"}]},"TicketCreate":{"type":"object","description":"Data to create a ticket.","required":["title","client_id","requested_by_id","ticket_type_id","description","assigned_to"],"properties":{"title":{"type":"string"},"client_id":{"type":"string"},"requested_by_id":{"type":"string","description":"ID of the requesting contact."},"ticket_type_id":{"type":"string"},"description":{"type":"string"},"assigned_to":{"type":"string","description":"ID of the assigned agent."},"ticket_labels":{"type":"string","description":"Optional. Label IDs separated by commas."}}},"ApiMessage":{"type":"object","description":"Generic status response for write and delete operations.","properties":{"status":{"type":"boolean","description":"`true` if the operation succeeded."},"message":{"type":"string","description":"Human-readable result message."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"NotFound":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/tickets/{id}":{"put":{"tags":["Tickets"],"operationId":"updateTicket","summary":"Update ticket","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"},"description":"Resource identifier."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TicketUpdate"}}}},"responses":{"200":{"description":"Ticket updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## DELETE /tickets/{id}

> Delete ticket

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Tickets","description":"Manage support tickets: list, create, retrieve, update, delete and search."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Production"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"M&S installation token. Send it in the `authtoken` header of every request."}},"schemas":{"ApiMessage":{"type":"object","description":"Generic status response for write and delete operations.","properties":{"status":{"type":"boolean","description":"`true` if the operation succeeded."},"message":{"type":"string","description":"Human-readable result message."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"NotFound":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/tickets/{id}":{"delete":{"tags":["Tickets"],"operationId":"deleteTicket","summary":"Delete ticket","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"},"description":"Resource identifier."}],"responses":{"200":{"description":"Ticket deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## GET /tickets/search/{keysearch}

> Search tickets

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Tickets","description":"Manage support tickets: list, create, retrieve, update, delete and search."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Production"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"M&S installation token. Send it in the `authtoken` header of every request."}},"schemas":{"TicketSearchItem":{"type":"object","description":"A ticket match in a search.","properties":{"id":{"type":"integer"},"title":{"type":"string"},"status":{"type":"string"}}},"ApiMessage":{"type":"object","description":"Generic status response for write and delete operations.","properties":{"status":{"type":"boolean","description":"`true` if the operation succeeded."},"message":{"type":"string","description":"Human-readable result message."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/tickets/search/{keysearch}":{"get":{"tags":["Tickets"],"operationId":"searchTickets","summary":"Search tickets","parameters":[{"in":"path","name":"keysearch","required":true,"schema":{"type":"string"},"description":"Text to search for."}],"responses":{"200":{"description":"Ticket matches.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TicketSearchItem"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```


---

# 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, and the optional `goal` query parameter:

```
GET https://developers.myscreators.com/en/api-reference/tickets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
