SynapSynapDocs
Hub REST API

Discord

The Discord operations of the Hub REST API (8 operations).

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

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

Response Body

Record result

application/json
  1. response
recorded*boolean
Example Request
curl -X POST 'https://pod.example.com/api/hub/discord/ingest' \  -H 'Content-Type: application/json' \  -d '{  "discordChannelId": "string",  "discordUserId": "string",  "messageId": "string"}'
Example Response
{  "recorded": true}
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
/discord/mail-feed/run

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

Run summary

application/json
  1. response
skipped?boolean
reason?string
processed?number
posted?number
skippedMuted?number
deniedDropped?number
Example Request
curl -X POST 'https://pod.example.com/api/hub/discord/mail-feed/run'
Example Response
{  "skipped": true,  "reason": "string",  "processed": 0,  "posted": 0,  "skippedMuted": 0,  "deniedDropped": 0}
POST
/discord/reconcile-podwide

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
apply?boolean
Defaultfalse

Response Body

Reconcile summary

application/json
  1. response
dryRun*boolean
matched*number
updated*number
Example Request
curl -X POST 'https://pod.example.com/api/hub/discord/reconcile-podwide' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "dryRun": true,  "matched": 0,  "updated": 0}
POST
/discord/event-sync/run

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

Run summary

application/json
  1. response
skipped?boolean
reason?string
processed?number
created?number
skippedExisting?number
Example Request
curl -X POST 'https://pod.example.com/api/hub/discord/event-sync/run'
Example Response
{  "skipped": true,  "reason": "string",  "processed": 0,  "created": 0,  "skippedExisting": 0}
GET
/discord/identity

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

discordUserId*string
Length1 <= length

Response Body

Link status

application/json
  1. response
linked*boolean
synapUserId?string
displayName?string
Example Request
curl -X GET 'https://pod.example.com/api/hub/discord/identity?discordUserId=string'
Example Response
{  "linked": true,  "synapUserId": "string",  "displayName": "string"}
GET
/discord/identity/members

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
Formatuuid

Response Body

Linkable members

application/json
  1. response
members*array<>
Example Request
curl -X GET 'https://pod.example.com/api/hub/discord/identity/members'
Example Response
{  "members": [    {      "userId": "string",      "name": "string"    }  ]}
POST
/discord/identity/link

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
discordUserId*string
Length1 <= length
mode*string
Value in"existing""new"
targetUserId?string
Formatuuid
displayName?string
Length1 <= length <= 200
workspaceId?string
Formatuuid

Response Body

Linked

application/json
  1. response
linked*true
Value intrue
synapUserId*string
created*boolean
Example Request
curl -X POST 'https://pod.example.com/api/hub/discord/identity/link' \  -H 'Content-Type: application/json' \  -d '{  "discordUserId": "string",  "mode": "existing"}'
Example Response
{  "linked": true,  "synapUserId": "string",  "created": true}