Export a contact's data
GET/v1/contacts/{id}/export
Requires an API key with the contacts:read scope. About keys and scopes
Works with integration, agent and partner keys.
Returns everything held about one contact, for answering a right-of-access request: profile, consent changes, events, messages, lists, 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.
Path parameters
idstringrequiredKirora's id for the contact, your own with
idType=externalId, or its email address withidType=email, URL-encoded (@as%40).1–255 characters
Query parameters
idTypestringoptionalWhat
{id}is: Kirora's id for the contact (id, the default), your own (externalId, as set with identify) or its email address (email, matched trimmed and without case).one of
id,externalId,email· default"id"
Header parameters
Kirora-WorkspacestringoptionalPartner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.
pattern
^[A-Za-z0-9._:-]{1,128}$
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
contactContactDetailrequired17 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.
localestring | nullrequiredBCP 47 tag (
fr,fr-CA): the language the contact reads (its first subtag), and how merge tags format numbers, dates and money for them.rfmobject | nullrequiredThe contact's RFM (recency, frequency and monetary value) group among the workspace's customers, from its purchase events (the workspace's
purchaseEvent: an order, a paid invoice, a booking, a donation), each score from 1 to 5 (a fifth of the customers each; 5 is the most recent, most frequent or highest spend), and their purchase totals. Spend counts only purchases in the workspace's main currency; when the purchase carries no amount,monetaryfollows frequency. Recomputed daily, so a purchase today shows tomorrow;nullfor someone who has never purchased.7 child attributes
groupstringrequiredone of
champions,loyal,cant_lose_them,potential_loyalists,new_customers,need_attention,about_to_sleep,at_risk,hibernating,lostrecencyintegerrequiredmin 1 · max 5
frequencyintegerrequiredmin 1 · max 5
monetaryintegerrequiredmin 1 · max 5
purchaseCountintegerrequiredTheir purchase events (the workspace's
purchaseEvent), in any currency.min > 0
totalSpentobject | nullrequiredWhat their purchases' amounts (
purchaseValueProperty) add up to, in the workspace's main currency (currencyonGET /v1/reports/rfm); purchases in other currencies and refunds are left out.nullwhen the purchase carries no amount.2 child attributes
currencystring | nullrequiredThe currency, an ISO 4217 code; null when none was named.
valuenumberrequiredThe amount in that currency.
lastPurchasedAtstringrequiredWhen their latest purchase happened.
date-time
datesmap<string, string>requiredNamed calendar dates, e.g.
birthday, asYYYY-MM-DDor--MM-DD.attributesmap<string, object>requiredCustom attributes, keyed by attribute name.
consentContactConsentrequiredConsent on each channel.
2 child attributes
emailbooleanrequiredWhether the contact has consented to email.
pushbooleanrequiredWhether 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).
listIdsstring[]requiredIds of the lists the contact is in.
consentChangesobject[]required15 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.
consentedAtstring | nullrequiredWhen they agreed, as stated; null means at
occurredAt.date-time
wordingstring | nullrequiredThe words they agreed to, as stated.
occurredAtstringrequireddate-time
eventsobject[]required4 child attributes
idstringrequireduuid
eventNamestringrequiredpropertiesmap<string, any>requiredoccurredAtstringrequireddate-time
messagesobject[]required12 child attributes
idstringrequireduuid
campaignIdstring | nullrequireduuid
channelstringrequiredone of
email,pushmessageTypestringrequiredone of
marketing,transactionalstatusstringrequiredone of
queued,sending,skipped,sent,failed,delivered,bounced,complainedrecipientEmailstring | nullrequiredThe email address it went to;
nullfor push.sentAtstring | nullrequireddate-time
deliveredAtstring | nullrequireddate-time
openedAtstring | nullrequireddate-time
clickedAtstring | nullrequireddate-time
unsubscribedAtstring | nullrequireddate-time
createdAtstringrequireddate-time
listsobject[]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
journeyIdstring | nullrequiredNull once the journey has been deleted.
uuid
journeyNamestring | nullrequiredNull once the journey has been deleted.
statusstringrequiredone of
active,completed,exitedenteredAtstringrequireddate-time
endedAtstring | 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,pending,expiredcreatedAtstringrequireddate-time
confirmedAtstring | nullrequireddate-time
pendingContactmap<string, any> | nullrequiredWhat an unconfirmed signup entered, held until confirmed or for 7 days.
conversionsobject[]required3 child attributes
conversionGoalIdstringrequireduuid
valueobject | nullrequiredValue recorded with the conversion, in its conversion goal's currency, if any.
2 child attributes
currencystring | nullrequiredThe currency, an ISO 4217 code; null when none was named.
valuenumberrequiredThe amount in that currency.
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