Skip to main content

ContactRequestDTO

Write-variant of ContactDTO — used inside a LeadCreateRequestDTO contacts[] item to create or update a single contact.

Create vs. update. id is the discriminator: omit it to create a new contact, provide it to update the existing one.

Tri-state per key. Unlike the read-variant ContactDTO, no property is required here — every key is interpreted by its presence: omitted → the attribute is left unchanged; present with a value → updated; explicit null → cleared. (When creating a contact, name and phones are effectively required.)

The fields[] items follow the same tri-state rules — see FieldValueRequestDTO.

idint64

Contact ID. Omit to create a new contact, provide to update an existing one.

Example: 1001
namestringnullable

Contact name. Required when creating.

Example: John Doe
fields object[]nullable

Contact custom field values.

  • Array [
  • idint64required

    CRM field identifier this value belongs to. Always required.

    Example: 1
    valuestringnullable

    Simple value (as text)

    Example: VIP
    valueListstring[]nullable

    Multiple values (for multi-select fields).

    Example: ["VIP","New"]
    valueTypeValueType

    Field value type enum.

    Possible values: [STREET, DISTRICT, DEFAULT]

    Default value: DEFAULT
    Example: DEFAULT
    typestringnullable

    Field type (lowercased, e.g. text, select)

    Example: select
    infoTypeInfoType

    Which entity a field/value belongs to.

    • LED — the lead
    • CONTACT — the contact

    Possible values: [LED, CONTACT]

    Example: LED
    longitudedoublenullable

    Geo coordinate: longitude (for location fields)

    Example: 69.2401
    latitudedoublenullable

    Geo coordinate: latitude (for location fields)

    Example: 41.2995
    numbernumbernullable

    Value for NUMBER fields. Required (directly or via the value fallback) when the field's type is NUMBER.

    Example: 1500.5
    currencyIdint64nullable

    Currency ID. Required when the NUMBER field's format is CURRENCY.

    Example: 24
  • ]
  • typeContactType

    Contact type enum.

    Possible values: [SIMPLE, TELEGRAM, INSTAGRAM, WEBSITE, FACEBOOK, OTHER, CALL_PBX, MARKETPLACE, GOOGLE_SHEETS, WEB_FORM, WAZZUP, AMO_CRM, TELEGRAM_BUSINESS]

    Default value: SIMPLE
    Example: TELEGRAM
    accountIdstringnullable

    Account ID (if available)

    Example: acc123
    usernamestringnullable

    Username

    Example: johndoe
    phonesstring[]nullable

    Phone numbers. Required (non-empty) when creating.

    Example: ["+998901234567"]
    receiverIdstringnullable

    Receiver ID (if available)

    Example: rec123
    ContactRequestDTO
    {
    "id": 1001,
    "name": "John Doe",
    "fields": [
    {
    "id": 1,
    "value": "VIP",
    "valueList": [
    "VIP",
    "New"
    ],
    "valueType": "DEFAULT",
    "type": "select",
    "infoType": "LED",
    "longitude": 69.2401,
    "latitude": 41.2995,
    "number": 1500.5,
    "currencyId": 24
    }
    ],
    "type": "TELEGRAM",
    "accountId": "acc123",
    "username": "johndoe",
    "phones": [
    "+998901234567"
    ],
    "receiverId": "rec123"
    }