Menu

Create or update a contact

POST/v1/contacts/identify

Requires an API key with the contacts:write scope. About keys and scopes

Upsert keyed on identity rather than id: the contact is resolved by externalId, then email, then phone, and created if none matches. Consent flags that are omitted keep their current value rather than resetting to false. attributes merge as on update: null removes a key. This is the endpoint to use for ingestion. Agent keys are refused with 403.

Request body

externalIdstring | nulloptional

Your own id for the contact, up to 255 characters. Identify matches on it first.

1–255 characters

emailstring | nulloptional

email

firstNamestring | nulloptional

1–100 characters

lastNamestring | nulloptional

1–100 characters

phonestring | nulloptional

Phone number; normalised to E.164 (a leading + and country code).

timezonestring | nulloptional

IANA timezone, e.g. Europe/London; used for send-time scheduling.

up to 100 characters

countrystring | nulloptional

ISO 3166-1 alpha-2 code. Omitted, it is inferred from the phone, else the timezone.

datesContactDatesInputoptional

Named calendar dates, merged key by key; null removes one.

attributesobjectoptional

Custom attributes, merged key by key; null removes one. At most 50 keys and 16 KB.

emailConsentbooleanoptional

Consent to email. Omitted, the current value is kept.

pushConsentbooleanoptional

Consent to push. Omitted, the current value is kept.

consentStatementConsentStatementInputoptional

How the contact agreed, recorded with any consent this request grants.

2 child attributes
basisstringrequired

The legal basis the contacts agreed under.

one of opted_in, existing_customer

evidencestringrequired

Where and how they agreed, e.g. "Checkout opt-in on shop.example.com".

1–500 characters

Returns

Returns 200 OK with a ContactDetail in data. Otherwise returns an error; Errors lists every code and which to retry.

  • 200 OKThe existing contact, updated.
  • 201 CreatedA new contact was created.
idstringrequired

uuid

externalIdstring | nullrequired

Your own id for the contact, if set.

emailstring | nullrequired

email

firstNamestring | nullrequired
lastNamestring | nullrequired
phonestring | nullrequired

Phone number in E.164 format.

timezonestring | nullrequired

IANA timezone, e.g. Europe/London.

countrystring | nullrequired

ISO 3166-1 alpha-2 code: as written, or inferred from the phone, else the timezone.

datesobjectrequired

Named calendar dates, e.g. birthday, as YYYY-MM-DD or --MM-DD.

attributesobjectrequired

Custom attributes, keyed by attribute name.

emailConsentbooleanrequired

Whether the contact has consented to email.

pushConsentbooleanrequired

Whether the contact has consented to push.

createdAtstringrequired

date-time

updatedAtstringrequired

date-time

emailSuppressionobjectrequired
2 child attributes
suppressedbooleanrequired

Whether email to this contact is blocked.

reasonstring | nullrequired

Why email to this contact is suppressed: bounced, complained, complained_transactional, unsubscribed, manual, imported, or other_workspace (a bounce or complaint in another workspace with the same owner or partner).