SetParticipants
[POST] .../v1/deal/setparticipants
Updates CRM deal participants. Replace or extend the staff participant list for an open CRM deal and keep the linked chat participants in sync. The method validates the deal, participant-management permission, pipeline access and open deal status, normalizes participant_user_ids, keeps the responsible user in the participant context, updates deal participants, synchronizes chat staff participants, writes a chat system message, sends DealParticipantsSet webhook and participant notifications and returns row_affected with the deal 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 deal participants-manage permission; missing body, invalid id, missing deal, denied access, pipeline ACL failures, closed deal status, storage errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | Deal ID. |
| participant_user_ids | Array of Int64 | Optional | Participant user IDs. |
| replace_mode | Boolean | Optional | Update mode. true replaces the participant list; false adds users to the current list. |
Request Example
{
"id": 230,
"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": [
230
]
}
}