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`.
/v1/orgs/{org}/discord-servers/{server}/rolesEvery 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 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
The org's id
^org_[0-9a-hjkmnp-tv-z]{26}$The Discord server's id
^dsv_[0-9a-hjkmnp-tv-z]{26}$Query Parameters
At most this many items, 200 at the most.
1 <= value <= 20050The 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"}