[POST] .../v1/ticket/setresponsible
Assigns a responsible user to a CRM ticket. Use this workflow method instead of Ticket/Edit when assigning or changing the operator responsible for a ticket. The method validates the ticket, responsible user, active work session and break state, rejects closed tickets, preserves the previous responsible user as a participant when needed, changes Open tickets to WaitingStaff on a new assignment, synchronizes ticket participants and chat staff participants, recalculates SLA, writes chat system messages and action logs, sends TicketResponsibleSet and SLA webhooks and returns row_affected with the ticket id. The request body is required; id and responsible_user_id must both be positive and the responsible user must exist, have an active work session and not be on break. The caller must have CRM ticket responsible-set permission; missing body, invalid ids, missing ticket or responsible user, closed ticket status, responsible worktime failures, database errors, transaction failures and action-log errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | Ticket ID. |
| responsible_user_id | Int64 | Required | Responsible user ID. |
Request Example
{
"id": 610,
"responsible_user_id": 31
}
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
]
}
}