Accept an incoming lead

Turn an incoming chat into a lead, the Accept button in the chat.

POST https://cotlet.dev/api/v1/kommo/chats/{chat_id}/incoming-lead/accept

write Confirm

Accepts the chat as the Accept button does: the lead is created and moves to the next stage. It returns the lead_id. A Digital Pipeline trigger on that stage fires for the new lead and can message the client. Chats that match an existing lead are not linked here. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: accept_incoming_lead
NameTypeDescription
chat_id string required string Chat ID from list_conversations or list_incoming_leads.
responsible_user_id integer integer Owner of the new lead. Default is you.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/kommo/chats/c8f2a6d1/incoming-lead/accept \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"responsible_user_id":9102334}'
Python
result = client.call("kommo", "accept_incoming_lead", {"chat_id":"c8f2a6d1","responsible_user_id":9102334})
Node.js
const result = await cotlet.call('kommo', 'accept_incoming_lead', {"chat_id":"c8f2a6d1","responsible_user_id":9102334});
CLI
cotlet call kommo accept_incoming_lead --data '{"chat_id":"c8f2a6d1","responsible_user_id":9102334}'

Example response

JSON

{
  "lead_id": 24519044,
  "chat_id": "c8f2a6d1",
  "stage": "Contacted",
  "responsible": {
    "user_id": 9102334,
    "name": "Anna Berg"
  }
}

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.