SetResponsible

[POST] .../v1/client/setresponsible

Assigns the responsible user and sends the ClientResponsibleSet webhook after success. Use this workflow method instead of Client/Edit when changing the user responsible for a CRM client. The method validates the target client and active responsible user, updates cli_responsible_user_id, writes an action log record with set_responsible, sends the ClientResponsibleSet webhook and returns row_affected with the client id. The request body is required; id and responsible_user_id must both be positive and responsible_user_id must resolve to an existing non-deleted user. The caller must have CRM client responsible-set permission; missing body, invalid ids, denied access, missing client, missing responsible user, 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 Client ID.
responsible_user_id Int64 Required Responsible user ID.

Request Example

{
  "id": 126,
  "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": [
      126
    ]
  }
}