Create or update a profile
/profilesMatches by the first identifier present and only by that one: id if given, else external_id, else email. Creates the profile when nothing matches (201) and updates it otherwise (200). An external_id that no profile has is a new profile: it is never matched to the profile that has the email you sent, and if another profile already has that email the request is refused (409 email_taken). Fields you leave out are not changed.
Permission: profiles:write · on the API key screen: Profiles → Full access · All permissions
Body parameters
idstringMatch by profile id. If given and not found, the request fails (no fallback to email).
At most 2,000 characters.
external_idstring | nullYour own id for this person. Unique in the account.
At most 255 characters.
emailstring | nullAt most 254 characters.
first_namestring | nullAt most 255 characters.
last_namestring | nullAt most 255 characters.
phonestring | nullAt most 50 characters.
organizationstring | nullAt most 255 characters.
titlestring | nullAt most 255 characters.
addressobject | nullShow propertiesHide properties
streetstring | nullAt most 255 characters.
citystring | nullAt most 100 characters.
statestring | nullAt most 100 characters.
zipstring | nullAt most 20 characters.
custom_fieldsobjectKeys must be custom fields that exist in the account. null clears a field.
At most 100 keys.
tagsstring[]Added to the profile's tags; never removes one.
At most 50 items.
subscriptionstringWhat the person said about marketing email. Leave it out when you do not know: nothing is then changed, and a new profile is not emailable. 'subscribed' makes a new or never-subscribed profile emailable; it never undoes the person's own unsubscribe (the response then says confirmation_required). 'unsubscribed' always applies. See subscription_result in the response.
One of:
subscribedunsubscribedAt most 2,000 characters.
sms_subscriptionstringWhat the person said about marketing TEXT messages, separately from email. Send 'subscribed' only with their written consent to receive texts (US law requires it). Leave it out when you do not know: nothing is changed, and a new profile cannot be texted. 'subscribed' never undoes the person's own STOP or unsubscribe (the response then says refused). 'unsubscribed' always applies. Texts go to the profile's phone (US or Canadian mobile). See sms_subscription_result in the response.
One of:
subscribedunsubscribedAt most 2,000 characters.
consentobjectEvidence for
subscriptionandsms_subscription, stored with the consent record and shown on the profile's consent history. Ignored without either.Show propertiesHide properties
textstringThe wording the person agreed to.
At most 2,000 characters.
sourcestringWhere they agreed: a page, a form name, a system.
At most 100 characters.
obtained_atstringWhen they agreed, as you recorded it.
At most 2,000 characters.
Response
objectstringrequiredOne of:
profileAt most 2,000 characters.
idstringrequiredAt most 2,000 characters.
emailstring | nullrequiredAt most 100,000 characters.
email_subscriptionstringrequiredRead-only. Whether the person may be sent marketing email: only 'subscribed' may. 'never_subscribed' = no consent recorded; 'pending' = waiting for the person to confirm by email.
One of:
subscribedunsubscribedpendingnever_subscribedAt most 2,000 characters.
subscription_resultobjectOnly in the response to a write that sent
subscription: what became of it.Show propertiesHide properties
requestedstringrequiredOne of:
subscribedunsubscribedAt most 2,000 characters.
outcomestringrequiredOne of:
appliedunchangedconfirmation_requiredrefusedAt most 2,000 characters.
reasonstring | nullrequiredOne of:
unsubscribedsuppressedAt most 2,000 characters.
sms_subscription_resultobjectOnly in the response to a write that sent
sms_subscription: what became of it.Show propertiesHide properties
requestedstringrequiredOne of:
subscribedunsubscribedAt most 2,000 characters.
outcomestringrequiredOne of:
appliedunchangedrefusedAt most 2,000 characters.
reasonstring | nullrequiredOne of:
unsubscribedAt most 2,000 characters.
external_idstring | nullrequiredAt most 100,000 characters.
first_namestring | nullrequiredAt most 100,000 characters.
last_namestring | nullrequiredAt most 100,000 characters.
phonestring | nullrequiredAt most 100,000 characters.
organizationstring | nullrequiredAt most 100,000 characters.
titlestring | nullrequiredAt most 100,000 characters.
addressobjectrequiredShow propertiesHide properties
streetstring | nullrequiredAt most 100,000 characters.
citystring | nullrequiredAt most 100,000 characters.
statestring | nullrequiredAt most 100,000 characters.
zipstring | nullrequiredAt most 100,000 characters.
custom_fieldsobjectrequiredtagsstring[]requiredAt most 100000 items.
sourcestring | nullrequiredAt most 100,000 characters.
created_atstring | nullrequiredAt most 40 characters.
updated_atstring | nullrequiredAt most 40 characters.