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
| Surface | Credential | Notes |
|---|---|---|
Identity serving API (/v1/identity/...) | Serving key (svk_…) carrying the serve:identity scope | Server-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/me | Site 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 host | Server 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:
| Permission | Allows |
|---|---|
identity_graphs.read | Reading a graph’s realtime state, event sources, people, read policies, switches and verification settings. |
identity_graphs.realtime_manage | Changing realtime settings, event sources and mappings, read policies, graph roles, warehouse confirmation and verification; linking and separating identifiers. |
identity.write | Linking 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.erase | Erasing 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
| Method | Path | Description |
|---|---|---|
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}/links | Read the evidence joining a profile’s identifiers |
POST | /v1/identity/resolve | Look up to 100 identifiers up in one call |
GET | /v1/identity/me | The current visitor’s profile ID (Site key) |
Management API
| Method | Path | Permission | Description |
|---|---|---|---|
GET | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime | identity_graphs.read | Get a graph’s realtime state |
PUT | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime | identity_graphs.realtime_manage | Update a graph’s realtime settings |
POST | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/enable | identity_graphs.realtime_manage | Give a warehouse graph a realtime half |
GET | /api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources | identity_graphs.read | List the graph’s event sources and mappings |
POST | /api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources | identity_graphs.realtime_manage | Add an event source |
PUT | /api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources/{sourceId} | identity_graphs.realtime_manage | Update an event source or its mapping |
DELETE | /api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources/{sourceId} | identity_graphs.realtime_manage | Remove an event source |
POST | /api/v1/workspaces/{id}/identity-graphs/{graphId}/event-sources/preview | identity_graphs.read | Preview a mapping on sample events |
GET | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/lookup | identity_graphs.read | Find a person by an identifier |
GET | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/profiles/{profileId} | identity_graphs.read | Get a profile and its evidence |
POST | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/link | identity_graphs.realtime_manage | Link two identifiers |
POST | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/unlink | identity_graphs.realtime_manage | Separate two identifiers |
POST | /api/v1/workspaces/{id}/realtime-identity/link | identity.write | Link a person’s identifiers from your server, and get the person back |
POST | /api/v1/workspaces/{id}/identity/erase | identity.erase | Erase a person |
GET | /api/v1/workspaces/{id}/realtime-identity | identity_graphs.read | Get the workspace’s realtime identity card |
GET | /api/v1/workspaces/{id}/realtime-identity/comparison | identity_graphs.read | Get the comparison with today’s profiles |
GET | /api/v1/workspaces/{id}/realtime-identity/read-policies | identity_graphs.read | List read policies |
POST | /api/v1/workspaces/{id}/realtime-identity/read-policies | identity_graphs.realtime_manage | Create a custom read policy |
PUT | /api/v1/workspaces/{id}/realtime-identity/read-policies/{policyId} | identity_graphs.realtime_manage | Update a custom read policy |
DELETE | /api/v1/workspaces/{id}/realtime-identity/read-policies/{policyId} | identity_graphs.realtime_manage | Delete a custom read policy |
GET | /api/v1/workspaces/{id}/realtime-identity/read-policies/{policyId}/impact | identity_graphs.read | Estimate a policy’s effect |
GET | /api/v1/workspaces/{id}/realtime-identity/roles | identity_graphs.read | List realtime graphs, their roles and bindings |
POST | /api/v1/workspaces/{id}/realtime-identity/graphs | identity_graphs.realtime_manage | Create an events-only graph |
POST | /api/v1/workspaces/{id}/realtime-identity/candidates | identity_graphs.realtime_manage | Prepare a candidate |
DELETE | /api/v1/workspaces/{id}/realtime-identity/candidates/{switchId} | identity_graphs.realtime_manage | Stop a candidate |
GET | /api/v1/workspaces/{id}/realtime-identity/switches/{switchId} | identity_graphs.read | Get a switch |
GET | /api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/change-preview | identity_graphs.read | Compare a candidate and run the switch checks |
POST | /api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/switch | identity_graphs.realtime_manage | Switch a candidate in |
POST | /api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/finalize | identity_graphs.realtime_manage | End the warm period |
POST | /api/v1/workspaces/{id}/realtime-identity/switches/{switchId}/switch-back | identity_graphs.realtime_manage | Switch back |
DELETE | /api/v1/workspaces/{id}/realtime-identity/bindings/{parentModelId} | identity_graphs.realtime_manage | Return a parent model to the primary graph |
GET | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/confirmation | identity_graphs.read | Get warehouse confirmation |
POST | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/confirmation | identity_graphs.realtime_manage | Run warehouse confirmation now |
GET | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/projection | identity_graphs.read | Get the warehouse results applied to the graph |
POST | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/projection | identity_graphs.realtime_manage | Apply the warehouse result now |
POST | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/projection/rollback | identity_graphs.realtime_manage | Undo the last warehouse result |
POST | /api/v1/workspaces/{id}/identity-graphs/{graphId}/realtime/rebuild | identity_graphs.realtime_manage | Rebuild a graph into a candidate |
GET | /api/v1/workspaces/{id}/identity-rebuilds/{runId} | identity_graphs.read | Get a rebuild |
GET | /api/v1/workspaces/{id}/identity-verification | identity_graphs.read | Get identity verification settings |
PUT | /api/v1/workspaces/{id}/identity-verification | identity_graphs.realtime_manage | Update the verification level and consent default |
POST | /api/v1/workspaces/{id}/identity-verification/secrets | identity_graphs.realtime_manage | Rotate the identity token secret |
DELETE | /api/v1/workspaces/{id}/identity-verification/secrets/{secretId} | identity_graphs.realtime_manage | Revoke a secret |
POST | /api/v1/workspaces/{id}/identity-verification/server-credentials | identity_graphs.realtime_manage | Create a server write credential |
DELETE | /api/v1/workspaces/{id}/identity-verification/server-credentials/{credentialId} | identity_graphs.realtime_manage | Revoke 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:
- By your events. Events sent to an event source the graph reads, such as
/v1/identify,/v1/trackor/v1/pageonhttps://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. - 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.
- 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 parameter | Applies to | Description |
|---|---|---|
graph | Every request | The ID of another graph that serves realtime. A graph that is not serving (a candidate, a warm graph) is answered 404. |
policy | Lookup by identifier, by profile ID, links and batch | A 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. |
variant | Lookup by identifier | The 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"
}
]
}| Field | Type | Description |
|---|---|---|
graph_id | string (UUID) | The graph that answered |
graph_name | string | Its name |
profile_id | string (UUID) | The person’s profile ID. Omitted when status is unknown. |
status | string | resolved, pending or unknown. See Status. |
redirected_from | string (UUID) | Set when you asked for a profile ID that was merged into this one |
identifiers | array | The person’s identifiers. Personal data is never returned in plain text: see Personal data in answers. |
identifiers[].value_key | string | The identifier’s value, or its SHA-256 hash when it is personal data |
identifiers[].hashed | boolean | true when value_key is a SHA-256 hash |
identifiers[].trust | string | verified (your server, your warehouse or an admin vouched for it) or client_asserted (a browser or app stated it) |
identifiers[].origin | string | Where 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 a Profile’s Links
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, andconfidencefor 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’sgeneration, andbatch_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
| Field | Type | Required | Description |
|---|---|---|---|
identifiers | array | Yes | 1 to 100 identifiers |
identifiers[].family | string | Yes | The identifier’s family, such as email or user_id |
identifiers[].value | string | Yes | The value as your systems hold it |
identifiers[].variant | string | No | The 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 parameter | Description |
|---|---|
anonymous_id | The visitor’s anonymous ID |
user_id | The 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
status | Meaning |
|---|---|
resolved | A settled profile. |
pending | A profile created a moment ago that may still join another. Ask again shortly, or use it and follow profile changes. |
unknown | Nobody 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
| Status | Code | Meaning |
|---|---|---|
400 | invalid_identifier | The value is not an identifier of that family (or, on /me, neither anonymous_id nor user_id was sent) |
400 | family_not_declared | The 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. |
400 | invalid_batch | A batch with no identifiers or more than 100 |
400 | read_policy_not_found | policy names no read policy of the workspace |
401 | Missing, invalid or revoked credential, or a credential of the wrong kind | |
403 | The serving key does not carry serve:identity | |
403 | feature_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. |
403 | realtime_identity_not_enabled | Realtime identity is not enabled for the workspace |
403 | site_not_live | (/me) The Site is not published, or is paused |
403 | origin_not_allowed | (/me) The page is not on one of the Site’s domains |
404 | identity_graph_not_found | graph names no serving realtime graph of the workspace |
429 | The key’s rate limit was exceeded | |
503 | identity_unavailable | The 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
}| Field | Description |
|---|---|
realtime_role | serving, candidate, warm or none. See Switching and Binding Realtime Graphs. |
realtime_primary | Whether this is the workspace’s primary realtime graph |
attribution | Who a shared device belongs to: oldest, newest or none. See Shared Devices. |
families | The families the graph links, strongest first, with each one’s limit per person and whether it is a device family |
read_mode | The workspace’s stage: building, comparing or live, or star while realtime identity is not in use yet |
verification | The workspace’s verification level |
stats | Profile and identifier counts linked from events. Omitted, with "degraded": "store_unreachable", when the identity store did not answer. |
warehouse | The 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_manage | Whether 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.
| Field | Type | Range | Description |
|---|---|---|---|
profile_cap | integer | 2–500 | Identifiers per person |
link_rate_per_hour | integer | 1–100,000 | New links per identifier per hour |
settle_ms | integer | 100–60,000 | How long a new profile stays pending |
evict_min_idle_days | integer | 1–3,650 | Days before a device can be replaced |
anon_ttl_days | integer | 30–3,650 | Days an inactive identifier is kept |
paused | boolean | Pause linking. A paused graph links nothing new. | |
device_class | object | Family name to true or false: which families are devices | |
reconcile_delay_minutes | integer | 1–1,440 | How long separations from a warehouse result wait after it is applied |
projection_rows_per_sec | integer | 1,000–1,000,000 | How fast a warehouse result is applied |
warm_period_days | integer | 1–30 | How 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
| Field | Type | Required | Description |
|---|---|---|---|
write_key_id | string (UUID) | Yes | The workspace event source to read |
allow_webhook | boolean | No | Let a partner webhook source link identities |
mappings | array | No | The source’s mapping. Omit it to use the standard mapping for the source type. |
Each mapping:
| Field | Type | Required | Description |
|---|---|---|---|
kind | string | No | path (the default) or cookie_sync |
path | string | For path | A dotted event path such as traits.email or properties.member_id |
family | string | Yes | A family the graph has an enabled matching rule for |
variant | string | No | The value’s format, for an already-hashed value |
event_types | string[] | No | Limit 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.
| Field | Type | Description |
|---|---|---|
status | string | active, draft or disabled |
allow_webhook | boolean | Let a partner webhook source link identities |
mappings | array | The full new mapping |
mapping_version | integer | The 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.
| Field | Type | Required | Description |
|---|---|---|---|
events | object[] | Yes | 1 to 100 sample events, as your sources send them |
source_id | string (UUID) | No | Preview this source’s saved mapping |
mappings | array | No | Preview 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
| Status | Code | Meaning |
|---|---|---|
400 | invalid_write_key | write_key_id is missing or not a UUID |
400 | source_cannot_link | This kind of event source cannot link identities |
400 | too_many_mappings | More than 50 mappings |
400 | invalid_path, invalid_kind, invalid_family, invalid_variant, invalid_event_type, duplicate_mapping | A mapping row is not valid; the message names the row |
400 | family_not_declared | The graph has no enabled matching rule for the family |
400 | invalid_status | status is not active, draft or disabled |
400 | invalid_events | A preview with no events or more than 100 |
404 | not_found | No such event source |
409 | source_exists | The event source already feeds the graph |
409 | mapping_changed | Someone else changed the mapping since you read it |
409 | mapping_disagrees | Another 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 parameter | Required | Description |
|---|---|---|
family | Yes | The identifier’s family |
value | Yes | The value as it arrives on events |
variant | No | The 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
| Status | Code | Meaning |
|---|---|---|
400 | invalid_identifier | The value is not an identifier of that family |
400 | family_not_declared | (Lookup) The graph has no matching rule for that family |
404 | not_found | No such graph, or no profile with that ID |
409 | not_realtime | The graph does not link events in real time |
409 | no_identity_store | Realtime identity is not enabled for this workspace |
503 | identity_store_not_ready, identity_store_unavailable | The 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_idsnames the others. - Safeguards. An identifier a safeguard keeps out, such as a second user ID for one person, is listed in
refusedwith 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
| Field | Type | Required | Description |
|---|---|---|---|
identifiers | array | Yes | 1 to 20 identifiers of one person |
identifiers[].family | string | Yes | The identifier’s family, for example user_id, email or anonymous_id. The graph must match on it. |
identifiers[].value | string | Yes | The plain value. It is normalized as events are. |
identifiers[].variant | string | No | The format of a value you have already hashed, for example email_sha256_lowercase |
graph_id | string (UUID) | No | A graph that serves realtime. Leave it out for the workspace’s primary realtime graph. |
event_time | string (RFC 3339) | No | When 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" }
]
}| Field | Type | Description |
|---|---|---|
profile_id | string (UUID) | The person the identifiers now belong to. Omitted when every identifier was refused. |
status | string | resolved or pending, as a lookup reads the person now. See Status. |
created | boolean | true when this call created the person |
merged_profile_ids | array | People this call joined into this one; their profile IDs now lead here |
refused | array | Identifiers that were not linked, each with family, value_key, hashed and reason |
duplicate | boolean | true for a retry with an Idempotency-Key already used |
identifiers | array | The person’s identifiers, with personal data hashed as in Personal data in answers |
Errors
| Status | Code | Meaning |
|---|---|---|
400 | invalid_batch | No identifiers, or more than 20 |
400 | invalid_identifier | A value is not an identifier of its family; the message names which |
400 | family_not_declared | The graph does not match on that family |
400 | invalid_idempotency_key | The Idempotency-Key is longer than 200 characters |
403 | permission_denied | The caller, or the REST API key, does not hold identity.write |
403 | feature_not_enabled | Realtime identity is not enabled for the workspace |
404 | no_realtime_graph | The workspace has no graph serving realtime |
404 | not_found | graph_id names no graph of the workspace |
409 | graph_not_serving | graph_id names a graph that does not serve realtime |
409 | linking_paused | Linking is paused on the graph |
503 | identity_unavailable | The 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
identifyevent, 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;
readssays 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:
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | No | Your user ID for the person |
anonymousId | string | No | The device or browser ID |
traits | object | No | Traits, for example email or phone |
context.identities | object | No | Further identifiers by family |
messageId | string | No | Your ID for the event. Send one to make a retry safe; one is generated when you leave it out and returned as message_id. |
type | string | No | Defaults 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"
}| Field | Type | Description |
|---|---|---|
refused | array | Identifiers that were not linked, each with family, value_key, hashed, reason and the profile_id it stays on. Two people are never joined silently. |
duplicate | boolean | true when this messageId was already linked; the person is answered and nothing is linked again |
reads | string | The workspace’s stage: building, comparing or live |
message_id | string | The event’s ID; send it again to retry |
Errors
| Status | Code | Meaning |
|---|---|---|
400 | invalid_body | The body is not one JSON event |
400 | native_app_unsupported | The event source sends to a native app, which has no realtime identity graph |
401 | server_credential_required | No server write credential in the Authorization header |
401 | invalid_credential | The credential is unknown or revoked |
403 | feature_not_enabled | Realtime identity is not enabled for the workspace |
409 | source_pending_schema | The event source is in schema review and accepts no events yet |
422 | contract_blocked | The event source’s tracking plan blocks the event |
422 | the reason | Nothing was linked; code says why, for example no_identifier, not_covered (the graph does not read this source), consent or graph_paused |
429 | rate_limited | Too many requests for this credential. Retry after the Retry-After header. |
503 | link_unavailable, publish_failed | Not 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
Link Two Identifiers
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 identifiers | Result |
|---|---|
| Neither has been seen | A new profile is created for them, and both are on it. |
| One is on a profile, the other has not been seen | The new identifier joins the existing profile. |
| Both are on different profiles | The 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 profile | The 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:
reason | Meaning |
|---|---|
limit | The 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_cap | The person would have more identifiers than the graph’s Identifiers per person safeguard allows |
do_not_link | Another identifier of one person was separated from an identifier of the other |
memo | Your warehouse identity graph judged these people apart on the same evidence |
shared | Your warehouse identity graph holds the identifier as shared by several people |
erased | The person was erased recently |
graph_paused | Linking is paused on this graph; nothing was changed |
A new identifier whose link is refused still gets a profile of its own.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
a | object | Yes | The first identifier |
b | object | Yes | The second identifier |
a.family, b.family | string | Yes | A family the graph links |
a.value, b.value | string | One of value or value_key | The value as it arrives on events |
a.variant, b.variant | string | No | The format of an already-hashed value |
a.value_key, b.value_key | string | One of value or value_key | The 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
}| Field | Description |
|---|---|
profile_id | The profile the stronger identifier is on afterwards |
pending | true when that profile was created a moment ago |
created | Profile IDs created by the link |
merged | Profile IDs merged into profile_id |
claimed | How many new identifiers joined an existing profile |
refused | Identifiers the link did not join, each with family, value_key, reason and the profile_id it stayed on |
evicted | Devices moved off the person to make room |
reattributed | Shared 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
| Field | Type | Required | Description |
|---|---|---|---|
a, b | object | Yes | The two identifiers, as for Link Two Identifiers |
reason | string | No | Why 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:
| Status | code | When |
|---|---|---|
400 | family_not_declared | The graph does not link that family |
400 | unknown_identifier | A value_key names an identifier the graph does not hold; send the identifier’s value instead |
400 | same_identifier | Separating: both name the same identifier |
409 | linking_paused | Separating: 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
| Field | Type | Required | Description |
|---|---|---|---|
family | string | Yes | A family of one of the person’s identifiers |
value | string | One of value or value_key | The value as it arrives on events |
variant | string | No | The format of an already-hashed value |
value_key | string | One of value or value_key | The identifier’s value_key, exactly as a lookup returns it |
request_id | string | No | Your 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
}
]
}| Field | Description |
|---|---|
request_id | The erasure’s ID |
client_request_id | The request_id you sent, when you sent one |
status | completed, or failed when something could not be erased; erase the person again to finish |
marker_expires_at | Until when events sent before the erasure and warehouse runs cannot bring the person back |
graphs | What each realtime graph held: whether the person was found, their profile ID and how many identifiers were erased |
stores | One 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 parameter | Description |
|---|---|
hours | The 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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | 1 to 100 characters, unique in the workspace |
rules.edge_sources | string[] | No | Keep only links from these sources: stream (your events), admin, batch (your warehouse). Empty keeps every source. |
rules.verified_only | boolean | No | Keep only verified links |
rules.excluded_families | string[] | No | Leave out these families, and every link through them (at most 32) |
rules.min_confidence | number | No | Leave 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
| Status | Code | Meaning |
|---|---|---|
400 | read_policy_invalid | A 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 |
404 | read_policy_not_found | No such policy |
409 | read_policy_name_taken | Another policy has that name |
409 | read_policy_limit | The workspace already has five custom policies |
409 | read_policy_in_use | An audience or Site reads under the policy |
503 | identity_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.
| Field | Description |
|---|---|
read_mode | The workspace’s stage |
graphs | Each 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 |
bindings | Parent models served by a graph other than the primary: identity_graph_id, parent_model_id, parent_model_name |
holdings | Which parent models each graph may serve (kind golden_record or user) |
switches | The ten most recent switches |
max_serving | How many graphs may serve at once (4) |
binding_offered | Whether binding a parent model is offered for this workspace |
recommendations | Parent 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.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | 1 to 100 characters |
description | string | No | Description |
copy_from | string (UUID) | Yes | The 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.
| Field | Type | Required | Description |
|---|---|---|---|
graph_id | string (UUID) | Yes | The graph to prepare |
for_graph_id | string (UUID) | Yes | The serving graph it may replace |
scope | string | No | all (the default: replace the graph entirely) or parent_models |
parent_model_ids | string[] | For parent_models | The 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.
| Field | Description |
|---|---|
candidate_name, target_name | The two graphs |
comparison | Identifiers 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_differences | How the candidate’s rules differ |
checks | Each check’s code, ok, message and, where offered, one-click resolutions |
blocked | Whether a failed check stops the switch |
effects | merge_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. |
after | Every serving graph and what it serves after the switch |
confirm_text | What the switch’s confirmation must say: the candidate’s name |
warm_until | When 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.
| Field | Type | Required | Description |
|---|---|---|---|
confirm | string | Yes | The candidate’s name, as confirm_text gives it |
keep_serving | string[] | No | Parent 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
| Status | Code | Meaning |
|---|---|---|
400 | invalid_name, invalid_copy_from | (Create graph) A missing name or source graph |
400 | invalid_graph, invalid_scope, invalid_parent_models, parent_model_not_held | (Prepare) The request does not name a valid candidate and scope |
400 | invalid_keep_serving | keep_serving holds something other than parent model IDs |
400 | confirmation_mismatch | confirm is not the candidate’s name |
404 | not_found | No such graph, switch or binding |
409 | not_realtime | The graph does not link events in real time yet |
409 | realtime_role_conflict | The change conflicts with the workspace’s graph roles; the message says how |
409 | switch_state | The switch is not at a step where that can be done |
409 | switch_blocked | A 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.
| Field | Type | Description |
|---|---|---|
candidate_graph_id | string (UUID) | The candidate to rebuild into. It must be a candidate for this graph. Omit it to create one. |
mode | string | edges (the default: the graph’s realtime evidence) or observations (its observation rows in your warehouse, for a graph with a warehouse half) |
settings | object | For a new candidate: realtime settings to apply, as in Update Realtime Settings |
limits | object | For 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
| Status | Code | Meaning |
|---|---|---|
400 | rebuild_mode_invalid | mode is not edges or observations, or observations on a graph with no warehouse half |
400 | candidate_required | Name the candidate to rebuild into |
404 | identity_graph_not_found, rebuild_not_found, not_found | No such graph or rebuild |
409 | identity_graph_no_batch_layer | The graph does not have both a realtime half and a warehouse half |
409 | identity_store_unavailable | The workspace’s identity store is not available |
409 | projection_already_running | A warehouse result is already being applied |
409 | projection_no_rollback | There is no earlier warehouse result to return to |
409 | projection_rollback_window | The last result went live more than 24 hours ago |
409 | rebuild_candidate_invalid | The graph named is not a candidate for this graph |
409 | rebuild_already_running | A 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
| Field | Type | Description |
|---|---|---|
level | string | off, recommended or required |
consent_default | string | How 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.
| Field | Type | Description |
|---|---|---|
grace_hours | integer | How 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.
| Field | Type | Required | Description |
|---|---|---|---|
write_key_id | string (UUID) | Yes | The event source the credential sends to |
name | string | Yes | 1 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
| Status | Code | Meaning |
|---|---|---|
400 | invalid_level, invalid_consent_default | A value outside the allowed ones |
400 | nothing_to_change | Neither level nor consent_default was sent |
400 | invalid_grace | grace_hours is outside 0 to 168 |
400 | invalid_name, invalid_write_key | A missing name, or an event source not in the workspace |
404 | not_found | No such secret or credential |
409 | conflict | Another rotation finished at the same time; reload and try again |
409 | name_taken | The event source already has a credential with that name |
503 | verification_unavailable | Secrets cannot be created right now |
Common Errors
Management routes answer errors as {"error": "<message>", "code": "<code>"}.
| Status | Code | Meaning |
|---|---|---|
400 | The request body is not valid JSON | |
401 | Not authenticated | |
403 | permission_denied | The caller does not hold the permission the route needs |
403 | feature_not_enabled | Realtime identity is not enabled for this workspace |
404 | not_found | No such graph in the workspace |
409 | not_realtime | The graph does not link events in real time |