Contacts
Update a contact
PATCH/v1/contacts/{id}
Requires an API key with the contacts:write scope. About keys and scopes
Merges the supplied fields into an existing contact; omitted fields are left alone, and attributes is merged key by key rather than replaced; a key set to null is removed (JSON Merge Patch). Agent keys cannot mutate contacts or consent and are refused with 403.
Path parameters
idstringrequireduuid
Request body
externalIdstring | nulloptionalYour own id for the contact, up to 255 characters. Identify matches on it first.
1–255 characters
emailstring | nulloptionalemail
firstNamestring | nulloptional1–100 characters
lastNamestring | nulloptional1–100 characters
phonestring | nulloptionalPhone number; normalised to E.164 (a leading
+and country code).timezonestring | nulloptionalIANA timezone, e.g.
Europe/London; used for send-time scheduling.up to 100 characters
countrystring | nulloptionalISO 3166-1 alpha-2 code. Omitted, it is inferred from the phone, else the timezone.
datesContactDatesInputoptionalNamed calendar dates, merged key by key;
nullremoves one.attributesobjectoptionalCustom attributes, merged key by key;
nullremoves one. At most 50 keys and 16 KB.emailConsentbooleanoptionalConsent to email. Omitted, the current value is kept.
pushConsentbooleanoptionalConsent to push. Omitted, the current value is kept.
consentStatementConsentStatementInputoptionalHow the contact agreed, recorded with any consent this request grants.
2 child attributes
basisstringrequiredThe legal basis the contacts agreed under.
one of
opted_in,existing_customerevidencestringrequiredWhere 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.
idstringrequireduuid
externalIdstring | nullrequiredYour own id for the contact, if set.
emailstring | nullrequiredemail
firstNamestring | nullrequiredlastNamestring | nullrequiredphonestring | nullrequiredPhone number in E.164 format.
timezonestring | nullrequiredIANA timezone, e.g.
Europe/London.countrystring | nullrequiredISO 3166-1 alpha-2 code: as written, or inferred from the phone, else the timezone.
datesobjectrequiredNamed calendar dates, e.g.
birthday, asYYYY-MM-DDor--MM-DD.attributesobjectrequiredCustom attributes, keyed by attribute name.
emailConsentbooleanrequiredWhether the contact has consented to email.
pushConsentbooleanrequiredWhether the contact has consented to push.
createdAtstringrequireddate-time
updatedAtstringrequireddate-time
emailSuppressionobjectrequired2 child attributes
suppressedbooleanrequiredWhether email to this contact is blocked.
reasonstring | nullrequiredWhy email to this contact is suppressed:
bounced,complained,complained_transactional,unsubscribed,manual,imported, orother_workspace(a bounce or complaint in another workspace with the same owner or partner).