Skip to Content
API ReferenceRealtime Identity

Realtime Identity API

Realtime identity gives each person one profile ID across their devices and logins, kept current from their events as they arrive. Its API has two parts:

  • The identity serving API, on the Membership API host, which your servers and web pages call to ask who an identifier belongs to. It only reads the graph.
  • The management API, under /api/v1/workspaces/{id}, which configures a graph’s realtime half, its event sources and mappings, read policies, graph roles, warehouse confirmation and identity verification, and which lets an admin link, separate or erase people.

For how realtime identity works, see Realtime Identity and Using Realtime Identity.

Authentication

SurfaceCredentialNotes
Identity serving API (/v1/identity/...)Serving key (svk_…) carrying the serve:identity scopeServer-side only. Membership keys, Site keys and REST API keys are refused with 401. Create one under API Keys → Identity API Keys, or with the API keys API ("type": "serving", "scopes": ["serve:identity"]).
GET /v1/identity/meSite key (psk_…)For a web page asking about its own visitor. Answers a profile ID and status only, never identifiers.
POST /v1/identity/link on the events hostServer write credential (swk_…)For your servers: sends one event and answers the person’s profile ID. Write keys, serving keys, Site keys and REST API keys are refused with 401.
Management API (/api/v1/...)A signed-in session token, or a REST API key (rk_…)Send Authorization: Bearer <token> and X-Workspace-ID: <workspace-id>. Each route needs the permission listed below; a REST API key must also carry that permission among its scopes.

The management API uses four permissions:

PermissionAllows
identity_graphs.readReading a graph’s realtime state, event sources, people, read policies, switches and verification settings.
identity_graphs.realtime_manageChanging realtime settings, event sources and mappings, read policies, graph roles, warehouse confirmation and verification; linking and separating identifiers.
identity.writeLinking identifiers from your servers with the write API. Held by workspace owners and admins by default; give a REST API key this one permission for a server that only links.
identity.eraseErasing a person. Held by workspace owners and admins by default.

Realtime identity is enabled per workspace. On a workspace where it is not enabled, management routes answer 403 with the code feature_not_enabled; erasing a person is always available.


Endpoints

Identity serving API

Base URL: https://membership.zeotap.com

MethodPathDescription
GET/v1/identity/{family}/{value}Look a person up by one identifier
GET/v1/identity/profiles/{profile_id}Read a profile by ID
GET/v1/identity/profiles/{profile_id}/linksRead the evidence joining a profile’s identifiers
POST/v1/identity/resolveLook up to 100 identifiers up in one call
GET/v1/identity/meThe current visitor’s profile ID (Site key)

Management API

MethodPathPermissionDescription
GET/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtimeidentity_graphs.readGet a graph’s realtime state
PUT/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtimeidentity_graphs.realtime_manageUpdate a graph’s realtime settings
POST/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/enableidentity_graphs.realtime_manageGive a warehouse graph a realtime half
GET/api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sourcesidentity_graphs.readList the graph’s event sources and mappings
POST/api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sourcesidentity_graphs.realtime_manageAdd an event source
PUT/api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources/{sourceId}identity_graphs.realtime_manageUpdate an event source or its mapping
DELETE/api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources/{sourceId}identity_graphs.realtime_manageRemove an event source
POST/api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources/previewidentity_graphs.readPreview a mapping on sample events
GET/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/lookupidentity_graphs.readFind a person by an identifier
GET/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/profiles/{profileId}identity_graphs.readGet a profile and its evidence
POST/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/linkidentity_graphs.realtime_manageLink two identifiers
POST/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/unlinkidentity_graphs.realtime_manageSeparate two identifiers
POST/api/v1/workspaces/{id}/realtime-identity/linkidentity.writeLink a person’s identifiers from your server, and get the person back
POST/api/v1/workspaces/{id}/identity/eraseidentity.eraseErase a person
GET/api/v1/workspaces/{id}/realtime-identityidentity_graphs.readGet the workspace’s realtime identity card
GET/api/v1/workspaces/{id}/realtime-identity/comparisonidentity_graphs.readGet the comparison with today’s profiles
GET/api/v1/workspaces/{id}/realtime-identity/read-policiesidentity_graphs.readList read policies
POST/api/v1/workspaces/{id}/realtime-identity/read-policiesidentity_graphs.realtime_manageCreate a custom read policy
PUT/api/v1/workspaces/{id}/realtime-identity/read-policies/{policyId}identity_graphs.realtime_manageUpdate a custom read policy
DELETE/api/v1/workspaces/{id}/realtime-identity/read-policies/{policyId}identity_graphs.realtime_manageDelete a custom read policy
GET/api/v1/workspaces/{id}/realtime-identity/read-policies/{policyId}/impactidentity_graphs.readEstimate a policy’s effect
GET/api/v1/workspaces/{id}/realtime-identity/rolesidentity_graphs.readList realtime graphs, their roles and bindings
POST/api/v1/workspaces/{id}/realtime-identity/graphsidentity_graphs.realtime_manageCreate an events-only graph
POST/api/v1/workspaces/{id}/realtime-identity/candidatesidentity_graphs.realtime_managePrepare a candidate
DELETE/api/v1/workspaces/{id}/realtime-identity/candidates/{switchId}identity_graphs.realtime_manageStop a candidate
GET/api/v1/workspaces/{id}/realtime-identity/switches/{switchId}identity_graphs.readGet a switch
GET/api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/change-previewidentity_graphs.readCompare a candidate and run the switch checks
POST/api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/switchidentity_graphs.realtime_manageSwitch a candidate in
POST/api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/finalizeidentity_graphs.realtime_manageEnd the warm period
POST/api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/switch-backidentity_graphs.realtime_manageSwitch back
DELETE/api/v1/workspaces/{id}/realtime-identity/bindings/{parentModelId}identity_graphs.realtime_manageReturn a parent model to the primary graph
GET/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/confirmationidentity_graphs.readGet warehouse confirmation
POST/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/confirmationidentity_graphs.realtime_manageRun warehouse confirmation now
GET/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/projectionidentity_graphs.readGet the warehouse results applied to the graph
POST/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/projectionidentity_graphs.realtime_manageApply the warehouse result now
POST/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/projection/rollbackidentity_graphs.realtime_manageUndo the last warehouse result
POST/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/rebuildidentity_graphs.realtime_manageRebuild a graph into a candidate
GET/api/v1/workspaces/{id}/identity-rebuilds/{runId}identity_graphs.readGet a rebuild
GET/api/v1/workspaces/{id}/identity-verificationidentity_graphs.readGet identity verification settings
PUT/api/v1/workspaces/{id}/identity-verificationidentity_graphs.realtime_manageUpdate the verification level and consent default
POST/api/v1/workspaces/{id}/identity-verification/secretsidentity_graphs.realtime_manageRotate the identity token secret
DELETE/api/v1/workspaces/{id}/identity-verification/secrets/{secretId}identity_graphs.realtime_manageRevoke a secret
POST/api/v1/workspaces/{id}/identity-verification/server-credentialsidentity_graphs.realtime_manageCreate a server write credential
DELETE/api/v1/workspaces/{id}/identity-verification/server-credentials/{credentialId}identity_graphs.realtime_manageRevoke a server write credential

How profiles are created

