Skip to main content
POST
/
guilds
/
{guild_id}
/
roles
Create guild role
curl --request POST \
  --url https://api.fluxer.app/v1/guilds/{guild_id}/roles \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "color": 8388607,
  "permissions": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "color": 1073741823,
  "position": 1073741823,
  "permissions": "<string>",
  "hoist": true,
  "mentionable": true,
  "hoist_position": 1073741823,
  "unicode_emoji": "<string>"
}

Authorizations

Authorization
string
header
required

Bot token: Authorization: Bot <token>. This is the primary authentication method for bot applications.

Path Parameters

guild_id
string<snowflake>
required

The ID of the guild

Pattern: ^(0|[1-9][0-9]*)$

Body

application/json
name
string
required

The name of the role (1-100 characters)

color
integer<int32>

The color of the role as an integer (default: 0)

Required range: 0 <= x <= 16777215
permissions
string<int64>
Pattern: ^[0-9]+$

Response

Success

id
string
required

The unique identifier for this role

Pattern: ^(0|[1-9][0-9]*)$
name
string
required

The name of the role

color
integer<int32>
required

The colour of the role as an integer

Required range: 0 <= x <= 2147483647
position
integer<int32>
required

The position of the role in the role hierarchy

Required range: 0 <= x <= 2147483647
permissions
string<int64>
required

The permissions bitfield for the role

Pattern: ^[0-9]+$
hoist
boolean
required

Whether this role is displayed separately in the member list

mentionable
boolean
required

Whether this role can be mentioned by anyone

hoist_position
integer<int32> | null

The position of the role in the hoisted member list

Required range: 0 <= x <= 2147483647
unicode_emoji
string | null

The unicode emoji for this role