Kommo MCP by usefulapi

v1.15.1
io.usefulapi/kommo Checked 2 days ago Published 1 day ago

List leads, contacts, companies and tasks; create and update leads in Kommo.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

kommo_get_account Get account

Get the Kommo account: id, subdomain, country, currency and the current user id. Good first call to confirm the connection. GET /api/v4/account.

ParameterTypeDescription
withstringComma-separated extra data to embed, e.g. 'contacts,loss_reason' (see the Kommo reference for each entity).

kommo_list_pipelines List pipelines

List the lead pipelines with their stages (status ids, names, sort order). Use it to find the pipeline_id and status_id values for lead filters and writes. Returns 25 pipelines per call by default: pass offset = next_offset to get the rest. GET /api/v4/leads/pipelines (paged in our code: Kommo returns the whole list in one response).

ParameterTypeDescription
limitintegerPipelines per page (1-100; default 25).
offsetintegerPipelines to skip (default 0). Use next_offset from the result to get the next page.

kommo_list_users List users

List the users of the account with their ids, names, emails, groups, roles and rights. Use it to find responsible_user_id values. active_only drops users that are switched off (on this page). GET /api/v4/users.

ParameterTypeDescription
active_onlybooleantrue = only active users (rights.is_active).
limitintegerEntities per page (max 250; default 50).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
withstringComma-separated extra data to embed, e.g. 'contacts,loss_reason' (see the Kommo reference for each entity).

kommo_list_custom_fields List custom fields

List the custom fields of leads, contacts or companies (ids, names, types, enum options). Use it to find field ids before writing values. GET /api/v4/{entity}/custom_fields.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.
limitintegerFields per page (max 250; default 10).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…

kommo_list_leads List leads

List or search deals (leads) with price, stage, pipeline, responsible user, timestamps, tags and custom field values. Filter by text (name, phone, email), pipeline, stage (142 = won, 143 = lost), owner, author, value, and the create, update, close or next-task windows. Dates: Unix seconds, YYYY-MM-DD (account timezone) or RFC 3339. Rows are compact by default (no _links; each custom field as field_id, field_name and its values, with enum_code where Kommo labels a value); detail "full" returns the Kommo rows (field codes, types, enum ids). One request per call. GET /api/v4/leads.

ParameterTypeDescription
closed_fromOnly leads closed (won or lost) at or after this time.
closed_toOnly leads closed at or before this time (a date means the end of that day).
created_byarrayOnly leads created by these user ids.
created_fromOnly leads created at or after this time.
created_toOnly leads created at or before this time (a date means the end of that day).
detailstringcompact (default, up to 25 per page) or full (every Kommo field, up to 15 per page).
limitintegerLeads per page: 1-25 (default 25); with detail "full" 1-15. A larger value is reduced to the maximum.
next_task_fromOnly leads whose nearest open task is due at or after this time.
next_task_toOnly leads whose nearest open task is due at or before this time (a date means the end of that day).
order_created_atstringSort by creation time (instead of order_updated_at).
order_updated_atstringSort direction.
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
pipeline_idintegerOnly leads in this pipeline.
price_fromnumberMinimum deal value.
price_tonumberMaximum deal value.
querystringSearch text across the filled lead fields.
responsible_user_idintegerOnly leads owned by this user id.
responsible_user_idsarrayOnly leads owned by one of these user ids.
stagesarrayOnly leads in these stages, e.g. [{pipeline_id: 1, status_id: 142}] for won leads of pipeline 1.
updated_byarrayOnly leads last changed by these user ids.
updated_fromOnly leads updated at or after this time.
updated_toOnly leads updated at or before this time (a date means the end of that day).
withstringComma-separated extra data to embed, e.g. 'contacts,loss_reason' (see the Kommo reference for each entity).

kommo_get_lead Get lead

Get one lead by id, with optional embedded data (contacts, loss_reason, source). GET /api/v4/leads/{id}.

ParameterTypeDescription
lead_id *integerNumeric Kommo id.
withstringComma-separated extra data to embed, e.g. 'contacts,loss_reason' (see the Kommo reference for each entity).

kommo_list_contacts List contacts

List contacts (people) with their names, custom fields (email, phone) and responsible user. One request per call. GET /api/v4/contacts.

ParameterTypeDescription
limitintegerEntities per page (max 250; default 25).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
querystringSearch text, e.g. a name, email or phone.
responsible_user_idintegerOnly contacts owned by this user id.
withstringComma-separated extra data to embed, e.g. 'contacts,loss_reason' (see the Kommo reference for each entity).

kommo_get_contact Get contact

Get one contact by id, with optional embedded data (leads, companies). GET /api/v4/contacts/{id}.

