Create or update a contact
Creates a new contact or updates an existing one. Contacts are matched by email address only — the email is the contact's unique identifier. external_id is stored but never used for matching, so sending an existing external_id with a new email address creates a second contact.
To change a contact's email address: upsert a contact with the new email and the full profile, re-create its list subscriptions (preserving unsubscribed/bounced/complained statuses — do not reset opt-outs), then delete the contact with the old email using contacts.delete. Message history and segment memberships are keyed to the email address and are not transferred.
Returns information about whether the contact was created or updated.
Request body
Example request
{
"workspace_id": "ws_1234567890",
"contact": {
"email": "user@example.com",
"external_id": "user_12345",
"timezone": "America/New_York",
"language": "en-US",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"phone": "+15551234567",
"address_line_1": "123 Main St",
"address_line_2": "Apt 4B",
"country": "US",
"postcode": "10001",
"state": "NY",
"job_title": "Software Engineer",
"custom_string_1": "Premium tier",
"custom_number_1": 42,
"custom_datetime_1": "2023-06-01T09:00:00Z",
"custom_json_1": {
"preferences": {
"theme": "dark",
"notifications": true
}
}
}
}Response
Contact upserted successfully
Example response
{
"email": "user@example.com",
"action": "create"
}Changes
Changed in 6 of the 25 revisions of this API.1510
- ●
removed the request property
contact/contact_listsrequest-property-removed
- ●
removed the request property
contact/contact_segmentsrequest-property-removed
- ●
removed the request property
contact/created_atrequest-property-removed
- ●
removed the request property
contact/updated_atrequest-property-removed
- ●
- ●
added the new
errorenum value to theactionresponse property for the response status200response-property-enum-value-added
- ○
added the new optional request property
contact/contact_segmentsnew-optional-request-property
- ○
added the new optional request property
contact/full_namenew-optional-request-property
- ○
added the optional property
errorto the response with the200statusresponse-optional-property-added
- ●
- ●
removed the optional property
contactfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
errorfrom the response with the200statusresponse-optional-property-removed
- ●
added the new
createenum value to theactionresponse property for the response status200response-property-enum-value-added
- ●
added the new
updateenum value to theactionresponse property for the response status200response-property-enum-value-added
- ○
added the optional property
emailto the response with the200statusresponse-optional-property-added
- ○
removed the
createdenum value from theactionresponse property for the response status200response-property-enum-value-removed
- ○
removed the
unchangedenum value from theactionresponse property for the response status200response-property-enum-value-removed
- ○
removed the
updatedenum value from theactionresponse property for the response status200response-property-enum-value-removed
- ●
- ●
removed the request property
contact/last_order_atrequest-property-removed
- ●
removed the request property
contact/lifetime_valuerequest-property-removed
- ●
removed the request property
contact/orders_countrequest-property-removed
- ●
removed the optional property
contact/last_order_atfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
contact/lifetime_valuefrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
contact/orders_countfrom the response with the200statusresponse-optional-property-removed
- ●
- ○
added the new optional request property
contact/contact_listsnew-optional-request-property
- ○
added the optional property
contact/contact_liststo the response with the200statusresponse-optional-property-added
- ○
- ○
endpoint added
endpoint-added
- ○