Skip to main content
POST
/
v1
/
servers
/
{serverId}
/
roles
Create a role
curl --request POST \
  --url https://api.magne.app/v1/servers/{serverId}/roles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "color": "<string>",
  "permissions": 123
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "serverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "color": "<string>",
  "position": 123,
  "permissions": 123,
  "isDefault": true,
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

serverId
string<uuid>
required

Body

application/json
name
string
required
color
string | null
permissions
integer<int64> | null

Response

Success

id
string<uuid>
serverId
string<uuid>
name
string
color
string | null
position
integer<int32>
permissions
integer<int64>

Permission bitmask

isDefault
boolean
createdAt
string<date-time>