create_lead
Create a new lead in Kommo with a name, price, tags, and pipeline stage. Missing tags are created automatically; returns the new lead object.
Instructions
Create one lead in Kommo. Not idempotent: each call creates a new lead. Tag names that do not exist yet are created automatically. Returns the created lead object. To create the contact and company in the same call, use create_lead_complex.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Lead name (title of the deal). | |
| tags | No | Tag names to attach, e.g. ["vip", "web"]. Created if missing. | |
| price | No | Deal value in the account currency, e.g. 1500. | |
| stage_id | No | Stage (status) to place the lead in. Get IDs from list_stages. Omit for the first stage of the pipeline. | |
| pipeline_id | No | Pipeline to create the lead in. Get IDs from list_pipelines. Omit to use the account default. | |
| responsible_user_id | No | Kommo user ID to assign as owner. Omit for the default user. | |
| custom_fields_values | No | Lead custom field values in Kommo API v4 format: a list of objects, each addressing a field by `field_id` (from list_custom_fields) or by system `field_code`, plus `values`: [{value}] (select-type fields also take enum_id or enum_code). Example: [{"field_id": 123456, "values": [{"value": "Website"}]}]. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Lead ID. | |
| name | No | Lead name. | |
| price | No | Lead budget. | |
| _links | No | HAL links as returned by Kommo (self, next, ...). | |
| group_id | No | ID of the responsible user's group. | |
| _embedded | No | Embedded tags, contacts and companies. | |
| closed_at | No | Closing time, Unix seconds, or null. | |
| status_id | No | Current stage ID. | |
| account_id | No | Kommo account ID. | |
| created_at | No | Creation time, Unix seconds. | |
| created_by | No | ID of the user who created it. | |
| is_deleted | No | Whether the lead is deleted. | |
| updated_at | No | Last update time, Unix seconds. | |
| updated_by | No | ID of the user who last updated it. | |
| pipeline_id | No | Pipeline ID. | |
| loss_reason_id | No | Loss reason ID, or null. | |
| closest_task_at | No | Next task deadline, Unix seconds, or null. | |
| responsible_user_id | No | ID of the responsible Kommo user. | |
| custom_fields_values | No | Custom field values in Kommo format: objects with field_id, field_code and values. |