ParameterTypeDescription
contact_id *integerNumeric Kommo id.
withstringComma-separated extra data to embed, e.g. 'contacts,loss_reason' (see the Kommo reference for each entity).

kommo_list_companies List companies

List companies (organisations) with their names, custom fields and responsible user. One request per call. GET /api/v4/companies.

ParameterTypeDescription
limitintegerEntities per page (max 250; default 25).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
querystringSearch text, e.g. a company name.
responsible_user_idintegerOnly companies owned by this user id.
withstringComma-separated extra data to embed, e.g. 'contacts,loss_reason' (see the Kommo reference for each entity).

kommo_get_company Get company

Get one company by id, with optional embedded data (contacts, leads). GET /api/v4/companies/{id}.

ParameterTypeDescription
company_id *integerNumeric Kommo id.
withstringComma-separated extra data to embed, e.g. 'contacts,loss_reason' (see the Kommo reference for each entity).

kommo_list_tasks List tasks

List follow-up tasks, optionally only open ones, for one user, one linked entity, a task type or a due window. Dates: Unix seconds, YYYY-MM-DD (account timezone) or RFC 3339. One request per call. GET /api/v4/tasks.

ParameterTypeDescription
due_fromOnly tasks due at or after this time.
due_toOnly tasks due at or before this time (a date means the end of that day).
entity_idintegerOnly tasks linked to this entity id (use with entity_type).
entity_typestringOnly tasks linked to this entity type.
is_completedbooleantrue = completed only; false = open only.
limitintegerEntities per page (max 250; default 50).
order_duestringSort by due time.
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
responsible_user_idintegerOnly tasks for this user id.
task_type_idsarrayOnly tasks of these types (ids from kommo_get_account_context).

kommo_list_notes List notes

List the notes (text notes, calls, service messages) of one lead, contact or company, with is_pinned. Filter by note type; newest first by default. One request per call. GET /api/v4/{entity}/{id}/notes.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.
entity_id *integerNumeric Kommo id.
limitintegerEntities per page (max 250; default 50).
note_typesarrayOnly these note types, e.g. common, call_in, call_out, service_message, sms_in, sms_out.
orderstringSort by update time (default desc).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…

kommo_list_conversations List conversations

List conversations (chats with contacts): status, contact, linked lead and origin channel. Filter by conversation, contact, lead or open only. One page per call. GET /api/v4/talks.

ParameterTypeDescription
contact_idintegerOnly conversations with this contact id.
conversation_idintegerOnly this conversation id.
lead_idintegerOnly conversations linked to this lead id.
limitintegerEntities per page (max 250; default 25).
open_onlybooleantrue = open conversations only.
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…

kommo_get_conversation Get conversation

Get one conversation by id: is_in_work (true = open, false = closed), contact, linked lead and origin channel. GET /api/v4/talks/{id}.

ParameterTypeDescription
conversation_id *integerNumeric Kommo id.

kommo_create_lead Create lead

Create one lead (deal) in a pipeline stage. Creates a new record on every call: it does not check for duplicates. POST /api/v4/leads.

ParameterTypeDescription
name *stringLead name.
pipeline_idintegerPipeline id (see kommo_list_pipelines).
pricenumberDeal value.
responsible_user_idintegerOwner user id (see kommo_list_users).
status_idintegerStage id inside the pipeline (see kommo_list_pipelines).

kommo_update_lead Update lead

Change one lead: name, value, pipeline, stage or owner. Only the given fields change. Repeating the same call gives the same result. PATCH /api/v4/leads/{id}.

ParameterTypeDescription
lead_id *integerNumeric Kommo id.
namestringNew lead name.
pipeline_idintegerMove to this pipeline id.
pricenumberNew deal value.
responsible_user_idintegerNew owner user id.
status_idintegerMove to this stage id (inside the pipeline).

kommo_close_conversation Close conversation

WRITE: closes one conversation. Ask the user before closing. By default it closes at once without the NPS survey; run_nps true lets Kommo's NPS bot ask the client first (if NPS is on in the account). Kommo may apply the close after its reply: check is_in_work in the result. POST /api/v4/talks/{id}/close, then GET /api/v4/talks/{id}.

ParameterTypeDescription
conversation_id *integerNumeric Kommo id.
run_npsbooleantrue = close after the NPS survey bot (default false: close at once).

kommo_create_contact Create contact

WRITE: creates one contact. Ask the user before creating. Creates a new contact on every call: it does not check for duplicates. Give name, or first_name and last_name. POST /api/v4/contacts.

