Skip to main content
PATCH
/
v1
/
roles
/
{id}
Update a role
curl --request PATCH \
  --url https://api.magne.app/v1/roles/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "color": "<string>",
  "permissions": 123,
  "position": 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

id
string<uuid>
required

Body

application/json
name
string | null
color
string | null
permissions
integer<int64> | null
position
integer<int32> | 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>