Export a contact's dataMenu

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

idstringrequired

Kirora's id for the contact, your own with idType=externalId, or its email address with idType=email, URL-encoded (@ as %40).

1–255 characters

Query parameters

idTypestringoptional

What {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-Workspacestringoptional

Partner 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.

exportedAtstringrequired

When this export was produced.

date-time

contactContactDetailrequired
17 child attributes
idstringrequired

uuid

externalIdstring | nullrequired

Your own id for the contact, if set.

emailstring | nullrequired

email

firstNamestring | nullrequired
lastNamestring | nullrequired
phonestring | nullrequired

Phone number in E.164 format.

timezonestring | nullrequired

IANA timezone, e.g. Europe/London.

countrystring | nullrequired

ISO 3166-1 alpha-2 code: as written, or inferred from the phone, else the timezone.

localestring | nullrequired

BCP 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 | nullrequired

The 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, monetary follows frequency. Recomputed daily, so a purchase today shows tomorrow; null for someone who has never purchased.

7 child attributes
groupstringrequired

one of champions, loyal, cant_lose_them, potential_loyalists, new_customers, need_attention, about_to_sleep, at_risk, hibernating, lost

recencyintegerrequired

min 1 · max 5

frequencyintegerrequired

min 1 · max 5

monetaryintegerrequired

min 1 · max 5

purchaseCountintegerrequired

Their purchase events (the workspace's purchaseEvent), in any currency.

min > 0

totalSpentobject | nullrequired

What their purchases' amounts (purchaseValueProperty) add up to, in the workspace's main currency (currency on GET /v1/reports/rfm); purchases in other currencies and refunds are left out. null when the purchase carries no amount.

2 child attributes
currencystring | nullrequired

The currency, an ISO 4217 code; null when none was named.

valuenumberrequired

The amount in that currency.

lastPurchasedAtstringrequired

When their latest purchase happened.

date-time

datesmap<string, string>required

Named calendar dates, e.g. birthday, as YYYY-MM-DD or --MM-DD.

attributesmap<string, object>required

Custom attributes, keyed by attribute name.

consentContactConsentrequired

Consent on each channel.

2 child attributes
emailbooleanrequired

Whether the contact has consented to email.

pushbooleanrequired

Whether the contact has consented to push.

createdAtstringrequired

date-time

updatedAtstringrequired

date-time

emailSuppressionobjectrequired
2 child attributes
suppressedbooleanrequired

Whether email to this contact is blocked.

reasonstring | nullrequired

Why email to this contact is suppressed: bounced, complained, complained_transactional, unsubscribed, manual, imported, or other_workspace (a bounce or complaint in another workspace with the same owner or partner).

listIdsstring[]required

Ids of the lists the contact is in.

consentChangesobject[]required
15 child attributes
idstringrequired

uuid

channelstring | nullrequired

The channel consented to. With topicId null: consent to the channel; with both set: a per-channel topic choice.

one of email, push

topicIdstring | nullrequired

The topic consented to, if any.

uuid

grantedbooleanrequired

True for a grant, false for a withdrawal.

sourcestringrequired

one of dashboard, api, import, form, unsubscribe, system, sdk

sourceIdstring | nullrequired

The form, when source is form.

uuid

actorTypestringrequired

one of user, api_key, contact, system

actorIdstring | nullrequired

Member or API key id; null for the contact themselves and the system.

uuid

ipstring | nullrequired

IP address the change came from.

reasonstring | nullrequired

Why it changed, when one was given.

basisstring | nullrequired

How the person agreed, as the workspace stated it; null when nobody did.

one of opted_in, existing_customer

evidencestring | nullrequired

Where and how they agreed, as stated.

consentedAtstring | nullrequired

When they agreed, as stated; null means at occurredAt.

date-time

wordingstring | nullrequired

The words they agreed to, as stated.

occurredAtstringrequired

date-time

eventsobject[]required
4 child attributes
idstringrequired

uuid

eventNamestringrequired
propertiesmap<string, any>required
occurredAtstringrequired

date-time

messagesobject[]required
12 child attributes
idstringrequired

uuid

campaignIdstring | nullrequired

uuid

channelstringrequired

one of email, push

messageTypestringrequired

one of marketing, transactional

statusstringrequired

one of queued, sending, skipped, sent, failed, delivered, bounced, complained

recipientEmailstring | nullrequired

The email address it went to; null for push.

sentAtstring | nullrequired

date-time

deliveredAtstring | nullrequired

date-time

openedAtstring | nullrequired

date-time

clickedAtstring | nullrequired

date-time

unsubscribedAtstring | nullrequired

date-time

createdAtstringrequired

date-time

listsobject[]required
3 child attributes
idstringrequired

uuid

namestringrequired
addedAtstringrequired

date-time

segmentsobject[]required
3 child attributes
idstringrequired

uuid

namestringrequired
enteredAtstringrequired

date-time

topicsobject[]required
4 child attributes
idstringrequired

uuid

namestringrequired
subscribedbooleanrequired

Whether the contact is subscribed to the topic.

updatedAtstringrequired

date-time

journeysobject[]required
5 child attributes
journeyIdstring | nullrequired

Null once the journey has been deleted.

uuid

journeyNamestring | nullrequired

Null once the journey has been deleted.

statusstringrequired

one of active, completed, exited

enteredAtstringrequired

date-time

endedAtstring | nullrequired

date-time

pushDevicesobject[]required
5 child attributes
kindstringrequired

one of apns_token, fcm_token, web_push_subscription

permissionstringrequired

Notification permission on the device.

one of granted, denied

activebooleanrequired

Whether the device can still receive push.

lastSeenAtstringrequired

date-time

createdAtstringrequired

date-time

formSubmissionsobject[]required
6 child attributes
formIdstringrequired

uuid

formNamestringrequired
outcomestringrequired

one of created, updated, honeypot, pending, expired

createdAtstringrequired

date-time

confirmedAtstring | nullrequired

date-time

pendingContactmap<string, any> | nullrequired

What an unconfirmed signup entered, held until confirmed or for 7 days.

conversionsobject[]required
3 child attributes
conversionGoalIdstringrequired

uuid

valueobject | nullrequired

Value recorded with the conversion, in its conversion goal's currency, if any.

2 child attributes
currencystring | nullrequired

The currency, an ISO 4217 code; null when none was named.

valuenumberrequired

The amount in that currency.

convertedAtstringrequired

date-time

suppressionsobject[]required
4 child attributes
channelstringrequired

one of email, push

addressstring | nullrequired

Set when the block is on the address itself, not the contact.

reasonstringrequired

Why the channel is blocked.

createdAtstringrequired

date-time