ParameterTypeDescription
custom_fields_valuesarrayCustom field values, e.g. [{"field_id": 178382, "values": [{"value": "+19651796214"}]}].
emailsarrayEmails. On an update the list replaces all emails of the record.
first_namestringFirst name.
last_namestringLast name.
namestringFull name.
phonesarrayPhones. On an update the list replaces all phones of the record.
responsible_user_idintegerOwner user id (see kommo_list_users).

kommo_update_contact Update contact

WRITE: changes one contact: name, owner, phones, emails or custom field values. Only the given fields change; a phones or emails list replaces all phones or emails. Ask the user before changing. PATCH /api/v4/contacts (one contact in the array).

ParameterTypeDescription
contact_id *integerNumeric Kommo id.
custom_fields_valuesarrayCustom field values, e.g. [{"field_id": 178382, "values": [{"value": "+19651796214"}]}].
emailsarrayEmails. On an update the list replaces all emails of the record.
first_namestringNew first name.
last_namestringNew last name.
namestringNew full name.
phonesarrayPhones. On an update the list replaces all phones of the record.
responsible_user_idintegerOwner user id (see kommo_list_users).

kommo_create_company Create company

WRITE: creates one company. Ask the user before creating. Creates a new company on every call: it does not check for duplicates. POST /api/v4/companies.

ParameterTypeDescription
name *stringCompany name.
custom_fields_valuesarrayCustom field values, e.g. [{"field_id": 178382, "values": [{"value": "+19651796214"}]}].
emailsarrayEmails. On an update the list replaces all emails of the record.
phonesarrayPhones. On an update the list replaces all phones of the record.
responsible_user_idintegerOwner user id (see kommo_list_users).

kommo_update_company Update company

WRITE: changes one company: name, owner, phones, emails or custom field values. Only the given fields change; a phones or emails list replaces all phones or emails. Ask the user before changing. PATCH /api/v4/companies (one company in the array).

ParameterTypeDescription
company_id *integerNumeric Kommo id.
custom_fields_valuesarrayCustom field values, e.g. [{"field_id": 178382, "values": [{"value": "+19651796214"}]}].
emailsarrayEmails. On an update the list replaces all emails of the record.
namestringNew company name.
phonesarrayPhones. On an update the list replaces all phones of the record.
responsible_user_idintegerOwner user id (see kommo_list_users).

kommo_create_task Create task

WRITE: creates one follow-up task. Ask the user before creating. Creates a new task on every call: it does not check for duplicates. Link it to a lead, contact or company with entity_type and entity_id together. POST /api/v4/tasks.

ParameterTypeDescription
complete_till *Due time: Unix seconds, YYYY-MM-DDTHH:MM in the account timezone (a bare date = 23:59 that day), or RFC 3339.
text *stringTask text.
entity_idintegerId of the linked lead, contact or company (use with entity_type).
entity_typestringEntity type: leads, contacts or companies.
responsible_user_idintegerOwner user id (see kommo_list_users).
task_type_idintegerTask type id (1 = follow-up, 2 = meeting; account types in kommo_get_account_context).

kommo_update_task Update task

WRITE: changes one task: text, due time, type, owner, or completes it with a result text. Only the given fields change. Ask the user before completing or changing a task. Booking tasks cannot be changed (HTTP 403). PATCH /api/v4/tasks/{id}.

ParameterTypeDescription
task_id *integerNumeric Kommo id.
complete_tillNew due time: Unix seconds, YYYY-MM-DDTHH:MM in the account timezone (a bare date = 23:59 that day), or RFC 3339.
is_completedbooleantrue completes the task.
responsible_user_idintegerOwner user id (see kommo_list_users).
result_textstringResult text recorded with the completion.
task_type_idintegerNew task type id.
textstringNew task text.

kommo_create_custom_field Create custom field

WRITE (administrator token). Create one custom field on leads, contacts or companies: name, type, optional code, sort, group, API-only flag, options for select/multiselect/radiobutton, required or hidden stages for lead fields, currency for monetary, reminder for birthday. Creates a new field on every call: check kommo_list_custom_fields first. POST /api/v4/{entity}/custom_fields.

ParameterTypeDescription
entity *stringWhich records get the field: leads, contacts or companies.
name *stringField name.
type *stringField type. select = list, radiobutton = switch, streetaddress = short address, smart_address = address, legal_entity = tax ID.
codestringSymbolic code, to write values without the field id.
currencystringISO currency code; monetary fields only.
enumsarrayOptions; required for select, multiselect and radiobutton.
group_idstringField group id (from kommo_list_custom_fields).
hidden_statusesarrayLeads only: stages in which the field is hidden. Replaces the current list.
is_api_onlybooleanIf true, users cannot edit the value in Kommo; only the API can.
remindstringBirthday fields only: when to remind.
required_statusesarrayLeads only: stages that require this field before a lead moves into them. Replaces the current list.
sortintegerPosition among the fields.

