Skip to main content
POST
/
api
/
v1
/
system
/
roles
Create role
curl --request POST \
  --url https://test-api.afrainity.com/api/v1/system/roles/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "permissions": [
    123
  ]
}
'
{
  "name": "<string>",
  "id": 123,
  "permissions": [
    123
  ]
}

Authorizations

Authorization
string
header
required

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

Headers

X-Schema-Name
string

School (tenant) identifier. Must match your account unless you have platform-wide access.

Body

name
string
required
Required string length: 1 - 150
permissions
integer[]

Response

201 - application/json
name
string
required
Maximum string length: 150
id
integer
permissions
integer[]