SynapSynapDocs
Hub REST API

Identity

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

For BuildersOpen-source podSynap CloudGenerated from Synap-core/backend@c31e261ab (main)
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}