[POST] .../v1/ticket/close
Closes a CRM ticket. Use this workflow method to close a support ticket after the issue is resolved or the conversation is finished. The method validates the ticket, uses provided resolved_date or the current server time, sets status Closed and resolved date, creates or closes the linked ticket chat, writes a TicketClosed chat system message and action log record, recalculates SLA and missed flag, sends TicketClosed and SLA webhooks, cancels ticket-created notifications and returns row_affected with the ticket id. The request body is required and id must be positive; resolved_date is optional Unix time in seconds and is ignored when non-positive. The caller must have CRM ticket close permission; missing body, invalid id, missing ticket, unsupported extended schema checks, database errors, transaction failures, chat synchronization errors and action-log errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | Ticket ID. |
| resolved_date | Int64 | Optional | Closing date as Unix time in seconds. If omitted, the current time is used. |
Request Example
{
"id": 610,
"resolved_date": 1773142200
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1,
"ids": [
610
]
}
}