Skip to main content

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.

product_idProduct Idrequired

ID of the product the lead will belong to. Required.

stage_idStage Idrequired

ID of the initial pipeline stage. Required.

stage_set_at object

Optional override for when the lead entered the stage; defaults to now.

anyOf
date-time
name object

Optional display name.

anyOf
string
crm_id object

Identifier of the matching record in the connected external CRM, if any.

anyOf
string
crm_fields object

Optional initial CRM key/value attributes.

property name* object
anyOf
string
is_testIs Test

Create the lead as a test lead (excluded from production metrics).

Default value: false
batch_name object

Optional batch label.

anyOf
string
timezone object

Optional IANA timezone used for scheduling.

anyOf
string
status object

Optional free-form status string.

anyOf
string
is_activeIs Active

Whether the lead starts active. Defaults to true.

Default value: true
from_crm_integration_id object

If set, the lead is registered as imported from this CRM integration (must exist).

anyOf
integer
from_pipeline_id object

Optional source CRM pipeline identifier.

anyOf
string
contacts object[]required

The contacts to attach to the new lead.

  • Array [
  • contactContactrequired

    The contact value — a phone number, username, chat id, or email depending on contact_type.

    contact_typeContactTyperequired

    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.

    anyOf
    string

    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).

    anyOf
    string
    channel_vendor object

    Optional messaging-provider vendor the address is pinned to.

    anyOf
    string

    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]

    is_mainIs Main

    Whether this is the lead's primary contact.

    Default value: false
    crm_id object

    Identifier of the matching record in the connected external CRM, if any.

    anyOf
    string
    contact_sourceContactSource

    Possible values: [custom_field, default_field, derived_title, api, unknown]

    Default value: unknown
    source_name object
    anyOf
    string
    skip_routingSkip Routing

    When true, the contact is excluded from automatic outreach routing.

    Default value: false
  • ]
  • deduplicate_contactsDeduplicate Contacts

    When true (default), the request is rejected with 409 if it contains duplicate contacts or contacts that already exist in the product.

    Default value: true
    LeadWithContactsCreate
    {
    "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
    }