SynapSynapDocs
Hub REST API

Agents

The Agents operations of the Hub REST API (5 operations).

For BuildersOpen-source podSynap CloudGenerated from Synap-core/backend@c31e261ab (main)

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  }]

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