[POST] .../v1/lead/edit
Edits a CRM lead. Use this method to update a lead title, description, amount, mentions and custom fields while keeping stage movement in the dedicated Lead/SetStage, Lead/Close or Lead/Convert workflow. The method loads the active lead, rejects stage_id changes, checks pipeline ACL, applies provided scalar and custom-field changes, optionally updates description mentions and auto-added participants, keeps the linked chat synchronized, writes stage history only when a supported internal transition occurs, sends LeadEdited and mention notifications and returns row_affected with the lead id. The request body is required; id must be positive, description_mentions can be sent only together with description and title is limited by the schema. The caller must have CRM lead edit permission or CRM manage-all access for this workflow; missing body, invalid id, missing lead, denied pipeline access, stage_id misuse, disabled additional fields, required custom-field failures, mention validation failures, participant-permission failures, database errors, transaction failures and action-log errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| amount | Decimal | Optional | Lead amount. |
| description | String | Optional | Lead description. |
| description_mentions | Array of CommonMentionInput | Optional | New structured user mentions in description. |
| fields | Array of FieldValueEdit | Optional | Custom field changes. |
| id | Int64 | Required | Lead ID. |
| mention_options | CommonMentionOptions | Optional | Mention processing options. |
| stage_id | Int64 | Optional | Stage changes through edit are not allowed. Use lead/setstage. |
| title | String | Optional | Lead title. Maximum length is 300 characters. |
Request Example
{
"id": 105,
"title": "Website request - priority",
"description": "Client asks for a call after 15:00 and wants pricing details",
"amount": 2800.00,
"fields": []
}
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
]
}
}