Entities
The Entities operations of the Hub REST API (18 operations).
Generated from Synap-core/backend main at 24fabe7, which can be newer than the stable release self-hosters install.
bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
userId*stringThe caller's own user id, or me.
profileSlug?stringtype?stringDeprecated alias for profileSlug.
workspaceId?stringprojectId?stringProject lens: only the project and what is filed into it.
facetSlug?stringOnly entities carrying a live facet of this role (e.g. client).
limit?stringArray of entities
application/json- response
[index: integer]?curl -X GET 'https://pod.example.com/api/hub/users/string/entities'[ { "property1": null, "property2": null }]bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
Counts by kind
application/json- response
total*integerbyProfile*array<>curl -X GET 'https://pod.example.com/api/hub/entities/without-project/counts'{ "total": 0, "byProfile": [ { "profileSlug": "string", "count": 0 } ]}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
q?stringFree-text search query. Refused (403 GRANT_DOOR_UNSUPPORTED) for a scoped key: search is not bounded by a grant. List without q instead.
profileSlug?stringworkspaceId?stringprojectId?stringProject lens — narrows results to a single project's data (the project entity + everything that belongs_to it). Pure-narrowing; cannot widen access past the user floor.
withoutProject?stringtrue = only the things filed into NO project (the 'Not in a project' list). 400 with projectId or q. Counts by kind: GET /entities/without-project/counts.
"true""false"limit?stringoffset?stringZero-based offset for cursor-free pagination (default 0).
sort?string<field>[:asc|:desc] (default desc), field one of createdAt, updatedAt, title, lastInteractionAt (never-contacted last). Applied in SQL before paging. Any other value is a 400; not combinable with q.
scope?stringpod = pod-wide entities only (null workspaceId); workspace = single workspace (requires workspaceId); all = merge across all accessible workspaces.
"pod""workspace""all"includePodWide?stringWhen a workspaceId is supplied, include pod-wide (null workspaceId) globals in the result. Defaults to true so a workspace lens returns 'that workspace + pod-wide globals' — the behavior agents and the CRM expect. Set false to return only the exact workspace's rows.
facetSlug?stringKind + Facets filter — only return entities carrying a live facet of this role-profile slug (e.g. investor).
facetProfileId?stringSame as facetSlug but by profile id. Wins if both are set.
includeFacets?stringtrue = each row also carries facetSlugs and facets (each role facet with its overlay properties and status, e.g. a lead's leadStage), only on a row wearing ≥1 role, loaded in one batch per page under the same lens as the rows. Default false: rows carry no facets. 400 with q.
"true""false"includeMedia?stringtrue = each row that links a file (row --references--> file) also carries media: up to 12 { id, title, mimeType }, oldest link first, only files the caller may read on its own (the GET /files/{id}/url floor), loaded in one batch per page. Sign one with GET /files/{id}/url. Default false: rows carry no media. 400 with q.
"true""false"createdAfter?stringCreation-date window, INCLUSIVE lower bound (ISO-8601). Together with createdBefore forms the half-open interval [createdAfter, createdBefore), so consecutive windows tile. Rejected with 400 when combined with q — see createdBefore.
createdBefore?stringCreation-date window, EXCLUSIVE upper bound (ISO-8601). NOT combinable with q: the q branch is a relevance-ranked top-N served by Typesense, and a date window is an exhaustive question, so silently truncating one to the other would under-report. Ask for the window without q.
lastInteractionAfter?stringLast-interaction window, INCLUSIVE lower bound (ISO-8601): people we last spoke to on or after this. 400 with q.
lastInteractionBefore?stringLast-interaction window, EXCLUSIVE upper bound (ISO-8601). 'Who haven't I spoken to in a month' = this at now-30d with includeNever=true and sort=lastInteractionAt:asc. 400 with q.
includeNever?stringtrue = a last-interaction window also returns the people never contacted (no value). Default false.
"true""false"filters?stringJSON array of view filters, ANDed: [{"field":"properties.stage","operator":"equals","value":"won"}]. field is title, preview, type, createdAt, updatedAt or properties.<slug>; operator is a view filter operator (equals, not_equals, contains, not_contains, in, not_in, greater_than, greater_than_or_equal, less_than, less_than_or_equal, is_empty, is_not_empty). At most 10 clauses. A properties.<slug> clause needs profileSlug naming a kind that declares the property; an unknown property, a secret property, malformed JSON or too many clauses is a 400. Applied after the caller's read floor, so it only narrows. 400 with q.
includeWorkspace?stringtrue = each row also carries workspace: { id, name } of the space it lives in, null for a pod-wide row. Names only the spaces of the rows returned. Default false. 400 with q.
"true""false"Array of entities
application/json- response
[index: integer]?curl -X GET 'https://pod.example.com/api/hub/entities'[ { "id": "string", "profileSlug": "string", "type": "string", "title": "string", "preview": "string", "description": "string", "properties": { "property1": null, "property2": null }, "systemData": { "property1": null, "property2": null }, "userId": "string", "workspaceId": "string", "documentId": "string", "version": 0, "createdAt": "string", "updatedAt": "string", "lastInteractionAt": "string", "status": "string", "statusCategory": "string", "facetSlugs": [ "string" ], "facets": [ { "facetId": "string", "slug": "string", "properties": { "property1": null, "property2": null }, "status": "string" } ], "media": [ { "id": "string", "title": "string", "mimeType": "string" } ], "workspace": { "id": "string", "name": "string" } }]bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
application/json- body
userId?stringOwner of the entity. Defaults to the authenticated user.
agentUserId?stringAgent user that performed the write. Used for proposal authorship.
workspaceId?stringTarget workspace. Falls back to profile.entityScope and the user's first accessible workspace.
projectId?stringFile the new entity into a project (its entity id). Stamps a belongs_to_project edge at materialization, so project-scoped recall (ask with projectId) finds it. Orthogonal to workspaceId.
profileSlug?stringProfile slug. Provide profileSlug, profileId, or the deprecated type alias.
profileId?stringProfile UUID. Resolved to the profile's slug server-side; takes precedence over profileSlug/type.
uuidtype?stringDeprecated alias for profileSlug. Prefer profileSlug.
title*stringdescription?stringproperties?content?stringLong-form markdown body. When set, a linked, versioned document is created (MinIO-stored) instead of inlining into properties.
reasoning?stringThe proposing agent's rationale for this action, surfaced in the proposal inbox.
source?stringOrigin signal for downstream attribution.
"intelligence""agent""openwebui-pipeline""extension""cli""n8n""raycast"sourceMessageId?stringOptional message ID that triggered this write (for event chain causality).
sessionId?stringOptional session ID to link proposals created by this write to an active focus session.
facets?array<>Kind + Facets: role-profiles to attach to the new entity in the same call (each via the governed attachFacet door). Applied only when the entity materializes. slug is canonical; profileSlug is accepted as an alias for parity with the /structure and tRPC facet shapes.
externalId?stringStrong cross-source identity anchor for this subject, as provider:id (e.g. discord:123456789012345678). Registered as an external_id identity signal so a later create with the SAME value auto-resolves to the same entity (dedup) instead of minting a duplicate — the strong atom that the weak email/phone/url auto-extraction cannot express for opaque connector ids. Opaque and case-sensitive; the provider prefix namespaces the id.
expectedLabel?stringThe declared session-output slot this entity fulfils, exactly as declared on the session's expected outputs. Left unset when the create doesn't fulfil a specific declared slot.
Created entity (with effectiveWorkspaceId echo)
application/json- response
status*stringe.g. 'created' or 'proposed'.
message?stringid?stringproposalId?string|nullproposedEntityId?string|nullworkspaceId?string|nulleffectiveWorkspaceId*|Workspace the entity actually landed in. May be null for pod-wide profiles.
proposalType?stringPresent when status is "proposed". "join" for a workspace-join gate, else "." (e.g. "entity.create").
reviewUrl?stringPresent when status is "proposed". Absolute URL to review the proposal in the Studio.
deferred?trueWorkspace-join gate only (proposalType "join"): this write was KEPT on the join request and is replayed for you once the join is approved — do not resend it.
trueref?stringWith deferred: the kept write's ref on the join proposal.
facets?array<>Kind + Facets: per-role attach outcome for any facets passed in the request (status attached/proposed/error).
writeReceipt?curl -X POST 'https://pod.example.com/api/hub/entities' \ -H 'Content-Type: application/json' \ -d '{ "title": "string"}'{ "status": "string", "message": "string", "id": "string", "proposalId": "string", "proposedEntityId": "string", "workspaceId": "string", "effectiveWorkspaceId": "string", "proposalType": "string", "reviewUrl": "string", "deferred": true, "ref": "string", "facets": [ { "slug": "string", "status": "string", "facetId": "string", "proposalId": "string", "error": "string" } ], "writeReceipt": { "state": "pending", "proposalId": "string", "reviewUrl": "string", "entityId": "string", "proposedEntityId": "string", "profileSlug": "string", "effectiveWorkspaceId": "string", "projectId": "string", "source": "string", "facets": [ { "slug": "string", "outcome": "string", "facetId": "string", "proposalId": "string", "error": "string" } ], "warnings": [ "string" ], "properties": { "unmodeled": [ { "key": "string", "didYouMean": "string" } ] } }}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
id*string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuiduserId?stringworkspaceId?stringlimit?stringRelations list with summary counts
application/json- response
[key: string]?unknowncurl -X GET 'https://pod.example.com/api/hub/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08/connections'{ "property1": null, "property2": null}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
id*string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuiduserId?stringCanonical entity wire record
application/json- response
id*stringprofileSlug*stringtype*stringtitle?string|nullpreview?string|nulldescription?string|nullproperties*systemData?userId*stringworkspaceId?string|nulldocumentId?string|nullversion?numbercreatedAt?string|updatedAt?string|lastInteractionAt?||When we last spoke to them (a meeting that happened, sent outreach, a dated conversation); null = never. Present on rows read from the pod's entity table.
status?|The kind's declared lifecycle option the entity is in; null = the kind declares no lifecycle. Present on rows read from the pod's entity table.
statusCategory?|The category of status: one of open, active, paused, done, lost; null = no lifecycle. Present on rows read from the pod's entity table.
curl -X GET 'https://pod.example.com/api/hub/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "id": "string", "profileSlug": "string", "type": "string", "title": "string", "preview": "string", "description": "string", "properties": { "property1": null, "property2": null }, "systemData": { "property1": null, "property2": null }, "userId": "string", "workspaceId": "string", "documentId": "string", "version": 0, "createdAt": "string", "updatedAt": "string", "lastInteractionAt": "string", "status": "string", "statusCategory": "string"}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
application/json- body
query*string1 <= lengthprofileSlug?stringworkspaceId?stringlimit?integer1 <= value <= 100Merged entity results
application/json- response
entities*array<>source*string"hybrid""typesense"curl -X POST 'https://pod.example.com/api/hub/entities/recall' \ -H 'Content-Type: application/json' \ -d '{ "query": "string"}'{ "entities": [ { "property1": null, "property2": null } ], "source": "hybrid"}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
application/json- body
query*string1 <= lengthworkspaceId?stringlimit?integer1 <= value <= 100Ranked entities + retrieval understanding
application/json- response
entities*array<>understanding*source*string"hybrid""typesense"verdict*string"confident""ambiguous""empty"curl -X POST 'https://pod.example.com/api/hub/entities/retrieve' \ -H 'Content-Type: application/json' \ -d '{ "query": "string"}'{ "entities": [ { "property1": null, "property2": null } ], "understanding": { "property1": null, "property2": null }, "source": "hybrid", "verdict": "confident"}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
entityId*string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuidapplication/json- body
userId?stringworkspaceId?stringfilename?string1 <= lengthmimeType?string1 <= lengthcontentBase64?string1 <= lengthfileEntityId?stringCreated file entity + link result
application/json- response
[key: string]?unknowncurl -X POST 'https://pod.example.com/api/hub/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08/attachments' \ -H 'Content-Type: application/json' \ -d '{}'{ "property1": null, "property2": null}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
application/json- body
userId?stringagentUserId?stringuuidworkspaceId?stringuuidsessionId?stringuuiditems*array<>1 <= items <= 500idempotencyKey?stringvalidate?booleanreasoning?stringPer-item receipt: applied / proposed (one pack) / denied / skipped
application/json- response
[key: string]?unknowncurl -X POST 'https://pod.example.com/api/hub/entities/batch-update' \ -H 'Content-Type: application/json' \ -d '{ "items": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "patch": { "property1": null, "property2": null } } ]}'{ "property1": null, "property2": null}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
entityId*string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuidapplication/json- body
userId?stringagentUserId?stringworkspaceId?string|nulltitle?stringpreview?stringmetadata?deleteProperties?array<string>reasoning?stringThe proposing agent's rationale for this update, surfaced in the proposal inbox.
sourceMessageId?stringsessionId?stringexpectedStatus?|Compare-and-set on the status: the status you SAW. If it moved meanwhile the call answers 409 with the current status and writes nothing.
hold?occurredAt?stringdocumentId?stringAttach an existing document as the entity's body (e.g. re-attach an orphaned one). Replacing a body the entity already has needs replaceBody: true; an agent's replacement is always a proposal. Undo puts the previous body back.
uuidreplaceBody?booleanRequired with documentId when the entity already has a body; without it the call is refused (409) naming that body.
Updated entity
application/json- response
status*stringmessage?stringproposalId?string|nullsummary?stringreasoning?stringreviewPath?stringreviewUrl?stringdeferred?trueWorkspace-join gate only (proposalType "join"): this write was KEPT on the join request and is replayed for you once the join is approved — do not resend it.
trueref?stringWith deferred: the kept write's ref on the join proposal.
entityId?stringtitle?|The entity's title as the write left it.
written?The stored values after the write.
statusMove?The status move this call carried: moved, unchanged or proposed (then proposalId).
writeReceipt?Applied answer only: the fields written (landed) and those filed for review instead (proposed, the status move).
curl -X PATCH 'https://pod.example.com/api/hub/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "status": "string", "message": "string", "proposalId": "string", "summary": "string", "reasoning": "string", "reviewPath": "string", "reviewUrl": "string", "deferred": true, "ref": "string", "entityId": "string", "title": "string", "written": { "title": "string", "description": "string", "properties": null, "documentId": "string" }, "statusMove": { "status": "string", "property1": null, "property2": null }, "writeReceipt": { "state": "applied", "entityId": "string", "landed": [ "string" ], "proposed": [ "string" ] }}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
entityId*string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuidworkspaceId?stringuserId?stringreasoning?stringagentUserId?stringDeletion result (completed or proposed)
application/json- response
[key: string]?unknowncurl -X DELETE 'https://pod.example.com/api/hub/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "property1": null, "property2": null}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
entityId*string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuidEffective facets
application/json- response
facets*array<>curl -X GET 'https://pod.example.com/api/hub/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08/facets'{ "facets": [ { "property1": null, "property2": null } ]}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
entityId*string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuidapplication/json- body
userId?stringprofileSlug?stringprofileId?stringuuidworkspaceId?|uuidcontextEntityId?|uuidstatus?stringproperties?agentUserId?stringuuidreasoning?stringAttach result (or proposal envelope)
application/json- response
[key: string]?unknowncurl -X POST 'https://pod.example.com/api/hub/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08/facets' \ -H 'Content-Type: application/json' \ -d '{}'{ "property1": null, "property2": null}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
facetId*string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuidapplication/json- body
userId?stringstatus?stringproperties?workspaceId?|uuidagentUserId?stringuuidreasoning?stringexpectedStatus?|Compare-and-set on the role's status: the status you SAW. If it moved meanwhile the call answers 409 with the current status and writes nothing.
hold?occurredAt?stringUpdate result (or proposal envelope)
application/json- response
[key: string]?unknowncurl -X PATCH 'https://pod.example.com/api/hub/facets/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "property1": null, "property2": null}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
facetId*string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuiduserId?stringagentUserId?stringreasoning?stringDetach result (or proposal envelope)
application/json- response
[key: string]?unknowncurl -X DELETE 'https://pod.example.com/api/hub/facets/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "property1": null, "property2": null}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
id*string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuidThe record's channels
application/json- response
channels*array<>curl -X GET 'https://pod.example.com/api/hub/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels'{ "channels": [ { "id": "string", "provider": "string", "accountId": "string", "title": "string", "externalId": "string", "participant": { "name": "string", "externalId": "string" }, "lastMessage": { "content": "string", "at": "string", "direction": "inbound" }, "unread": 0, "pendingProposals": 0 } ]}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
application/json- body
kindSlug?stringThe entity kind (profile slug) being created. A weak (same-name) match must be this kind to become match:'weak'; cross-kind rows still ride in candidates.
title?stringName/title to weak-match. Blank → strong-signal lookup only.
workspaceId?stringuuidsignals?Explicit strong identity atoms. Also accepted: an atom name (linkedin_url, website, …) or the property slug that carries it (linkedinUrl, …); any other key is refused.
properties?Draft property bag — strong signals are also extracted from it (merged with signals).
Identity resolution result
application/json- response
match*string"strong""weak""none"entityId?stringentityTitle?string|nullentityKind?stringcandidates*array<>crossKindCandidates*array<>Entities of a DIFFERENT kind that look like the same subject: the same title, or one of the given strong signals (a company owning the website a person carries). ADVISORY: a title never auto-merges and a strong signal merges only within the requested kind — but do NOT treat "none" as "safe to create" when this is non-empty. Prefer proposing a link to one of these over minting a duplicate.
pendingCandidates?array<>Strong-signal matches in YOUR OWN pending capture proposals — a duplicate already in-flight but not yet committed (so match is still "none"). ADVISORY: carries a proposalId, NEVER an entityId — do NOT link to it (it can still be rejected). Wait for review or revise, rather than filing a second copy.
curl -X POST 'https://pod.example.com/api/hub/identity/resolve' \ -H 'Content-Type: application/json' \ -d '{}'{ "match": "strong", "entityId": "string", "entityTitle": "string", "entityKind": "string", "candidates": [ { "entityId": "string", "title": "string", "kind": "string", "score": 0 } ], "crossKindCandidates": [ { "entityId": "string", "title": "string", "kind": "string" } ], "pendingCandidates": [ { "proposalId": "string", "proposalType": "string", "summary": "string", "entityRef": "string", "entityTitle": "string", "profileSlug": "string", "matchedSignals": [ { "type": "string", "value": "string" } ] } ]}