LeadWithContactsCreate
Payload to create a lead together with its contacts in a single atomic call.
lead objectrequired
Payload for creating or replacing a lead. Unknown fields are rejected.
ID of the product the lead will belong to. Required.
ID of the initial pipeline stage. Required.
stage_set_at object
Optional override for when the lead entered the stage; defaults to now.
- date-time
- null
name object
Optional display name.
- string
- null
crm_id object
Identifier of the matching record in the connected external CRM, if any.
- string
- null
crm_fields object
Optional initial CRM key/value attributes.
property name* object
- string
- integer
- number
- boolean
- string[]
- object
Create the lead as a test lead (excluded from production metrics).
falsebatch_name object
Optional batch label.
- string
- null
timezone object
Optional IANA timezone used for scheduling.
- string
- null
status object
Optional free-form status string.
- string
- null
Whether the lead starts active. Defaults to true.
truefrom_crm_integration_id object
If set, the lead is registered as imported from this CRM integration (must exist).
- integer
- null
from_pipeline_id object
Optional source CRM pipeline identifier.
- string
- null
contacts object[]required
The contacts to attach to the new lead.
The contact value — a phone number, username, chat id, or email depending on contact_type.
The kind of address — phone, username, chat_id, or email.
Possible values: [phone, username, chat_id, email]
channel_type object
Messaging platform the address belongs to. Required for username and chat_id contacts.
- string
- null
Possible values: [telegram, whatsapp, waba, max, viber, instagram, fasttrack, usedesk, salebot, avito, vk, yandex_messenger, email, sms, pinbox, linkedin, amocrm_salesbot, bitrix24_openlines, sip, webrtc, bothelp]
ext_channel_id object
Optional binding to a specific external channel (e.g. pin a chat_id to one bot).
- string
- null
channel_vendor object
Optional messaging-provider vendor the address is pinned to.
- string
- null
Possible values: [wazzup24, self_wz, chatpush, greenapi, wappi, chatapp, yandex_messenger, salebot, bothelp, radist, fasttrack, usedesk, amocrm_salesbot, bitrix24_openlines, twilio, mail.ru, gmail, pinbox, unipile, voice]
Whether this is the lead's primary contact.
falsecrm_id object
Identifier of the matching record in the connected external CRM, if any.
- string
- null
Possible values: [custom_field, default_field, derived_title, api, unknown]
unknownsource_name object
- string
- null
When true, the contact is excluded from automatic outreach routing.
falseWhen true (default), the request is rejected with 409 if it contains duplicate contacts or contacts that already exist in the product.
true{
"lead": {
"product_id": 0,
"stage_id": 0,
"stage_set_at": "2024-07-29T15:51:28.071Z",
"name": "string",
"crm_id": "string",
"crm_fields": {},
"is_test": false,
"batch_name": "string",
"timezone": "string",
"status": "string",
"is_active": true,
"from_crm_integration_id": 0,
"from_pipeline_id": "string"
},
"contacts": [
{
"contact": "string",
"contact_type": "phone",
"channel_type": "telegram",
"ext_channel_id": "string",
"channel_vendor": "wazzup24",
"is_main": false,
"crm_id": "string",
"contact_source": "unknown",
"source_name": "string",
"skip_routing": false
}
],
"deduplicate_contacts": true
}