v1

latestOpenAPI 3.0.12026-07-24116117186.3 KB
Contacts

Add/update contacts

The method adds new contacts and updates existing contacts. Asynchronous processing is used; requests may be handled in a different order or concurrently.

post/api/v1/contacts

Request body

dedupeOn'email' | 'sms' | 'push' | 'email_or_sms' | 'id' | 'externalCustomerId' | 'fieldId' required

The field for determining the contact uniqueness. <b>Important</b> the field set as <b>dedupeOn</b> will not be updated

fieldIdinteger

The field for determining the contact uniqueness. This field is taken into account when dedupeOnProperty has the fieldId value.

contactFieldsstring[]

The list of contacts’ fields to be updated. All the contact fields will be updated if this parameter is not specified. The fields will be updated with the ‘null’ value if no data for updating is transmitted.

customFieldsIDsinteger[]

The list of the custom field IDs to be updated.<br> The custom fields are updated if their IDs are in this list.<br> This field is required when a contact is updated

groupNamesstring[]

The list of the segment names where the new/updated contacts will be added to.

groupNamesExcludestring[]

The list of the segment names where the new/updated contacts will be excluded from.

restoreDeletedboolean

Choose either to restore the previously deleted contacts or not.

eventKeyForNewContactsstring

The event type identification key. An event of corresponding type is generated for each contact. <br> If the system does not have an event type with such a key, a new event type is created. <br> All characters are allowed, except < ; ’ \ / | " ` ' ^ ? ! , > <br> Max length: 100 symbols

Example request

{
  "contacts": [
    {
      "firstName": "John",
      "lastName": "Smith",
      "channels": [
        {
          "device": {
            "appId": "83b77a49-fc28-409b-aeaa-68c9d544ab9d",
            "deviceModel": "iPhone 16 Pro",
            "os": "iOS",
            "locale": "en_UK",
            "clientVersion": "1.6.8",
            "appVersion": "1.23.45"
          }
        }
      ],
      "address": {
        "region": "Occitanie",
        "town": "Toulouse",
        "address": "Rue Imaginaire, 456",
        "postcode": "31000",
        "countryCode": "FR"
      },
      "fields": [
        {
          "id": 79814,
          "value": "textfield"
        }
      ],
      "addressBookId": 7200,
      "id": 23456789,
      "externalCustomerId": "TV12790",
      "groups": [
        {
          "id": 200400
        }
      ],
      "languageCode": "en",
      "timeZone": "Europe/London",
      "marketId": "kyiv"
    }
  ]
}