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

Parameters: update_lead
NameTypeDescription
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
curl -X PATCH https://cotlet.dev/api/v1/kommo/leads/1 \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("kommo", "update_lead", {"lead_id":1})
Node.js
const result = await cotlet.call('kommo', 'update_lead', {"lead_id":1});
CLI
cotlet call kommo update_lead --data '{"lead_id":1}'

Example response

JSON

{
  "lead_id": 24518301,
  "name": "Yoga studio booking",
  "sale": 750,
  "responsible": {
    "user_id": 9102334,
    "name": "Anna Berg"
  },
  "tags": [
    "website",
    "hot"
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.