SetParticipants

[POST] .../v1/ticket/setparticipants

Updates CRM ticket participants. Use this workflow method to replace or extend the staff participant list for a CRM ticket and keep the linked chat participants in sync. The method validates participant-management permission, loads and locks the ticket, normalizes participant_user_ids, keeps the responsible user in the participant context, updates ticket participants, synchronizes chat staff participants and client chat membership, writes a chat system message and action log, sends TicketParticipantsSet webhook and returns row_affected with the ticket id. The request body is required and id must be positive; replace_mode true replaces the participant list, while false adds the provided users to the existing list. The caller must have CRM ticket participants-manage permission; missing body, invalid id, missing ticket, denied access, 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.
participant_user_ids Array of Int64 Optional Participant list.
replace_mode Boolean Optional Update mode: true to replace the participant list, false to append to the current list.

Request Example

{
  "id": 610,
  "participant_user_ids": [
    18,
    31
  ],
  "replace_mode": true
}

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
    ]
  }
}