Skip to main content
POST
/
api
/
v1
/
school
/
roles
Create school role
curl --request POST \
  --url https://test-api.afrainity.com/api/v1/school/roles/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "permission_codenames": "<unknown>",
  "parent_role": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{}

Authorizations

Authorization
string
header
required

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

Body

Auto-populate created_by from request.user when available.

name
string
required
Required string length: 1 - 100
description
string | null
permission_codenames
any

List of "app_label.codename" strings

parent_role
string<uuid> | null

Inherit all permission_codenames from this role.

Response

{key}
any