kommo_update_custom_field Update custom field

WRITE (administrator token). Change one custom field: name, sort, group, API-only flag, required or hidden stages (lead fields; each list replaces the current one), currency, birthday reminder, and add new options with enums_add. The tool reads the field, sends its current options plus the new ones (Kommo deletes options left out), then reads it back and reports any option that went missing. Do not run two enums_add calls on the same field at the same time. It cannot delete fields or options. PATCH /api/v4/{entity}/custom_fields/{id}.

ParameterTypeDescription
entity *stringWhich records get the field: leads, contacts or companies.
field_id *integerNumeric Kommo id.
currencystringISO currency code; monetary fields only.
enums_addarrayNew options to append (select, multiselect, radiobutton fields).
group_idstringField group id (from kommo_list_custom_fields).
hidden_statusesarrayLeads only: stages in which the field is hidden. Replaces the current list.
is_api_onlybooleanIf true, users cannot edit the value in Kommo; only the API can.
namestringNew field name.
remindstringBirthday fields only.
required_statusesarrayLeads only: stages that require this field before a lead moves into them. Replaces the current list.
sortintegerPosition among the fields.

kommo_create_pipeline_stage Create pipeline stage

WRITE (administrator token). Add one stage to a lead pipeline: name, position (sort), color and optional descriptions per user level. Creates a new stage on every call: check kommo_list_pipelines first. POST /api/v4/leads/pipelines/{pipeline_id}/statuses.

ParameterTypeDescription
name *stringStage name.
pipeline_id *integerPipeline id (see kommo_list_pipelines).
sort *integerPosition in the pipeline (required by Kommo; compare the sort values from kommo_list_pipelines).
colorstringStage color, one of Kommo's fixed colors.
descriptionsarrayStage descriptions shown to users, at most one per level (newbie, candidate, master).

kommo_update_pipeline_stage Update pipeline stage

WRITE (administrator token). Change one pipeline stage: name, position (sort), color or descriptions (the list replaces the current descriptions). It cannot delete stages. PATCH /api/v4/leads/pipelines/{pipeline_id}/statuses/{status_id}.

ParameterTypeDescription
pipeline_id *integerPipeline id.
status_id *integerStage id (see kommo_list_pipelines).
colorstringNew color.
descriptionsarrayStage descriptions shown to users, at most one per level (newbie, candidate, master).
namestringNew stage name.
sortintegerNew position.

kommo_get_account_context Get account context

Get what most other calls need: account id, name, subdomain, currency, country, timezone, the current time and weekday there, the connected user, user groups and task types (ids for kommo_create_task). 2 requests: GET /api/v4/account?with=users_groups,task_types,datetime_settings and GET /api/v4/users/{current_user_id}.

kommo_get_lead_context Get lead context

Get one lead with everything around it: the lead (fields, tags, products, loss reason, source), its contacts and company, open tasks, the 10 newest notes and its chat conversations. Up to 6 requests, one after another (lead, contacts, company, tasks, notes, conversations). A part that fails is reported in notes.

ParameterTypeDescription
lead_id *integerNumeric Kommo id.

kommo_list_events List events

List changes in the account, newest first: what changed, on which record, who changed it, when, and the value before and after. Filter by record type and ids (up to 10), event types, authors and a time window (Unix seconds, YYYY-MM-DD in the account timezone, or RFC 3339). Kommo keeps events for a limited time. GET /api/v4/events.

ParameterTypeDescription
created_byarrayOnly changes by these user ids (0 = robot).
entitystringRecord type (singular): lead, contact, company or task.
entity_idsarrayOnly these record ids (use with entity).
fromOnly events at or after this time.
limitintegerEvents per page (max 100; default 50).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
toOnly events at or before this time (a date means the end of that day).
typesarrayOnly these event types, e.g. lead_added, lead_status_changed, entity_responsible_changed, common_note_added, incoming_chat_message, outgoing_chat_message, incoming_call, outgoing_call, task_added, tas…

kommo_get_lead_timeline Get lead timeline

Get the history of one lead, newest first, one page at a time: stage and owner changes, field changes, links, tags, notes (with their text), chat messages, calls and tasks. 2 requests: GET /api/v4/events for the lead, then GET /api/v4/leads/notes for the text of the notes on the page.

ParameterTypeDescription
lead_id *integerNumeric Kommo id.
fromOnly events at or after this time.
limitintegerEvents per page (max 100; default 50).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
toOnly events at or before this time (a date means the end of that day).
typesarrayOnly these event types, e.g. lead_added, lead_status_changed, entity_responsible_changed, common_note_added, incoming_chat_message, outgoing_chat_message, incoming_call, outgoing_call, task_added, tas…

