Update a lead
Change the name, sale amount, responsible user or tags of a lead.
PATCH https://cotlet.dev/api/v1/kommo/leads/{lead_id}
write Confirm
Returns the lead as it is after the change. Only the fields you send change. Assigning a new responsible user can fire a Digital Pipeline trigger and the new owner sees the lead in their list. A tag that does not exist is created. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| lead_id integer required | integer | Lead ID from list_leads or get_lead. |
| name string | string | New lead name. |
| sale integer | integer | New sale amount. |
| responsible_user_id integer | integer | New owner of the lead. |
| add_tags array | array | Tag names to add. |
| remove_tags array | array | Tag names to remove. |
Request
curl -X PATCH https://cotlet.dev/api/v1/kommo/leads/1 \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("kommo", "update_lead", {"lead_id":1}) const result = await cotlet.call('kommo', 'update_lead', {"lead_id":1}); cotlet call kommo update_lead --data '{"lead_id":1}' Example response
{
"lead_id": 24518301,
"name": "Yoga studio booking",
"sale": 750,
"responsible": {
"user_id": 9102334,
"name": "Anna Berg"
},
"tags": [
"website",
"hot"
]
}