SynqDocs
Management APIRoles

Read a connected server's roles from Discord

Every role of the server but @everyone, highest first, read from Discord now, with whether Synq's bot can give it, the fix when it can't, the org's gate that gives it already, and how many members hold it (`holders`, null without the Server Members intent). Needs `org.integrations.view`.

GET/v1/orgs/{org}/discord-servers/{server}/roles

Every role of the server but @everyone, highest first, read from Discord now, with whether Synq's bot can give it, the fix when it can't, the org's gate that gives it already, and how many members hold it (holders, null without the Server Members intent). Needs org.integrations.view.

Authorization

bearer
AuthorizationBearer <token>

An org API key (sk_live_…, sk_test_…), or an access token from the Synq issuer (the synq brand, on the accounts host) for this API.

In: header

Path Parameters

org*string

The org's id

Match^org_[0-9a-hjkmnp-tv-z]{26}$
server*string

The Discord server's id

Match^dsv_[0-9a-hjkmnp-tv-z]{26}$

Query Parameters

limit?integer

At most this many items, 200 at the most.

Range1 <= value <= 200
Default50
cursor?string

The previous page's next_cursor, for the page after it.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://api.synq.build/v1/orgs/org_01h455vb4pex5vsknk084sn02q/discord-servers/dsv_01h455vb4pex5vsknk084sn02q/roles" \  -H "Authorization: Bearer $SYNQ_API_KEY"
{  "data": [    {      "id": "1187390245566001234",      "name": "MDP Holder",      "color": 0,      "position": 0,      "managed": true,      "assignable": true,      "problem": "unknown_role",      "problem_detail": "Synq's role is below @MDP Holder in Server Settings → Roles. Drag Synq above it.",      "gate": {        "id": "string",        "name": "Acme"      },      "holders": 312,      "holders_more": true    }  ],  "next_cursor": "string"}