Lookups never create a profile or link identifiers. Every request of the identity serving API, and the management API’s lookup and profile reads, only read the graph. An identifier that has not been linked yet answers "status": "unknown".

Profiles are created and joined in three ways:

  1. By your events. Events sent to an event source the graph reads, such as /v1/identify, /v1/track or /v1/page on https://events.zeotap.com, are linked through that source’s mapping: an identifier seen for the first time gets a profile, and identifiers carried on one event are joined to one person, within the graph’s rules and safeguards.
  2. By your servers. Two calls link a person’s identifiers the moment you make them and answer with the person, creating one when none of the identifiers is known yet:
    • Get a profile ID with an event sends one event with your event source’s server write credential. Use it for production traffic: the event is also accepted like any other, so it reaches your warehouse, forwarding and the live stream.
    • The write API links a list of identifiers with a REST API key, and can name a graph. Use it from management code or an integration without an event source.
  3. By an admin. Link two identifiers joins two identifiers on your word.

Identity Serving API

Every request reads your workspace’s primary realtime graph unless you name another.

Query parameterApplies toDescription
graphEvery requestThe ID of another graph that serves realtime. A graph that is not serving (a candidate, a warm graph) is answered 404.
policyLookup by identifier, by profile ID, links and batchA read policy: all_links (the default), warehouse_confirmed, logged_in_only or a custom policy’s ID. Only the identifiers the policy keeps are returned, and a links answer shows only the evidence the policy reads among them; the profile ID is the same under every policy.
variantLookup by identifierThe format of a value you have already hashed, for example email_sha256_lowercase.

Every lookup answers "status": "unknown" until your workspace is Live. While realtime identity is in the Building or Comparing stage, the identity serving API returns no profile ID and no identifiers, so nothing comes to depend on the graph before it is ready.

Look Up an Identifier

GET /v1/identity/{family}/{value}

Returns the person an identifier belongs to. The value is normalised exactly as it is when it arrives on events, so send it as your systems hold it: Pat@Example.com and pat@example.com are one identifier.

Example

curl https://membership.zeotap.com/v1/identity/user_id/customer-42 \ -H "Authorization: Bearer svk_..."

Response

