SynapDocs
Hub REST API

Relations

The Relations operations of the Hub REST API (3 operations).

For BuildersOpen-source podSynap Cloud

Generated from Synap-core/backend main at 24fabe7, which can be newer than the stable release self-hosters install.

List relations

GET
/relations

Authorization

bearerAuth
headerAuthorizationBearer <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.

Query Parameters

userId*string
workspaceId*string
entityId?string

Filter to relations involving this entity (either side).

type?string

Filter by relation type.

limit?string

Page size, 1-200 (default 100).

offset?string

Rows to skip, newest first (default 0). Not with entityId: that read is not paged.

Response Body

{ relations }, or { entities, configLinks } with entityId

application/json
  1. response
entities*array<>
configLinks*array<>
Example Request
curl -X GET 'https://pod.example.com/api/hub/relations?userId=string&workspaceId=string'
Example Response
{  "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"    }  ],  "configLinks": [    {      "id": "string",      "workspaceId": "string",      "fromType": "string",      "fromId": "string",      "toType": "string",      "toId": "string",      "linkType": "string",      "metadata": {        "property1": null,        "property2": null      },      "createdBy": "string",      "createdAt": "string"    }  ]}

Create a relation

POST
/relations

Authorization

bearerAuth
headerAuthorizationBearer <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.

Request Body

application/json
  1. body
userId*string
workspaceId*string
sourceEntityId*string
targetEntityId*string
type*string

Relation type identifier (e.g. parent_of, references).

metadata?
agentUserId?string
reasoning?string
sourceMessageId?string

Response Body

Created relation

application/json
  1. response
id*string
userId*string
workspaceId?string|null
sourceEntityId*string
targetEntityId*string
type*string
metadata?
createdAt?string|
Example Request
curl -X POST 'https://pod.example.com/api/hub/relations' \  -H 'Content-Type: application/json' \  -d '{  "userId": "string",  "workspaceId": "string",  "sourceEntityId": "string",  "targetEntityId": "string",  "type": "string"}'
Example Response
{  "id": "string",  "userId": "string",  "workspaceId": "string",  "sourceEntityId": "string",  "targetEntityId": "string",  "type": "string",  "metadata": {    "property1": null,    "property2": null  },  "createdAt": "string"}

Delete a relation

DELETE
/relations/{relationId}

Authorization

bearerAuth
headerAuthorizationBearer <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.

Path Parameters

relationId*string

Request Body

application/json
  1. body
userId?string
workspaceId?string
agentUserId?string
reasoning?string
sourceMessageId?string

Response Body

Deletion result

application/json
  1. response
ok*boolean
[key: string]?unknown
Example Request
curl -X DELETE 'https://pod.example.com/api/hub/relations/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "ok": true,  "property1": null,  "property2": null}

On this page