kommo_get_pipeline_brief Get pipeline brief

Summarise one pipeline from its leads: count and total value per stage, open, won and lost totals, and the 10 open leads with the oldest last change (days_idle). A new task on a lead counts as a change; a new note does not. Reads up to 2,000 leads (8 pages of 250, one after another); complete is false when there are more. GET /api/v4/leads/pipelines/{id} and GET /api/v4/leads.

ParameterTypeDescription
pipeline_id *integerPipeline id (see kommo_list_pipelines).

kommo_list_stagnant_leads List stagnant leads

List open leads with no change for at least `days` days, oldest change first, with days_idle. A new task on a lead counts as a change; a new note does not. Reads up to 4 pages of 250 leads (one after another) and skips won and lost leads. GET /api/v4/leads.

ParameterTypeDescription
daysintegerDays without a change (default 14).
limitintegerLeads to return (default 25, max 50).
pipeline_idintegerOnly this pipeline.
responsible_user_idintegerOnly leads of this owner.

kommo_read_messages Read messages

Read the messages of one conversation (talk_id from kommo_list_conversations), one page at a time: direction, author, text, time, delivery status and attachments. Kommo plans Trial, Pro and Enterprise only. GET /api/v4/talks/{id}/messages.

ParameterTypeDescription
conversation_id *integerNumeric Kommo id.
fromOnly messages at or after this time.
limitintegerEntities per page (max 250; default 50).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
toOnly messages at or before this time (a date means the end of that day).

kommo_list_unanswered_conversations List unanswered conversations

List open conversations that wait for a reply: the client wrote last. Oldest first, with the client's last message and minutes waiting. Reads up to 250 open conversations, then checks the messages of the last 7 days of the 10 with the oldest update (1 request each, one after another). client_wrote_last is null when the direction is unclear. more_open = true: more open conversations exist than were read. GET /api/v4/talks, then GET /api/v4/talks/{id}/messages.

ParameterTypeDescription
lead_idintegerOnly conversations of this lead.

kommo_send_message Send message

WRITE: sends a message to the client in an open conversation, in its channel (WhatsApp, Instagram, ...). The client sees it at once: show the exact text to the user and ask before sending. Optional one file from Kommo Drive (kommo_list_files). Kommo counts sends per month (Trial 100, Pro and Enterprise 500). POST /api/v4/talks/{id}/send_message.

ParameterTypeDescription
conversation_id *integerNumeric Kommo id.
text *stringMessage text.
attachmentobject

kommo_list_chat_templates List chat templates

List the reply templates of chats: text, buttons, and for WhatsApp templates the category, language and moderation state (reviews). GET /api/v4/chats/templates.

ParameterTypeDescription
limitintegerTemplates per page (max 50; default 25).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…

kommo_create_chat_template Create chat template

WRITE (administrator token): creates one reply template of chats, plain or for WhatsApp (category, language, footer, header, examples). Ask the user first. A WhatsApp template must then go to Meta moderation with kommo_submit_template_review. POST /api/v4/chats/templates.

ParameterTypeDescription
content *stringTemplate text. WhatsApp variables: {{1}}, {{2}}, ...
name *stringTemplate name.
buttonsarrayButtons; url buttons need url.
whatsappobjectMake it a WhatsApp (waba) template.

kommo_submit_template_review Submit template review

WRITE: sends a WhatsApp template (from kommo_list_chat_templates) to Meta moderation. Ask the user first: Meta reviews it and the template cannot be edited while in review. POST /api/v4/chats/templates/{id}/review.

ParameterTypeDescription
template_id *integerNumeric Kommo id.

kommo_add_notes Add notes

WRITE: adds text notes to records of one type (1-250 notes in one request). Ask the user first. Creates new notes on every call. POST /api/v4/{entity}/notes.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.
notes *array

kommo_update_note Update note

WRITE: replaces the text of one text note (note_type common; ids from kommo_list_notes). Calls, messages and service notes cannot be changed. Ask the user first. PATCH /api/v4/{entity}/notes/{id}.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.
entity_id *integerId of the record that has the note.
note_id *integerNumeric Kommo id.
text *stringNew note text.

kommo_pin_note Pin note

WRITE: pins a note at the top of the record feed, or unpins it (pinned false). POST /api/v4/{entity}/notes/{id}/pin or /unpin.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.
note_id *integerNumeric Kommo id.
pinnedbooleantrue = pin (default), false = unpin.

kommo_create_leads Create leads

