Skip to main content

ContactSyncRequest

contacts object[]required

An empty string counts as absent.

Possible values: >= 1, <= 500

  • Array [
  • ref objectrequired

    Who the person is on the site — the link that finds the same contact even after a change of number.

    kindstringrequired

    wp_user: a WordPress user. wc_customer: a WooCommerce customer. wc_guest: a purchase without an account. lead: someone known only by a form or a cart.

    Possible values: [wp_user, wc_customer, wc_guest, lead]

    idstringrequired

    The person's id on the site. Someone without an account (wc_guest, lead) goes by the sha256 of their e-mail.

    Possible values: non-empty and <= 191 characters

    Example: 42
    phonestringnullable

    In any format; it is normalized to E.164. Without the country code, country or options.defaultCountry applies.

    Possible values: <= 40 characters

    countrystringnullable

    Country of the billing address (ISO 3166 alpha-2) — it is how a number typed without its country code is read.

    Possible values: >= 2 characters and <= 2 characters

    firstNamestringnullable

    Possible values: <= 80 characters

    lastNamestringnullable

    Possible values: <= 80 characters

    emailstringnullable

    Possible values: <= 254 characters

    localestringnullable

    Possible values: Value must match regular expression ^[a-z]{2}(-[A-Z]{2})?$

    Example: pt-BR
    attributes object

    Custom fields, by key. They only fill what is empty — except the fields the site computes itself, which overwrite.

    property name*any

    Custom fields, by key. They only fill what is empty — except the fields the site computes itself, which overwrite.

    tagsstring[]

    Names of tags to add. Missing ones are created.

    Possible values: <= 20

    removeTagsstring[]

    Names of tags to take off the contact.

    Possible values: <= 20

    consent object

    The consent the person gave or withdrew on the site. An opt-out always applies; an opt-in only moves a contact from unknown to opted_in, never over an opt-out or a suppression.

    oneOf
    statusstringrequired

    Possible values: [opted_in]

    evidencestringrequired

    What the person agreed to and where: the ticked box's text, the order, the site.

    Possible values: >= 3 characters and <= 500 characters

    atstring<date-time>

    When the person agreed.

    occurredAtstring<date-time>required

    When the site read these values — it is what orders two snapshots of the same person.

  • ]
  • options object
    triggersboolean

    true starts flows and sends webhooks for what changed. false, for a backfill, fires nothing.

    Default value: false
    defaultCountrystring

    Country used for phones without a country code, when the row has no country.

    Possible values: >= 2 characters and <= 2 characters

    ContactSyncRequest
    {
    "contacts": [
    {
    "ref": {
    "kind": "wp_user",
    "id": "42"
    },
    "phone": "string",
    "country": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "locale": "pt-BR",
    "attributes": {},
    "tags": [
    "string"
    ],
    "removeTags": [
    "string"
    ],
    "consent": {
    "status": "opted_in",
    "evidence": "string",
    "at": "2024-07-29T15:51:28.071Z"
    },
    "occurredAt": "2024-07-29T15:51:28.071Z"
    }
    ],
    "options": {
    "triggers": false,
    "defaultCountry": "string"
    }
    }