[POST] .../v1/lead/setresponsible
Assigns the responsible user for a CRM lead. Use this workflow method instead of Lead/Edit when changing the user responsible for a CRM lead. The method validates the lead, responsible user and pipeline access, preserves the previous responsible user as a participant when needed, updates the assignment, synchronizes chat staff participants, writes a chat system message and action log, sends LeadResponsibleSet webhook and assignment notifications and returns row_affected with the lead id. The request body is required; id and responsible_user_id must both be positive and responsible_user_id must resolve to an existing active user. The caller must have CRM lead responsible-set permission; missing body, invalid ids, missing lead, missing responsible user, denied access, pipeline ACL 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 | Lead ID. |
| responsible_user_id | Int64 | Required | New responsible user ID. |
Request Example
{
"id": 105,
"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": [
105
]
}
}