Contacts
Export a contact's data
GET/v1/contacts/{id}/data-export
Requires an API key with the contacts:read scope. About keys and scopes
Everything held about one contact, for answering a right-of-access request: profile, consent history, events, messages, groups, segments, topics, journeys, push devices (without tokens), form submissions, conversions and suppressions. Data past the retention periods is no longer held, so it is not included. The response is streamed as it is read, so a long history arrives without a length. Each export is recorded in the audit log. Owners and admins in the dashboard; contacts:read over the API.
Path parameters
idstringrequireduuid
Returns
Returns 200 OK with a ContactDataExport in data. Otherwise returns an error; Errors lists every code and which to retry.
exportedAtstringrequiredWhen this export was produced.
date-time
contactContactDetailrequired15 child attributes
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).
consentHistoryobject[]required13 child attributes
idstringrequireduuid
channelstring | nullrequiredThe channel consented to. With
topicIdnull: consent to the channel; with both set: a per-channel topic choice.one of
email,pushtopicIdstring | nullrequiredThe topic consented to, if any.
uuid
grantedbooleanrequiredTrue for a grant, false for a withdrawal.
sourcestringrequiredone of
dashboard,api,import,form,unsubscribe,system,sdksourceIdstring | nullrequiredThe form, when
sourceisform.uuid
actorTypestringrequiredone of
user,api_key,contact,systemactorIdstring | nullrequiredMember or API key id; null for the contact themselves and the system.
uuid
ipstring | nullrequiredIP address the change came from.
reasonstring | nullrequiredWhy it changed, when one was given.
basisstring | nullrequiredHow the person agreed, as the workspace stated it; null when nobody did.
one of
opted_in,existing_customerevidencestring | nullrequiredWhere and how they agreed, as stated.
occurredAtstringrequireddate-time
eventsobject[]required4 child attributes
idstringrequireduuid
eventNamestringrequiredpropertiesobjectrequiredoccurredAtstringrequireddate-time
messagesobject[]required12 child attributes
idstringrequireduuid
campaignIdstring | nullrequireduuid
channelstringrequiredone of
email,pushmessageTypestringrequiredone of
marketing,transactionalstatusstringrequiredone of
queued,sending,skipped,sent,failed,delivered,bounced,complainedrecipientAddressstring | nullrequiredThe address or device it was sent to.
sentAtstring | nullrequireddate-time
deliveredAtstring | nullrequireddate-time
openedAtstring | nullrequireddate-time
clickedAtstring | nullrequireddate-time
unsubscribedAtstring | nullrequireddate-time
createdAtstringrequireddate-time
groupsobject[]required3 child attributes
idstringrequireduuid
namestringrequiredaddedAtstringrequireddate-time
segmentsobject[]required3 child attributes
idstringrequireduuid
namestringrequiredenteredAtstringrequireddate-time
topicsobject[]required4 child attributes
idstringrequireduuid
namestringrequiredsubscribedbooleanrequiredWhether the contact is subscribed to the topic.
updatedAtstringrequireddate-time
journeysobject[]required5 child attributes
idstringrequireduuid
namestringrequiredstatusstringrequiredone of
active,completed,exitedenrolledAtstringrequireddate-time
completedAtstring | nullrequireddate-time
pushDevicesobject[]required5 child attributes
kindstringrequiredone of
apns_token,fcm_token,web_push_subscriptionpermissionstringrequiredNotification permission on the device.
one of
granted,deniedactivebooleanrequiredWhether the device can still receive push.
lastSeenAtstringrequireddate-time
createdAtstringrequireddate-time
formSubmissionsobject[]required6 child attributes
formIdstringrequireduuid
formNamestringrequiredoutcomestringrequiredone of
created,updated,honeypot,pendingcreatedAtstringrequireddate-time
confirmedAtstring | nullrequireddate-time
pendingContactobject | nullrequiredWhat an unconfirmed signup entered, held until confirmed or for 7 days.
conversionsobject[]required3 child attributes
goalIdstringrequireduuid
valuenumber | nullrequiredValue recorded with the conversion, if any.
convertedAtstringrequireddate-time
suppressionsobject[]required4 child attributes
channelstringrequiredone of
email,pushaddressstring | nullrequiredSet when the block is on the address itself, not the contact.
reasonstringrequiredWhy the channel is blocked.
createdAtstringrequireddate-time