SynapDocs
Hub REST API

Agents

The Agents operations of the Hub REST API (7 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 AI agent users

GET
/agent-users

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

workspaceId?string
parentUserId?string

Filter agents by agentMetadata.parentAgentId — used by orchestrators to discover their personalities.

Response Body

Agent users

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://pod.example.com/api/hub/agent-users'
Example Response
[  {    "id": "string",    "name": "string",    "agentMetadata": {      "property1": null,      "property2": null    },    "role": "string",    "reach": "pod",    "binding": {      "toolId": "string",      "provider": "string",      "supports": {        "push": true,        "inputRequired": true,        "cancel": true      },      "error": {        "code": "string",        "message": "string"      }    },    "connections": [      {        "keyId": "string",        "instanceId": "string",        "instanceLabel": "string",        "displayName": "string",        "createdAt": "string",        "lastUsedAt": "string"      }    ],    "property1": null,    "property2": null  }]
GET
/agent-users/assignments

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

targetType*string
Value in"playbook""profile""project""workspace"
targetId*string
Formatuuid

Response Body

Your assignment

application/json
  1. response
assignment*|

The agent YOU assigned to this target (one per person per target), or null when you assigned none.

Example Request
curl -X GET 'https://pod.example.com/api/hub/agent-users/assignments?targetType=playbook&targetId=497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "assignment": {    "agentUserId": "string",    "agentName": "string",    "assignedAt": "string"  }}
PUT
/agent-users/{agentUserId}/assignment

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

agentUserId*string
Formatuuid

Request Body

application/json
  1. body
target*
assigned*boolean

true = this agent takes the target's work (replaces the agent you had on it); false = remove this agent from it.

Response Body

Assigned or removed

application/json
  1. response
assigned*boolean
agentUserId*string
target*
replaced*|

The agent this assignment replaced on the target (yours), or null.

Example Request
curl -X PUT 'https://pod.example.com/api/hub/agent-users/497f6eca-6276-4993-bfeb-53cbbbba6f08/assignment' \  -H 'Content-Type: application/json' \  -d '{  "target": {    "type": "playbook",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"  },  "assigned": true}'
Example Response
{  "assigned": true,  "agentUserId": "string",  "target": {    "type": "playbook",    "id": "string"  },  "replaced": "string"}

List agent_configs rows

GET
/agent-configs

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

Agent user ID (the personality).

workspaceId?string

Workspace ID. If omitted, returns all configs for this userId across workspaces.

agentType?string

Free-form agent type slug. If set, narrows to a single row.

Response Body

Array of agent_configs rows

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://pod.example.com/api/hub/agent-configs?userId=string'
Example Response
[  {    "id": "string",    "userId": "string",    "workspaceId": "string",    "agentType": "string",    "promptAppend": "string",    "extraToolIds": [      "string"    ],    "disabledToolIds": [      "string"    ],    "maxStepsOverride": 0,    "modelOverride": "string",    "createdAt": "string",    "updatedAt": "string",    "property1": null,    "property2": null  }]
POST
/channels/trigger-ai

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
channelId*string
userId*string
workspaceId*string
systemPromptOverride*string
skillId?string
entityId?string

Entity to inject as context for the AI response.

Response Body

Trigger result (varies by skill/agent)

application/json
  1. response
[key: string]?unknown
Example Request
curl -X POST 'https://pod.example.com/api/hub/channels/trigger-ai' \  -H 'Content-Type: application/json' \  -d '{  "channelId": "string",  "userId": "string",  "workspaceId": "string",  "systemPromptOverride": "string"}'
Example Response
{  "property1": null,  "property2": null}
POST
/discord/agent-turn

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
workspaceId?string
Formatuuid
discordChannelId*string
Length1 <= length
guildId?string
Length1 <= length <= 64
discordUserId*string
Length1 <= length
discordUsername*string
Length1 <= length
channelKind?string
Value in"dm""guild"
text?string
Lengthlength <= 50000
Default""
messageId*string
Length1 <= length
attachments?array<>
Itemsitems <= 4
skillName?string
Length1 <= length <= 200
priority?string
Value in"interactive""background"

Response Body

Agent reply (may be partial with steps when timed out mid-stream)

application/json
  1. response
reply*string
deliverToExternalChannelId?string
suppressReply?boolean
needsConnect?boolean
discordUserId?string
steps?array<>
partial?boolean
timedOut?boolean
error?string
turnId?string
Formatuuid
Example Request
curl -X POST 'https://pod.example.com/api/hub/discord/agent-turn' \  -H 'Content-Type: application/json' \  -d '{  "discordChannelId": "string",  "discordUserId": "string",  "discordUsername": "string",  "messageId": "string"}'
Example Response
{  "reply": "string",  "deliverToExternalChannelId": "string",  "suppressReply": true,  "needsConnect": true,  "discordUserId": "string",  "steps": [    {      "id": "string",      "type": "string",      "content": "string",      "timestamp": "string",      "toolName": "string",      "toolInput": null,      "toolOutput": null,      "duration": 0,      "error": "string",      "title": "string",      "description": "string",      "status": "pending",      "property1": null,      "property2": null    }  ],  "partial": true,  "timedOut": true,  "error": "string",  "turnId": "7513f73d-27ec-455d-85b7-7bd021b4dccf"}
POST
/agents/sync

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.

Response Body

Success

Example Request
curl -X POST 'https://pod.example.com/api/hub/agents/sync'
Example Response
Empty

On this page