WRITE: creates 1-250 leads in one request, each with name, value, pipeline and stage, owner, custom fields, tags, and links to existing contacts and a company. With new_contact or new_company Kommo creates those too: then 1-50 leads, and no lead of that call may use contact_ids or company_id. If duplicate control is on in the account, Kommo may merge such a lead or contact into an existing one (merged: true in the result). Ask the user first. No other duplicate check. Keep one call under 10,000 values in all (records x fields x values): split a larger batch. POST /api/v4/leads, or POST /api/v4…

ParameterTypeDescription
leads *array

kommo_update_leads Update leads

WRITE: changes 1-250 leads in one request: name, value, stage (with the pipeline), loss reason (kommo_list_loss_reasons; for lost leads, stage 143), owner, custom fields, and tags to add or remove (other tags stay). Only the given fields change. Ask the user first. PATCH /api/v4/leads. Keep one call under 10,000 values in all (records x fields x values): split a larger batch.

ParameterTypeDescription
leads *array

kommo_create_contacts Create contacts

WRITE: creates 1-250 contacts in one request: name, phones, emails, owner, custom fields, tags. Ask the user first. No duplicate check: search with kommo_list_contacts first. POST /api/v4/contacts. Keep one call under 10,000 values in all (records x fields x values): split a larger batch.

ParameterTypeDescription
contacts *array

kommo_update_contacts Update contacts

WRITE: changes 1-250 contacts in one request: name, phones and emails (each list replaces all phones or emails of the contact), owner, custom fields, tags to add or remove. Only the given fields change. Ask the user first. PATCH /api/v4/contacts. Keep one call under 10,000 values in all (records x fields x values): split a larger batch.

ParameterTypeDescription
contacts *array

kommo_create_companies Create companies

WRITE: creates 1-250 companies in one request: name, phones, emails, owner, custom fields, tags. Ask the user first. No duplicate check: search with kommo_list_companies first. POST /api/v4/companies. Keep one call under 10,000 values in all (records x fields x values): split a larger batch.

ParameterTypeDescription
companies *array

kommo_update_companies Update companies

WRITE: changes 1-250 companies in one request: name, phones and emails (each list replaces all phones or emails of the company), owner, custom fields, tags to add or remove. Only the given fields change. Ask the user first. PATCH /api/v4/companies. Keep one call under 10,000 values in all (records x fields x values): split a larger batch.

ParameterTypeDescription
companies *array

kommo_create_tasks Create tasks

WRITE: creates 1-250 tasks in one request: text, due time, type, owner, and optionally a linked lead, contact or company. Ask the user first. No duplicate check. POST /api/v4/tasks.

ParameterTypeDescription
tasks *array

kommo_update_tasks Update tasks

WRITE: changes 1-250 tasks in one request: text, due time, type, owner, or completes a task with a result text (is_completed with result_text). Only the given fields change. Booking tasks cannot be changed. Ask the user first. PATCH /api/v4/tasks.

ParameterTypeDescription
tasks *array

kommo_search_products Search products

Search the product catalog by name or SKU, one page at a time: each product with SKU, price and description. Use the ids with kommo_set_lead_products. GET /api/v4/catalogs/{id}/elements.

