Retrieve a contactMenu

Retrieve a contact

GET/v1/contacts/{id}

Requires an API key with the contacts:read scope. About keys and scopes

Works with integration, agent and partner keys.

Returns one contact, including its current email suppression state.

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 ContactDetail in data. Otherwise returns an error; Errors lists every code and which to retry.

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

purchaseCycleobject | nullrequired
8 child attributes
patternstringrequired

regular: their usual time between purchases is known; not_enough_history: fewer than 4 purchase days; irregular: no regular pattern. Only a regular buyer is ever overdue.

one of regular, not_enough_history, irregular

usualDaysBetweenPurchasesnumber | nullrequired

The median number of days between purchase days; null unless regular.

lastPurchasedOnstringrequired

The last purchase day, in UTC.

date

expectedNextPurchaseOnstring | nullrequired

The last purchase day plus the usual time between purchases; null unless regular.

date

daysSinceLastPurchaseintegerrequired
overdueRationumber | nullrequired

Days since the last purchase over the usual time between purchases: 1 is due today, 1.5 half a cycle late. Null unless regular.

cycleStatusstring | nullrequired

overdue from 1.5× the usual time between purchases, lapsed from 2×, dormant from 3×, else on_track; null unless regular.

one of on_track, overdue, lapsed, dormant

reasonstringrequired

Why, in plain words: "Usually transacts every 30 days; it's been 52."

predictedValueobject | nullrequired

What a model of the workspace's customers (BG/NBD and Gamma-Gamma, as Klaviyo uses) predicts of this contact over the next year, from their transaction days of the purchase event and spend; worked out daily. Needs 500 customers, 180 days of transactions and 20 customers with three or more transaction days. null for someone who never transacted, and on plans that do not include Kiro.

One of 2 shapes
With horizonDays, transactions, probabilityActive, spend and lifetimeValue
6 child attributes
status"predicted"required
horizonDaysintegerrequired

The window predicted: 365 days from today.

transactionsnumberrequired

Transaction days expected in the window, to one decimal.

probabilityActivenumberrequired

The chance they are still a customer rather than gone quietly, 0 to 1: falls as the time since their last transaction grows beyond their usual gap.

spendobject | nullrequired

Predicted lifetime value: what they are expected to spend in the window (Klaviyo calls it predicted CLV). Null when transactions carry no amount.

2 child attributes
currencystring | nullrequired

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

valuenumberrequired

The amount in that currency.

lifetimeValueobject | nullrequired

rfm.totalSpent plus spend: spent so far and expected (total CLV).

2 child attributes
currencystring | nullrequired

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

valuenumberrequired

The amount in that currency.

Option 2
1 child attribute
status"not_enough_data"required

The workspace's history is too short to predict from; prediction.reason on GET /v1/reports/rfm says what is missing.

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.

recordSourceContactRecordSourcerequired

How the contact was first added. Set once when the contact is created and never changed; a merge keeps the source of the contact created first.

3 child attributes
kindstringrequired

How the contact was first added: dashboard (by a member), api (by an API key), sdk (by the browser or app SDK), import (a CSV file), form (a Kirora form), integration (a connected tool, such as Segment), transactional (a transactional email to a new address), or unknown (added before this was recorded).

one of dashboard, api, sdk, import, form, integration, transactional, unknown

idstring | nullrequired

What added it: the member's, API key's, import's or form's id, or the integration's slug (segment); null for sdk, transactional and unknown.

namestring | nullrequired

Its name now: the member's name, the key's, the file's, the form's or the integration's. Null when there is none, or it was deleted (or the member left).