PUT /discord/guilds/{guildId}/members/{userId}/roles/{roleId}

Assign a role to a member (idempotent; @everyone is refused; the role must sit below the bot's highest role)

PUT
/discord/guilds/{guildId}/members/{userId}/roles/{roleId}

Authorization

BearerAuth
headerAuthorizationBearer <token>

API key sk_...

Path Parameters

guildId*string

Discord server (guild) id

userId*string

User id

roleId*string

Role id

Query Parameters

accountId*string

Discord account id bound to this server (or the channel's server)

Response Body

Done

application/json
  1. response
success?boolean
operation?"role_assigned"
Value in"role_assigned"
guildId?string
userId?string
roleId?string
Example Request
curl -X PUT 'https://example.com/api/v1/discord/guilds/string/members/string/roles/string?accountId=string'
Example Response
{  "success": true,  "operation": "role_assigned",  "guildId": "string",  "userId": "string",  "roleId": "string"}