ParameterTypeDescription
catalog_idintegerCatalog id (default: the account's products catalog).
limitintegerEntities per page (max 250; default 50).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
querystringName or SKU text.

kommo_create_product Create product

WRITE: adds one product to the catalog: name, SKU, price, description. Ask the user first. No duplicate check: search first. POST /api/v4/catalogs/{id}/elements.

ParameterTypeDescription
name *string
catalog_idintegerCatalog id (default: the account's products catalog).
descriptionstring
pricenumber
skustring

kommo_update_product Update product

WRITE: changes one product of the catalog: name, SKU, price, description. Only the given fields change. Ask the user first. PATCH /api/v4/catalogs/{id}/elements.

ParameterTypeDescription
product_id *integerNumeric Kommo id.
catalog_idintegerCatalog id (default: the account's products catalog).
descriptionstring
namestring
pricenumber
skustring

kommo_set_lead_products Set lead products

WRITE: adds catalog products to a lead with a quantity, or changes the quantity of a product the lead already has. Ask the user first. POST /api/v4/leads/{id}/link (to_entity_type catalog_elements).

ParameterTypeDescription
lead_id *integerNumeric Kommo id.
products *array
catalog_idintegerCatalog id (default: the account's products catalog).

kommo_remove_lead_products Remove lead products

WRITE: takes products off a lead (the products stay in the catalog). Ask the user first. POST /api/v4/leads/unlink.

ParameterTypeDescription
lead_id *integerNumeric Kommo id.
product_ids *arrayProduct ids.
catalog_idintegerCatalog id (default: the account's products catalog).

kommo_list_tags List tags

List the tags of leads, contacts or companies, optionally by part of the name. GET /api/v4/{entity}/tags.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.
limitintegerEntities per page (max 250; default 50).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
querystringPart of the tag name.

kommo_update_tags Update tags

WRITE: adds and removes tags on 1-250 leads, contacts or companies in one request; other tags of the records stay. A new tag name creates the tag. Ask the user first. PATCH /api/v4/{entity}.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.
records *array

kommo_list_incoming_leads List incoming leads

List incoming leads not yet accepted (the Incoming leads stage): uid, category (chats, forms, sip, mail), pipeline, lead and contact, and the request details (channel, form fields, caller). GET /api/v4/leads/unsorted.

ParameterTypeDescription
categoryarray
limitintegerEntities per page (max 250; default 50).
orderstringSort by creation time.
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
pipeline_idinteger

kommo_accept_incoming_lead Accept incoming lead

WRITE: accepts one incoming lead: it moves from Incoming leads to a stage of its pipeline (default: the first stage). Ask the user first. POST /api/v4/leads/unsorted/{uid}/accept.

ParameterTypeDescription
uid *stringuid of the incoming lead (kommo_list_incoming_leads).
status_idintegerTarget stage id.
user_idintegerUser who accepts (default: the token's user).

kommo_decline_incoming_leads Decline incoming leads

WRITE: declines 1-10 incoming leads (e.g. spam); Kommo deletes their leads. Ask the user first. One request per uid, one after another: DELETE /api/v4/leads/unsorted/{uid}/decline.

ParameterTypeDescription
confirm *booleanMust be true. Ask the user first: this cannot be undone.
uids *array
user_idinteger

kommo_log_call Log call

WRITE: records a call made outside Kommo. Kommo finds the contact by phone and adds a call note to it and its lead. Ask the user first. POST /api/v4/calls.

ParameterTypeDescription
direction *string
duration *integerDuration in seconds.
phone *stringThe client's phone number.
call_resultstringShort result text.
call_statusinteger1 left a message, 2 call back later, 3 not available, 4 talked (default), 5 wrong number, 6 no answer, 7 busy.
created_atCall time (default now).
linkstringLink to the recording.
responsible_user_idintegerOwner user id (see kommo_list_users).
sourcestringName of the phone system (default UsefulAPI).

kommo_list_files List files

List files of Kommo Drive (the Media section: attachments of chats, notes and records), by name: uuid, version_uuid, name, type, extension and size. Use the uuids with kommo_attach_files or kommo_send_message. GET {drive}/v1.0/files.

ParameterTypeDescription
limitintegerFiles per page (max 50; default 25).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…
querystringPart of the file name.

kommo_list_record_files List record files

List the Kommo Drive files attached to one lead, contact or company (file uuids). GET /api/v4/{entity}/{id}/files.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.
entity_id *integerNumeric Kommo id.

kommo_attach_files Attach files

WRITE: attaches Kommo Drive files to a lead, contact or company. Ask the user first. PUT /api/v4/{entity}/{id}/files.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.
entity_id *integerNumeric Kommo id.
file_uuids *arrayFile uuids (kommo_list_files).

kommo_detach_files Detach files

WRITE: detaches files from a lead, contact or company; the files stay in Kommo Drive. Ask the user first. DELETE /api/v4/{entity}/{id}/files.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.
entity_id *integerNumeric Kommo id.
file_uuids *arrayFile uuids (kommo_list_files).

kommo_list_salesbots List Salesbots

List the Salesbot bots of the account with their ids and names. GET /api/v4/bots.

ParameterTypeDescription
limitintegerEntities per page (max 250; default 50).
pageintegerPage number (default 1). Use _links.next in the result to see whether another page exists. If the result has _continue_with (a shortened page), call again with those arguments instead: then more rows…

kommo_run_salesbots Run Salesbots

WRITE: starts 1-100 Salesbot runs, each one bot on one lead or contact. A bot can message the client: ask the user first. POST /api/v4/bots/run (Kommo answers 202: accepted, not yet run).

ParameterTypeDescription
runs *array

kommo_stop_salesbot Stop Salesbot

WRITE: stops a running Salesbot on one lead. Kommo accepts the stop and applies it soon after (HTTP 202). Ask the user first. POST /api/v4/bots/{id}/stop.

ParameterTypeDescription
bot_id *integerNumeric Kommo id.
lead_id *integerNumeric Kommo id.

kommo_list_webhooks List webhooks

List the webhook subscriptions of the account: destination address, events and whether it is disabled. GET /api/v4/webhooks.

kommo_subscribe_webhook Subscribe webhook

WRITE (administrator token): subscribes an https address to Kommo events. Kommo then sends record data to that address: ask the user first. Repeating it with the same address replaces its events. POST /api/v4/webhooks.

ParameterTypeDescription
destination *stringhttps address that receives the events.
events *arrayEvents, e.g. add_lead, update_lead, status_lead, responsible_lead, delete_lead, add_contact, update_contact, add_company, add_task, update_task, note_lead, add_talk, update_talk, add_message.

kommo_unsubscribe_webhook Unsubscribe webhook

WRITE (administrator token): removes the webhook subscription of one address. Ask the user first. DELETE /api/v4/webhooks.

ParameterTypeDescription
confirm *booleanMust be true. Ask the user first: this cannot be undone.
destination *stringhttps address that receives the events.

kommo_create_pipeline Create pipeline

WRITE (administrator token): creates a lead pipeline with its open stages in order. Kommo adds the incoming, won (142) and lost (143) stages itself. Ask the user first. POST /api/v4/leads/pipelines.

ParameterTypeDescription
name *stringPipeline name.
stages *arrayOpen stages, in order.
incoming_leadsbooleanKeep the Incoming leads stage on (default true).
is_mainbooleanMake it the main pipeline (default false).
sortintegerPosition among pipelines (default 1000).

kommo_update_pipeline Update pipeline

WRITE (administrator token): renames a pipeline, makes it the main one, moves it, or switches its Incoming leads stage on or off. Ask the user first. PATCH /api/v4/leads/pipelines/{id}.

ParameterTypeDescription
pipeline_id *integerNumeric Kommo id.
incoming_leadsbooleanIncoming leads stage on or off.
is_mainboolean
namestring
sortinteger

kommo_delete_pipeline Delete pipeline

DELETE (administrator token): deletes a pipeline with its stages, for good. Kommo refuses a pipeline that still has leads, and the last pipeline. Ask the user first. DELETE /api/v4/leads/pipelines/{id}.

ParameterTypeDescription
confirm *booleanMust be true. Ask the user first: this cannot be undone.
pipeline_id *integerNumeric Kommo id.

kommo_delete_pipeline_stage Delete pipeline stage

DELETE (administrator token): deletes an open stage of a pipeline, for good. Kommo moves the leads of the stage to another stage. Ask the user first. DELETE /api/v4/leads/pipelines/{pipeline_id}/statuses/{status_id}.

ParameterTypeDescription
confirm *booleanMust be true. Ask the user first: this cannot be undone.
pipeline_id *integerNumeric Kommo id.
status_id *integerNumeric Kommo id.

kommo_delete_custom_field Delete custom field

DELETE (administrator token): deletes a custom field and its values in every record, for good. Ask the user first. DELETE /api/v4/{entity}/custom_fields/{id}.

ParameterTypeDescription
confirm *booleanMust be true. Ask the user first: this cannot be undone.
entity *stringEntity type: leads, contacts or companies.
field_id *integerNumeric Kommo id.

kommo_list_field_groups List field groups

List the field groups (tabs of the record card) of leads, contacts or companies, with the custom fields in each. GET /api/v4/{entity}/custom_fields/groups.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.

kommo_save_field_group Save field group

WRITE (administrator token): creates a field group (a tab of the card), or with group_id renames one, moves it, or sets the fields in it (field_ids replaces its field list). Ask the user first. POST or PATCH /api/v4/{entity}/custom_fields/groups.

ParameterTypeDescription
entity *stringEntity type: leads, contacts or companies.
field_idsarrayCustom field ids for the group.
group_idstringExisting group id (kommo_list_field_groups); omit to create.
namestring
sortinteger

kommo_delete_field_group Delete field group

DELETE (administrator token): deletes a field group; its fields stay. Ask the user first. DELETE /api/v4/{entity}/custom_fields/groups/{id}.

ParameterTypeDescription
confirm *booleanMust be true. Ask the user first: this cannot be undone.
entity *stringEntity type: leads, contacts or companies.
group_id *stringField group id (kommo_list_field_groups).

kommo_list_loss_reasons List loss reasons

List all loss reasons of leads with their ids (loss_reason_id of kommo_update_leads). GET /api/v4/leads/loss_reasons (one list, no pages).

kommo_save_loss_reason Save loss reason

WRITE (administrator token): creates a loss reason, or renames one (with loss_reason_id). Ask the user first. POST /api/v4/leads/loss_reasons or PATCH /api/v4/leads/loss_reasons/{id}.

ParameterTypeDescription
name *string
loss_reason_idintegerExisting id; omit to create.

kommo_delete_loss_reason Delete loss reason

DELETE (administrator token): deletes a loss reason, for good. Ask the user first. DELETE /api/v4/leads/loss_reasons/{id}.

ParameterTypeDescription
confirm *booleanMust be true. Ask the user first: this cannot be undone.
loss_reason_id *integerNumeric Kommo id.