{ "graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "graph_name": "Event identity", "profile_id": "01a1ffc6-9118-77e2-a1c2-495a0a3c6344", "status": "resolved", "identifiers": [ { "family": "anonymous_id", "value_key": "visitor-7", "hashed": false, "trust": "client_asserted", "origin": "stream", "first_seen_at": "2026-11-02T09:14:08Z", "last_seen_at": "2026-11-20T17:41:52Z" }, { "family": "email", "value_key": "8b1a9953c4611296a827abf8c47804d7e6c49c6b8b1a9953c4611296a827abf8", "hashed": true, "trust": "verified", "origin": "stream", "first_seen_at": "2026-11-02T09:15:30Z", "last_seen_at": "2026-11-20T17:41:52Z" }, { "family": "user_id", "value_key": "customer-42", "hashed": false, "trust": "verified", "origin": "stream", "first_seen_at": "2026-11-02T09:15:30Z", "last_seen_at": "2026-11-20T17:41:52Z" } ] }
FieldTypeDescription
graph_idstring (UUID)The graph that answered
graph_namestringIts name
profile_idstring (UUID)The person’s profile ID. Omitted when status is unknown.
statusstringresolved, pending or unknown. See Status.
redirected_fromstring (UUID)Set when you asked for a profile ID that was merged into this one
identifiersarrayThe person’s identifiers. Personal data is never returned in plain text: see Personal data in answers.
identifiers[].value_keystringThe identifier’s value, or its SHA-256 hash when it is personal data
identifiers[].hashedbooleantrue when value_key is a SHA-256 hash
identifiers[].truststringverified (your server, your warehouse or an admin vouched for it) or client_asserted (a browser or app stated it)
identifiers[].originstringWhere the identifier came from: stream (your events), admin or batch (your warehouse)

Get a Profile

GET /v1/identity/profiles/{profile_id}

Returns a profile by ID, in the same shape as a lookup. A profile ID that was merged into another answers with the profile it became, and redirected_from names the ID you asked for. An ID the graph does not hold answers 200 with "status": "unknown".

GET /v1/identity/profiles/{profile_id}/links

Returns the profile and the evidence joining its identifiers, from both layers of the graph:

  • links: the pairs linked from events, by your servers or by an admin, up to 500, oldest first.
  • warehouse: the identifiers your latest warehouse identity run placed on the profile, one entry per identifier, up to 500. Each says how it matched (match_type, and confidence for a probabilistic match), whether the profile owns it or it is a shared device attributed to the profile (ownership), when it was seen, the run’s generation, and batch_profile_id, the warehouse profile it came from. The warehouse records which records joined which in its own lineage: open that profile in Customer 360 to see it pair by pair. Empty when no warehouse run has been confirmed for the graph.
{ "profile": { "graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "graph_name": "Event identity", "profile_id": "01a1ffc6-9118-77e2-a1c2-495a0a3c6344", "status": "resolved", "identifiers": [] }, "links": [ { "from": { "family": "user_id", "value_key": "customer-42", "hashed": false, "trust": "verified", "origin": "stream", "first_seen_at": "2026-11-02T09:15:30Z", "last_seen_at": "2026-11-20T17:41:52Z" }, "to": { "family": "anonymous_id", "value_key": "visitor-7", "hashed": false, "trust": "client_asserted", "origin": "stream", "first_seen_at": "2026-11-02T09:14:08Z", "last_seen_at": "2026-11-20T17:41:52Z" }, "trust": "client_asserted", "origin": "stream", "created_at": "2026-11-02T09:15:30Z" } ], "warehouse": [ { "family": "email", "value_key": "ff8d9819fc0e12bf0d24892e45987e249a28dce836a85cad60e28eaaa8c6d976", "hashed": true, "match_type": "deterministic", "ownership": "owned", "batch_profile_id": "5d0b8a3e-2f4c-4f0e-9a51-7c2a1e6b9d40", "first_seen_at": "2026-10-14T00:00:00Z", "last_seen_at": "2026-11-27T00:00:00Z", "generation": 42 } ] }

See Why Are These Merged? for how to read the evidence.

Resolve a Batch

POST /v1/identity/resolve

Looks up 1 to 100 identifiers in one call. Results come back in the order you sent them.

Request Body

FieldTypeRequiredDescription
identifiersarrayYes1 to 100 identifiers
identifiers[].familystringYesThe identifier’s family, such as email or user_id
identifiers[].valuestringYesThe value as your systems hold it
identifiers[].variantstringNoThe format of an already-hashed value
curl -X POST https://membership.zeotap.com/v1/identity/resolve \ -H "Authorization: Bearer svk_..." \ -H "Content-Type: application/json" \ -d '{ "identifiers": [ { "family": "email", "value": "pat@example.com" }, { "family": "user_id", "value": "customer-77" } ] }'

Response

{ "results": [ { "graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "graph_name": "Event identity", "profile_id": "01a1ffc6-9118-77e2-a1c2-495a0a3c6344", "status": "resolved", "identifiers": [ ... ] }, { "graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "graph_name": "Event identity", "status": "unknown", "identifiers": [] } ] }

A value that is not an identifier of its family answers, in its place in results, {"family": "<family>", "status": "invalid_identifier"}. A family the graph has no matching rule for answers {"family": "<family>", "status": "family_not_declared"} in the same way.

The Current Visitor

GET /v1/identity/me

Called from a web page with a Site key: returns the visitor’s own profile ID from the identifiers the page knows. No identifiers are returned. The signed-in user is preferred, so on a shared browser the person signed in is answered.

Query parameterDescription
anonymous_idThe visitor’s anonymous ID
user_idThe signed-in user’s ID

Send at least one. The request must come from one of the Site’s domains, and the Site must be live.

curl "https://membership.zeotap.com/v1/identity/me?anonymous_id=visitor-7&user_id=customer-42" \ -H "Authorization: Bearer psk_..."
{ "profile_id": "01a1ffc6-9118-77e2-a1c2-495a0a3c6344", "graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "status": "resolved" }

When neither identifier has been linked, or before the workspace is Live, the answer has no profile_id and status is unknown. The SDKs call this for you with getProfileId(); see the SDK.

Status

statusMeaning
resolvedA settled profile.
pendingA profile created a moment ago that may still join another. Ask again shortly, or use it and follow profile changes.
unknownNobody with that identifier has been linked yet, the identifier is shared by several people and belongs to none of them, or the workspace is not Live. A shared identifier answers unknown on purpose: a separate status would tell anyone holding a key that the identifier belongs to several people.

Errors

StatusCodeMeaning
400invalid_identifierThe value is not an identifier of that family (or, on /me, neither anonymous_id nor user_id was sent)
400family_not_declaredThe graph has no matching rule for that family, enabled or not, so it holds no identifier of it. In a batch, the item answers this status in its place instead.
400invalid_batchA batch with no identifiers or more than 100
400read_policy_not_foundpolicy names no read policy of the workspace
401Missing, invalid or revoked credential, or a credential of the wrong kind
403The serving key does not carry serve:identity
403feature_not_enabled(Serving key) The workspace does not have realtime identity: it was never enabled, or it was turned off. Its keys answer again if it is turned back on.
403realtime_identity_not_enabledRealtime identity is not enabled for the workspace
403site_not_live(/me) The Site is not published, or is paused
403origin_not_allowed(/me) The page is not on one of the Site’s domains
404identity_graph_not_foundgraph names no serving realtime graph of the workspace
429The key’s rate limit was exceeded
503identity_unavailableThe graph did not answer. Retry after the number of seconds in the Retry-After header. Every answer comes from the graph itself, so a lookup is never answered from anything else.

Personal data in answers

Every identifier an answer returns, on the identity serving API and on the management API alike, carries personal data only as a SHA-256 hash, and hashed says which values are hashes:

  • Emails, phone numbers, names, addresses and IP addresses are returned as the hash the graph keeps for them.
  • An email address or a phone number used in any other identifier, for example as a user ID, is returned as the SHA-256 hash of its normalized form: lower-cased and trimmed for an email address, digits only for a phone number. A phone number is recognized when it is written with a leading + or with separators such as spaces or dashes.
  • Other identifiers, such as anonymous IDs and ordinary customer IDs, are returned as they are.

You can still look a person up by the plain value, and pass a hashed value_key from an answer back to Separate Two Identifiers or Erase a Person: it names the same identifier.


Graph Realtime State

Get Realtime State

GET /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime

Returns the realtime half of a graph: its role, rules, safeguards and counts.

{ "graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "realtime_role": "serving", "realtime_primary": true, "normalisation_version": 2, "attribution": "oldest", "settings": { "config_version": 4, "profile_cap": 100, "link_rate_per_hour": 100, "evict_min_idle_days": 30, "anon_ttl_days": 400 }, "families": [ { "family": "user_id", "priority": 1, "limit": 1, "device_class": false }, { "family": "email", "priority": 2, "limit": 1, "device_class": false }, { "family": "anonymous_id", "priority": 5, "limit": 10, "device_class": true } ], "store": { "name": "Shared (EU)", "kind": "shared", "region": "europe-west1", "status": "ready" }, "read_mode": "comparing", "verification": "recommended", "consent_default": "allow", "stats": { "profiles": 182340, "identifiers": 512877, "by_family": { "anonymous_id": 301220, "email": 98411, "user_id": 113246 }, "merged_profiles": 20412, "last_link_at": "2026-11-23T08:02:11Z" }, "warehouse": { "generation": 4, "committed_at": "2026-11-23T03:12:40Z", "profiles": 199016, "identifiers": 1003211 }, "sources": 3, "can_manage": true }
FieldDescription
realtime_roleserving, candidate, warm or none. See Switching and Binding Realtime Graphs.
realtime_primaryWhether this is the workspace’s primary realtime graph
attributionWho a shared device belongs to: oldest, newest or none. See Shared Devices.
familiesThe families the graph links, strongest first, with each one’s limit per person and whether it is a device family
read_modeThe workspace’s stage: building, comparing or live, or star while realtime identity is not in use yet
verificationThe workspace’s verification level
statsProfile and identifier counts linked from events. Omitted, with "degraded": "store_unreachable", when the identity store did not answer.
warehouseThe warehouse answer the graph serves (its latest applied run): generation, committed_at, profiles and identifiers. Counted separately from stats, so a person both hold is counted in each. null when no warehouse answer has been applied; a count is null when it is not known.
can_manageWhether the caller holds identity_graphs.realtime_manage

A graph that does not link events in real time answers 409 with the code not_realtime.

Update Realtime Settings

PUT /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime

Changes the graph’s safeguards. Omitted fields keep their value. Returns the realtime state.

FieldTypeRangeDescription
profile_capinteger2–500Identifiers per person
link_rate_per_hourinteger1–100,000New links per identifier per hour
settle_msinteger100–60,000How long a new profile stays pending
evict_min_idle_daysinteger1–3,650Days before a device can be replaced
anon_ttl_daysinteger30–3,650Days an inactive identifier is kept
pausedbooleanPause linking. A paused graph links nothing new.
device_classobjectFamily name to true or false: which families are devices
reconcile_delay_minutesinteger1–1,440How long separations from a warehouse result wait after it is applied
projection_rows_per_secinteger1,000–1,000,000How fast a warehouse result is applied
warm_period_daysinteger1–30How long a graph this one replaces stays warm
{ "profile_cap": 50, "device_class": { "anonymous_id": true, "device_id": true } }

A value out of range answers 400 with the code invalid_setting; an unknown family name answers 400 with invalid_family.

Give a Graph a Realtime Half

POST /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/enable

Lets a warehouse graph link events in real time, so it can be prepared as a candidate. Its next warehouse run rebuilds it in full. Returns the graph. A graph that already has a realtime half is returned unchanged.


Event Sources and Mappings

An event source’s mapping says which fields of its events hold which identifier. See Event sources and their mappings.

List Event Sources

GET /api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources

{ "event_sources": [ { "id": "2b9e4c1a-6f0d-4c3e-9a51-7d8e2f6b0c14", "workspace_id": "660e8400-e29b-41d4-a716-446655440000", "identity_graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "write_key_id": "5c7a3e90-1b2d-4f6a-8e3c-9d0b1a2c3e4f", "status": "active", "allow_webhook": false, "mapping_version": 3, "key_name": "Website", "key_status": "active", "source_type": "standard_sdk", "translation": "", "system_owner": "", "mappings": [ { "id": "0d4e8b62-3a71-4f95-b2c8-6e1a9f3d7c05", "kind": "path", "path": "properties.member_id", "family": "loyalty_id", "event_types": ["identify", "track"], "position": 0 } ], "created_at": "2026-11-01T10:00:00Z", "updated_at": "2026-11-18T14:22:05Z" } ] }

A source with no mappings of its own uses the standard mapping for its source type.

Add an Event Source

POST /api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources

FieldTypeRequiredDescription
write_key_idstring (UUID)YesThe workspace event source to read
allow_webhookbooleanNoLet a partner webhook source link identities
mappingsarrayNoThe source’s mapping. Omit it to use the standard mapping for the source type.

Each mapping:

FieldTypeRequiredDescription
kindstringNopath (the default) or cookie_sync
pathstringFor pathA dotted event path such as traits.email or properties.member_id
familystringYesA family the graph has an enabled matching rule for
variantstringNoThe value’s format, for an already-hashed value
event_typesstring[]NoLimit the mapping to track, identify, page, screen, group, alias, cookie_sync or consent_changed events

A source has at most 50 mappings. Returns the source with 201 Created.

Update an Event Source

PUT /api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources/{sourceId}

Omitted fields keep their value.

FieldTypeDescription
statusstringactive, draft or disabled
allow_webhookbooleanLet a partner webhook source link identities
mappingsarrayThe full new mapping
mapping_versionintegerThe mapping_version you edited. If someone else saved the mapping since, the save answers 409 with mapping_changed.

Remove an Event Source

DELETE /api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources/{sourceId}

Returns 204 No Content.

Preview a Mapping

POST /api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources/preview

Runs a mapping over 1 to 100 sample events and shows what each would link. Nothing is written.

FieldTypeRequiredDescription
eventsobject[]Yes1 to 100 sample events, as your sources send them
source_idstring (UUID)NoPreview this source’s saved mapping
mappingsarrayNoPreview this mapping instead. With neither, the standard SDK mapping is previewed.
{ "events": [ { "identifiers": [ { "family": "user_id", "value_key": "customer-42", "path": "userId", "strong": true }, { "family": "anonymous_id", "value_key": "visitor-7", "path": "anonymousId", "strong": false } ], "edges": [["user_id:customer-42", "anonymous_id:visitor-7"]], "skipped": [], "consent": "workspace_default" } ], "warnings": [ { "path": "properties.member_id", "family": "loyalty_id", "code": "low_cardinality", "blocking": true, "message": "properties.member_id has the same value in 9 of 10 sampled events. Mapped as loyalty_id it would merge unrelated people." } ] }

Warnings are low_cardinality (a field with the same value on most events, which is blocking on a serving graph) and user_id_looks_like_email.

Event Source Errors

StatusCodeMeaning
400invalid_write_keywrite_key_id is missing or not a UUID
400source_cannot_linkThis kind of event source cannot link identities
400too_many_mappingsMore than 50 mappings
400invalid_path, invalid_kind, invalid_family, invalid_variant, invalid_event_type, duplicate_mappingA mapping row is not valid; the message names the row
400family_not_declaredThe graph has no enabled matching rule for the family
400invalid_statusstatus is not active, draft or disabled
400invalid_eventsA preview with no events or more than 100
404not_foundNo such event source
409source_existsThe event source already feeds the graph
409mapping_changedSomeone else changed the mapping since you read it
409mapping_disagreesAnother serving graph reads user IDs or anonymous IDs from this source’s events differently

Finding a Person

These reads work in every stage, so you can check the graph before it is Live. They only read the graph.

Look Up an Identifier

GET /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/lookup?family={family}&value={value}

Query parameterRequiredDescription
familyYesThe identifier’s family
valueYesThe value as it arrives on events
variantNoThe format of an already-hashed value

Returns the profile in the same shape as the identity serving API, with the profile’s created_at and last_seen_at. An identifier nobody has been linked with answers "status": "unknown".

curl "https://agentic.zeotap.com/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/lookup?family=email&value=pat%40example.com" \ -H "Authorization: Bearer <token>" \ -H "X-Workspace-ID: <workspace-id>"

Get a Profile

GET /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/profiles/{profileId}

Returns the profile and its evidence, as one object: the profile’s fields plus links and warehouse, as in Get a Profile’s Links. A merged profile ID answers with the profile it became. An ID the graph does not hold answers 404.

Errors

StatusCodeMeaning
400invalid_identifierThe value is not an identifier of that family
400family_not_declared(Lookup) The graph has no matching rule for that family
404not_foundNo such graph, or no profile with that ID
409not_realtimeThe graph does not link events in real time
409no_identity_storeRealtime identity is not enabled for this workspace
503identity_store_not_ready, identity_store_unavailableThe identity store is not ready or did not answer. Try again shortly.

Linking From Your Servers

POST /api/v1/workspaces/{id}/realtime-identity/link

Links identifiers you know belong to one person into the workspace’s realtime identity graph, and answers with that person once the link is written. Use it from your servers when a person signs up, signs in or updates their details, to have them known at once.

  • A new person. When none of the identifiers is known yet, a person is created for them.
  • Joining people. Identifiers already on different people join one person, within the graph’s rules and safeguards. The oldest person keeps their profile ID, and merged_profile_ids names the others.
  • Safeguards. An identifier a safeguard keeps out, such as a second user ID for one person, is listed in refused with the reason; the rest are linked.
  • Trust. Every identifier you send counts as verified, as on an event your server sends with a server write credential.

Needs the identity.write permission. Give a REST API key that permission alone for a server that only links. It writes to the graph in every stage; lookups answer with the person once the workspace is Live.

Request Body

FieldTypeRequiredDescription
identifiersarrayYes1 to 20 identifiers of one person
identifiers[].familystringYesThe identifier’s family, for example user_id, email or anonymous_id. The graph must match on it.
identifiers[].valuestringYesThe plain value. It is normalized as events are.
identifiers[].variantstringNoThe format of a value you have already hashed, for example email_sha256_lowercase
graph_idstring (UUID)NoA graph that serves realtime. Leave it out for the workspace’s primary realtime graph.
event_timestring (RFC 3339)NoWhen the identifiers were seen together. Defaults to now.

Send an Idempotency-Key header (up to 200 characters) to make a retry safe: a second call with the same key answers the same person and links nothing again.

Example

curl -X POST https://agentic.zeotap.com/api/v1/workspaces/{id}/realtime-identity/link \ -H "Authorization: Bearer rk_..." \ -H "Content-Type: application/json" \ -H "Idempotency-Key: signup-7f3a" \ -d '{"identifiers": [{"family": "user_id", "value": "customer-42"}, {"family": "email", "value": "pat@example.com"}, {"family": "anonymous_id", "value": "visitor-7"}]}'

Response

{ "graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "profile_id": "01a1ffc6-9118-77e2-a1c2-495a0a3c6344", "status": "pending", "created": true, "merged_profile_ids": [], "refused": [], "duplicate": false, "identifiers": [ { "family": "user_id", "value_key": "customer-42", "hashed": false, "trust": "verified", "origin": "stream", "first_seen_at": "2026-11-23T10:02:11Z", "last_seen_at": "2026-11-23T10:02:11Z" }, { "family": "email", "value_key": "8b1a9953c4611296a827abf8c47804d7e6c49c6b8b1a9953c4611296a827abf8", "hashed": true, "trust": "verified", "origin": "stream", "first_seen_at": "2026-11-23T10:02:11Z", "last_seen_at": "2026-11-23T10:02:11Z" }, { "family": "anonymous_id", "value_key": "visitor-7", "hashed": false, "trust": "verified", "origin": "stream", "first_seen_at": "2026-11-23T10:02:11Z", "last_seen_at": "2026-11-23T10:02:11Z" } ] }
FieldTypeDescription
profile_idstring (UUID)The person the identifiers now belong to. Omitted when every identifier was refused.
statusstringresolved or pending, as a lookup reads the person now. See Status.
createdbooleantrue when this call created the person
merged_profile_idsarrayPeople this call joined into this one; their profile IDs now lead here
refusedarrayIdentifiers that were not linked, each with family, value_key, hashed and reason
duplicatebooleantrue for a retry with an Idempotency-Key already used
identifiersarrayThe person’s identifiers, with personal data hashed as in Personal data in answers

Errors

StatusCodeMeaning
400invalid_batchNo identifiers, or more than 20
400invalid_identifierA value is not an identifier of its family; the message names which
400family_not_declaredThe graph does not match on that family
400invalid_idempotency_keyThe Idempotency-Key is longer than 200 characters
403permission_deniedThe caller, or the REST API key, does not hold identity.write
403feature_not_enabledRealtime identity is not enabled for the workspace
404no_realtime_graphThe workspace has no graph serving realtime
404not_foundgraph_id names no graph of the workspace
409graph_not_servinggraph_id names a graph that does not serve realtime
409linking_pausedLinking is paused on the graph
503identity_unavailableThe graph did not answer. Retry after the number of seconds in the Retry-After header.

Getting a Profile ID With an Event

POST https://events.zeotap.com/v1/identity/link

Sends one event from your server and answers with the person its identifiers belong to, creating the person when none of them is known yet. Use it where your server needs the profile ID at once, for example when a person signs up or signs in.

  • The event is accepted like any other. It is linked first, then accepted as an identify event, so it reaches your warehouse, event forwarding and the live stream, and is linked only once.
  • Your event source’s mapping applies. The identifiers that count are the ones the source’s mapping takes from the event, as for every event the source sends.
  • Trust. Every identifier counts as verified, as on any event sent with a server write credential.
  • Every stage. It links and answers in every stage; reads says which stage the workspace is in. Lookups answer with the person once the workspace is Live.

Send a server write credential (swk_…) in the Authorization header. A write key is refused, so a profile is never created on request for evidence a browser could have forged.

Request Body

One event, in the shape /v1/identify takes:

FieldTypeRequiredDescription
userIdstringNoYour user ID for the person
anonymousIdstringNoThe device or browser ID
traitsobjectNoTraits, for example email or phone
context.identitiesobjectNoFurther identifiers by family
messageIdstringNoYour ID for the event. Send one to make a retry safe; one is generated when you leave it out and returned as message_id.
typestringNoDefaults to identify

Example

curl -X POST https://events.zeotap.com/v1/identity/link \ -H "Authorization: Bearer swk_..." \ -H "Content-Type: application/json" \ -d '{"userId": "customer-42", "anonymousId": "visitor-7", "traits": {"email": "pat@example.com"}, "messageId": "signup-7f3a"}'

Response

The same fields as the write API, plus reads and message_id:

{ "graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "profile_id": "01a1ffc6-9118-77e2-a1c2-495a0a3c6344", "status": "pending", "created": true, "merged_profile_ids": [], "refused": [], "duplicate": false, "identifiers": [ { "family": "user_id", "value_key": "customer-42", "hashed": false, "trust": "verified", "origin": "stream", "first_seen_at": "2026-11-30T10:02:11Z", "last_seen_at": "2026-11-30T10:02:11Z" } ], "reads": "building", "message_id": "signup-7f3a" }
FieldTypeDescription
refusedarrayIdentifiers that were not linked, each with family, value_key, hashed, reason and the profile_id it stays on. Two people are never joined silently.
duplicatebooleantrue when this messageId was already linked; the person is answered and nothing is linked again
readsstringThe workspace’s stage: building, comparing or live
message_idstringThe event’s ID; send it again to retry

Errors

StatusCodeMeaning
400invalid_bodyThe body is not one JSON event
400native_app_unsupportedThe event source sends to a native app, which has no realtime identity graph
401server_credential_requiredNo server write credential in the Authorization header
401invalid_credentialThe credential is unknown or revoked
403feature_not_enabledRealtime identity is not enabled for the workspace
409source_pending_schemaThe event source is in schema review and accepts no events yet
422contract_blockedThe event source’s tracking plan blocks the event
422the reasonNothing was linked; code says why, for example no_identifier, not_covered (the graph does not read this source), consent or graph_paused
429rate_limitedToo many requests for this credential. Retry after the Retry-After header.
503link_unavailable, publish_failedNot answered this time. The body carries retry_safe: true and message_id: send the same event with that messageId again.

A retry after a 503 may accept the event a second time, as a retry of any event can.


Correcting the Graph

POST /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/link

Joins two identifiers you know belong to one person. A link made here counts as verified, and it works in every stage.

What the link does depends on where the two identifiers are:

The two identifiersResult
Neither has been seenA new profile is created for them, and both are on it.
One is on a profile, the other has not been seenThe new identifier joins the existing profile.
Both are on different profilesThe two profiles are merged. The profile that ranks first keeps its ID (one your warehouse confirmed, otherwise the older one); the other ID now answers with it (redirected_from).
Both are already on one profileThe profile is unchanged.

Separating two identifiers earlier keeps them apart from later events; linking them here lifts that for this pair. The graph’s other rules still apply, and a link they do not allow is not made. The response then lists it under refused:

reasonMeaning
limitThe person would have more identifiers of that family than the graph’s limit allows. For a device family, the least recently seen device is replaced instead when it can be.
profile_capThe person would have more identifiers than the graph’s Identifiers per person safeguard allows
do_not_linkAnother identifier of one person was separated from an identifier of the other
memoYour warehouse identity graph judged these people apart on the same evidence
sharedYour warehouse identity graph holds the identifier as shared by several people
erasedThe person was erased recently
graph_pausedLinking is paused on this graph; nothing was changed

A new identifier whose link is refused still gets a profile of its own.

Request Body

FieldTypeRequiredDescription
aobjectYesThe first identifier
bobjectYesThe second identifier
a.family, b.familystringYesA family the graph links
a.value, b.valuestringOne of value or value_keyThe value as it arrives on events
a.variant, b.variantstringNoThe format of an already-hashed value
a.value_key, b.value_keystringOne of value or value_keyThe identifier’s value_key, exactly as a lookup returns it, for an identifier the graph already holds. To add an identifier the graph has not seen, send its value.
curl -X POST https://agentic.zeotap.com/api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/link \ -H "Authorization: Bearer <token>" \ -H "X-Workspace-ID: <workspace-id>" \ -H "Content-Type: application/json" \ -d '{ "a": { "family": "user_id", "value": "customer-42" }, "b": { "family": "email", "value": "pat@example.com" } }'

Response

{ "profile_id": "01a1ffc6-9118-77e2-a1c2-495a0a3c6344", "merged": ["01a1ffd2-4c07-7a51-b3e8-2f6c90d4a1b7"], "rounds": 1 }
FieldDescription
profile_idThe profile the stronger identifier is on afterwards
pendingtrue when that profile was created a moment ago
createdProfile IDs created by the link
mergedProfile IDs merged into profile_id
claimedHow many new identifiers joined an existing profile
refusedIdentifiers the link did not join, each with family, value_key, reason and the profile_id it stayed on
evictedDevices moved off the person to make room
reattributedShared devices moved to this person under the graph’s attribution

A refused link is still answered 200; check refused.

Separate Two Identifiers

POST /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/unlink

Separates two identifiers and keeps later events from joining them again. When they are on one profile, the weaker identifier (by the graph’s family order) moves to a new profile of its own; the stronger keeps the profile ID.

Request Body

FieldTypeRequiredDescription
a, bobjectYesThe two identifiers, as for Link Two Identifiers
reasonstringNoWhy they were separated, kept with the record

Response

{ "from_profile_id": "01a1ffc6-9118-77e2-a1c2-495a0a3c6344", "to_profile_id": "01a2047e-88b0-7c93-a6d1-55c1e2f0b9a3", "was_linked": true }

was_linked is false when the identifiers were already apart; they are still kept apart from then on. Separating waits while linking is paused on the graph.

Errors

Linking and separating answer the errors listed under Finding a Person, plus:

StatuscodeWhen
400family_not_declaredThe graph does not link that family
400unknown_identifierA value_key names an identifier the graph does not hold; send the identifier’s value instead
400same_identifierSeparating: both name the same identifier
409linking_pausedSeparating: linking is paused on the graph

Erasing a Person

POST /api/v1/workspaces/{id}/identity/erase

Erases a person from every place realtime identity keeps them, across every realtime graph of the workspace. See Erasing a person. Needs the identity.erase permission, and remains available on a workspace where realtime identity has since been turned off.

Request Body

FieldTypeRequiredDescription
familystringYesA family of one of the person’s identifiers
valuestringOne of value or value_keyThe value as it arrives on events
variantstringNoThe format of an already-hashed value
value_keystringOne of value or value_keyThe identifier’s value_key, exactly as a lookup returns it
request_idstringNoYour own reference for the request, such as a data subject request ticket, up to 200 characters. It is kept with the erasure and returned as client_request_id. Do not put personal data in it.
curl -X POST https://agentic.zeotap.com/api/v1/workspaces/{id}/identity/erase \ -H "Authorization: Bearer <token>" \ -H "X-Workspace-ID: <workspace-id>" \ -H "Content-Type: application/json" \ -d '{"family": "email", "value": "pat@example.com"}'

Response (abridged)

{ "request_id": "7e0c4b2a-93d1-4f58-a6b7-1c2d3e4f5a6b", "client_request_id": "DSR-4471", "status": "completed", "marker_expires_at": "2026-12-23T10:12:44Z", "graphs": [ { "graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "found": true, "profile_id": "01a1ffc6-9118-77e2-a1c2-495a0a3c6344", "identifiers": 3 } ] }
FieldDescription
request_idThe erasure’s ID
client_request_idThe request_id you sent, when you sent one
statuscompleted, or failed when something could not be erased; erase the person again to finish
marker_expires_atUntil when events sent before the erasure and warehouse runs cannot bring the person back
graphsWhat each realtime graph held: whether the person was found, their profile ID and how many identifiers were erased
storesOne entry per place the erasure reached, with store, class, status, count and, where useful, detail. status is erased, nothing_found, failed, not_configured, expires, not_built or documented_gap.

The erasure is recorded without the identifier itself. A missing family or value answers 400 with invalid_identifier; a request_id longer than 200 characters answers 400 with invalid_request_id.


Realtime Identity Card

Get the Card

GET /api/v1/workspaces/{id}/realtime-identity

Returns the workspace’s stage, its primary graph, the comparison with today’s profiles and its read policies.

Query parameterDescription
hoursThe comparison’s window, 1 to 720 hours. Default 24.
{ "enabled": true, "read_mode": "comparing", "primary_graph": { "id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "name": "Event identity", "events_only": true }, "families": ["anonymous_id", "email", "user_id"], "comparison": { "since": "2026-11-22T10:00:00Z", "hours": 24, "compared": 48120, "same": 46002, "expected": 2011, "unexpected": 107, "unreadable": 0, "skipped": 0, "expected_reasons": { "shared_device": 1450, "new_family": 561 }, "unexpected_reasons": { "not_in_graph": 107 }, "hourly": [] }, "policies": [ ... ], "can_manage": true, "max_custom_policies": 5 }

See Checking the graph before Live for what the comparison means.

Get the Comparison

GET /api/v1/workspaces/{id}/realtime-identity/comparison?hours=24

Returns the comparison object alone.


Read Policies

A read policy decides which of a person’s linked identifiers an audience, a Site or the identity serving API reads. Three are built in (all_links, warehouse_confirmed, logged_in_only); a workspace may add up to five of its own. See Read policies.

List Read Policies

GET /api/v1/workspaces/{id}/realtime-identity/read-policies

{ "read_policies": [ { "id": "all_links", "name": "All links", "preset": "all_links", "description": "Every identifier linked to the person.", "rules": { "edge_sources": null, "verified_only": false, "excluded_families": null }, "built_in": true, "uses": [], "warnings": [] }, { "id": "3d6f2a10-7b8c-4e9d-a1f2-0b3c4d5e6f70", "workspace_id": "660e8400-e29b-41d4-a716-446655440000", "name": "Verified, no phone", "preset": "custom", "rules": { "edge_sources": null, "verified_only": true, "excluded_families": ["phone"] }, "built_in": false, "created_at": "2026-11-10T15:04:00Z", "updated_at": "2026-11-10T15:04:00Z", "uses": [{ "kind": "audience", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Cart abandoners" }], "warnings": [] } ] }

uses lists the audiences and Sites reading under the policy. warnings are matches_nothing, excludes_every_family and verification_off.

Create a Read Policy

POST /api/v1/workspaces/{id}/realtime-identity/read-policies

FieldTypeRequiredDescription
namestringYes1 to 100 characters, unique in the workspace
rules.edge_sourcesstring[]NoKeep only links from these sources: stream (your events), admin, batch (your warehouse). Empty keeps every source.
rules.verified_onlybooleanNoKeep only verified links
rules.excluded_familiesstring[]NoLeave out these families, and every link through them (at most 32)
rules.min_confidencenumberNoLeave out probabilistic warehouse links below this confidence, 0 to 1

A policy must leave something out; one that keeps every link is refused, since that is All links. Returns the policy with 201 Created.

{ "name": "Verified, no phone", "rules": { "verified_only": true, "excluded_families": ["phone"] } }

Update a Read Policy

PUT /api/v1/workspaces/{id}/realtime-identity/read-policies/{policyId}

Replaces a custom policy’s name and rules. Audiences and Sites reading under it use the new rules from their next evaluation. Built-in policies cannot be changed.

Delete a Read Policy

DELETE /api/v1/workspaces/{id}/realtime-identity/read-policies/{policyId}

Returns 204 No Content. A policy an audience or Site reads under is refused with 409 read_policy_in_use, naming them.

Estimate a Policy’s Effect

GET /api/v1/workspaces/{id}/realtime-identity/read-policies/{policyId}/impact

Measures, on a sample of up to 200 recently seen people, how much the policy narrows what is read compared with All links. policyId may be a built-in key.

{ "policy": "logged_in_only", "sampled": 200, "narrowed": 141, "identifiers_all_links": 812, "identifiers_kept": 377, "narrowed_share": 0.705, "kept_identifier_share": 0.464, "warnings": [] }

Errors

StatusCodeMeaning
400read_policy_invalidA missing name, invalid rules, a family the graph does not link, a policy that keeps every link, or a change to a built-in policy
404read_policy_not_foundNo such policy
409read_policy_name_takenAnother policy has that name
409read_policy_limitThe workspace already has five custom policies
409read_policy_in_useAn audience or Site reads under the policy
503identity_store_not_ready, identity_store_unavailable(Impact) The identity store did not answer

Graph Roles and Switching

These routes replace a serving graph with a candidate, and let a second graph serve particular parent models. See Switching and Binding Realtime Graphs.

List Roles

GET /api/v1/workspaces/{id}/realtime-identity/roles

Returns every graph that links events, its role and the parent models it serves, with the open and recent switches.

FieldDescription
read_modeThe workspace’s stage
graphsEach graph’s id, name, role, primary, candidate_for, warm_until, events_only, bindings, label (the role in words, such as "Candidate for Event identity") and hidden
bindingsParent models served by a graph other than the primary: identity_graph_id, parent_model_id, parent_model_name
holdingsWhich parent models each graph may serve (kind golden_record or user)
switchesThe ten most recent switches
max_servingHow many graphs may serve at once (4)
binding_offeredWhether binding a parent model is offered for this workspace
recommendationsParent models whose realtime audiences the graph building their golden record should serve

Create an Events-Only Graph

POST /api/v1/workspaces/{id}/realtime-identity/graphs

Creates a graph that starts with another graph’s rules and realtime settings. It serves nothing until it is prepared and switched in.

FieldTypeRequiredDescription
namestringYes1 to 100 characters
descriptionstringNoDescription
copy_fromstring (UUID)YesThe graph whose rules the new graph starts with

Returns the graph with 201 Created.

Prepare a Candidate

POST /api/v1/workspaces/{id}/realtime-identity/candidates

Makes a graph the candidate of a serving graph. From then on it receives the same events and starts from that graph’s people, so each person keeps their profile ID. It serves nothing until it is switched in.

FieldTypeRequiredDescription
graph_idstring (UUID)YesThe graph to prepare
for_graph_idstring (UUID)YesThe serving graph it may replace
scopestringNoall (the default: replace the graph entirely) or parent_models
parent_model_idsstring[]For parent_modelsThe parent models the candidate should serve. Each must be the candidate’s golden record or one of its models, and served today by for_graph_id.

Returns the switch with 201 Created:

{ "id": "a8b7c6d5-e4f3-4a2b-9c1d-0e9f8a7b6c5d", "workspace_id": "660e8400-e29b-41d4-a716-446655440000", "candidate_graph_id": "4c2e7f10-5a6b-4c3d-8e9f-a0b1c2d3e4f5", "target_graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "scope": "all", "parent_model_ids": [], "status": "preparing", "seed_status": "seeding", "keep_serving": [], "created_at": "2026-11-23T09:30:00Z", "updated_at": "2026-11-23T09:30:03Z" }

A switch’s status moves through preparing, ready, switched and then finalized or switched_back; a stopped candidate is cancelled. seed_status is pending, seeding, rebuilding, seeded or failed.

Stop a Candidate

DELETE /api/v1/workspaces/{id}/realtime-identity/candidates/{switchId}

Stops a candidate before it is switched in: it stops receiving events and serves nothing. Returns the switch.

Get a Switch

GET /api/v1/workspaces/{id}/realtime-identity/switches/{switchId}

Compare a Candidate

GET /api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/change-preview

Compares the candidate with the graph it would replace, runs the switch’s checks and lists what would change. Add ?keep_serving=<parent model ID>,… to keep those parent models on the graph serving them now.

FieldDescription
candidate_name, target_nameThe two graphs
comparisonIdentifiers and profiles each graph holds, and how many people would be answered with another profile ID, split or joined, with a few examples. Both graphs are compared as a lookup answers them: an identifier the warehouse answer owns belongs to its warehouse profile, any other to the profile events linked it to. When the two graphs hold more than limit identifiers between them, too_large is true and the counts are 0.
rule_differencesHow the candidate’s rules differ
checksEach check’s code, ok, message and, where offered, one-click resolutions
blockedWhether a failed check stops the switch
effectsmerge_calls_held, people_changing, audiences_affected, syncs_rekeyed, stores_rekeyed. merge_calls_held and people_changing are null when they were not counted: no comparison, or too_large is true.
afterEvery serving graph and what it serves after the switch
confirm_textWhat the switch’s confirmation must say: the candidate’s name
warm_untilWhen the warm period would end

Switch

POST /api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/switch

Switches a ready candidate in. The replaced graph stays warm until warm_until, so you can switch back.

FieldTypeRequiredDescription
confirmstringYesThe candidate’s name, as confirm_text gives it
keep_servingstring[]NoParent model IDs to keep on the graph serving them now

Returns the switch.

Finalize

POST /api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/finalize

Ends the warm period now. Destination merges held for the switch are released. Returns the switch.

Switch Back

POST /api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/switch-back

Restores the roles from before the switch, during the warm period. Changes already delivered to destinations are not undone; merges still held are cancelled. Returns the switch.

Unbind a Parent Model

DELETE /api/v1/workspaces/{id}/realtime-identity/bindings/{parentModelId}

Returns a parent model to the primary realtime graph. Refused with 409 realtime_role_conflict while realtime audiences on it are served by the graph that built its golden record. Returns 204 No Content.

Errors

StatusCodeMeaning
400invalid_name, invalid_copy_from(Create graph) A missing name or source graph
400invalid_graph, invalid_scope, invalid_parent_models, parent_model_not_held(Prepare) The request does not name a valid candidate and scope
400invalid_keep_servingkeep_serving holds something other than parent model IDs
400confirmation_mismatchconfirm is not the candidate’s name
404not_foundNo such graph, switch or binding
409not_realtimeThe graph does not link events in real time yet
409realtime_role_conflictThe change conflicts with the workspace’s graph roles; the message says how
409switch_stateThe switch is not at a step where that can be done
409switch_blockedA check failed; the message lists them

Warehouse Confirmation

For a graph with both a realtime half and a warehouse half. See Warehouse Confirmation.

Get Confirmation

GET /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/confirmation

{ "has_warehouse_half": true, "export": { "graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "workspace_id": "660e8400-e29b-41d4-a716-446655440000", "status": "ready", "reconciled_at": "2026-11-23T06:00:12Z" }, "confirmation": { "graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "run_id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e", "computed_at": "2026-11-23T06:20:41Z", "waiting": 312, "disagreeing": 4, "compared": 41200, "sampled": false, "last_confirmed_at": "2026-11-23T06:20:41Z" }, "views": { "observations": "<schema>.<observations view>", "changes": "<schema>.<changes view>", "id_map": "<schema>.<id map view>" } }

A graph without both halves answers {"has_warehouse_half": false}.

Run Confirmation Now

POST /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/confirmation

Brings the graph’s warehouse views up to date and checks confirmation now. Returns the same object. A failure is recorded on export rather than returned.

Get Applied Warehouse Results

GET /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/projection

Returns the warehouse results applied to the graph: the live one and recent ones (live, generations), recent runs, queued corrections (reconcile), recent rebuilds, and whether the last result can be undone (can_roll_back, rollback_until, rollback_reason).

Apply the Warehouse Result Now

POST /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/projection

Applies the graph’s current warehouse result now. Returns the run with 202 Accepted; its status moves from pending through running to completed, failed or cancelled.

Undo the Last Warehouse Result

POST /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/projection/rollback

Returns the graph to its previous warehouse result, within 24 hours of the last one going live. Corrections made under the undone result are revoked and destination merges it caused that are still held are cancelled. Entries and exits already delivered are not undone.

{ "from_gen": 18, "to_gen": 17, "kind": "delta", "generation_started_at": "2026-11-23T05:58:00Z", "reconcile_cancelled": 12, "revoked": 3, "reconcile_requeued": 0, "holds_cancelled": 2 }

Rebuild into a Candidate

POST /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/rebuild

Replays the graph’s evidence into a candidate under the candidate’s rules, so new rules apply to the people already linked. Each person keeps their profile ID where the new rules allow it. Returns the rebuild with 202 Accepted. The body is optional.

FieldTypeDescription
candidate_graph_idstring (UUID)The candidate to rebuild into. It must be a candidate for this graph. Omit it to create one.
modestringedges (the default: the graph’s realtime evidence) or observations (its observation rows in your warehouse, for a graph with a warehouse half)
settingsobjectFor a new candidate: realtime settings to apply, as in Update Realtime Settings
limitsobjectFor a new candidate: family name to the most values per person

Get a Rebuild

GET /api/v1/workspaces/{id}/identity-rebuilds/{runId}

{ "id": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f", "workspace_id": "660e8400-e29b-41d4-a716-446655440000", "source_graph_id": "f03d5957-63ef-46a9-a10d-7e6e16b84c0f", "candidate_graph_id": "4c2e7f10-5a6b-4c3d-8e9f-a0b1c2d3e4f5", "mode": "edges", "status": "running", "phase": "replay", "replayed": 120400, "linked": 118930, "refused": 1470, "ids_carried": 0, "ids_fresh": 0, "created_at": "2026-11-23T09:40:00Z" }

phase is replay, then ids (profile IDs carried over), then done.

Errors

StatusCodeMeaning
400rebuild_mode_invalidmode is not edges or observations, or observations on a graph with no warehouse half
400candidate_requiredName the candidate to rebuild into
404identity_graph_not_found, rebuild_not_found, not_foundNo such graph or rebuild
409identity_graph_no_batch_layerThe graph does not have both a realtime half and a warehouse half
409identity_store_unavailableThe workspace’s identity store is not available
409projection_already_runningA warehouse result is already being applied
409projection_no_rollbackThere is no earlier warehouse result to return to
409projection_rollback_windowThe last result went live more than 24 hours ago
409rebuild_candidate_invalidThe graph named is not a candidate for this graph
409rebuild_already_runningA rebuild into this candidate is already running

Identity Verification

How far the graph trusts identifiers stated by a browser, and the credentials your systems vouch for logins with. See Verifying Identity.

Get Verification Settings

GET /api/v1/workspaces/{id}/identity-verification

{ "level": "recommended", "consent_default": "allow", "can_manage": true, "secrets": [ { "id": "6a5b4c3d-2e1f-4a0b-9c8d-7e6f5a4b3c2d", "kid": "ik_Xq3vT9bLm2Pa", "status": "active", "created_at": "2026-11-01T12:00:00Z", "updated_at": "2026-11-01T12:00:00Z" } ], "server_credentials": [ { "id": "1f2e3d4c-5b6a-4987-8a6b-5c4d3e2f1a0b", "write_key_id": "5c7a3e90-1b2d-4f6a-8e3c-9d0b1a2c3e4f", "write_key_name": "Order service", "name": "Checkout backend", "key_prefix": "swk_9f3a1c2b", "status": "active", "last_used_at": "2026-11-23T08:59:12Z", "created_at": "2026-11-05T10:00:00Z" } ] }

A secret’s status is active, retiring (still verifying until not_after), expired or revoked. Secret values are never returned after they are created.

Update Verification Settings

PUT /api/v1/workspaces/{id}/identity-verification

FieldTypeDescription
levelstringoff, recommended or required
consent_defaultstringHow events with no consent information are treated: allow or deny

Send one or both. Returns the settings.

Rotate the Secret

POST /api/v1/workspaces/{id}/identity-verification/secrets

Creates the workspace’s new active secret for signing identity tokens. The body is optional. This route takes a signed-in session only: a REST API key is answered 403 with api_key_not_allowed, as when creating API keys.

FieldTypeDescription
grace_hoursintegerHow long the previous secret keeps verifying, 0 to 168. Default 24; 0 revokes it at once.

Returns the secret with 201 Created. The secret field is shown only in this response; store it with your other server secrets.

Revoke a Secret

DELETE /api/v1/workspaces/{id}/identity-verification/secrets/{secretId}

Stops the secret verifying at once. Returns 204 No Content.

Create a Server Write Credential

POST /api/v1/workspaces/{id}/identity-verification/server-credentials

Creates a server write credential (swk_…) for one of the workspace’s event sources. Every identifier on an event sent with it counts as verified. This route takes a signed-in session only: a REST API key is answered 403 with api_key_not_allowed.

FieldTypeRequiredDescription
write_key_idstring (UUID)YesThe event source the credential sends to
namestringYes1 to 100 characters, unique for the event source

Returns the credential with 201 Created. The secret field is shown only in this response.

Revoke a Server Write Credential

DELETE /api/v1/workspaces/{id}/identity-verification/server-credentials/{credentialId}

Returns 204 No Content.

Errors

StatusCodeMeaning
400invalid_level, invalid_consent_defaultA value outside the allowed ones
400nothing_to_changeNeither level nor consent_default was sent
400invalid_gracegrace_hours is outside 0 to 168
400invalid_name, invalid_write_keyA missing name, or an event source not in the workspace
404not_foundNo such secret or credential
409conflictAnother rotation finished at the same time; reload and try again
409name_takenThe event source already has a credential with that name
503verification_unavailableSecrets cannot be created right now

Common Errors

Management routes answer errors as {"error": "<message>", "code": "<code>"}.

StatusCodeMeaning
400The request body is not valid JSON
401Not authenticated
403permission_deniedThe caller does not hold the permission the route needs
403feature_not_enabledRealtime identity is not enabled for this workspace
404not_foundNo such graph in the workspace
409not_realtimeThe graph does not link events in real time
Last updated on