headless lms

Add a role

POST /api/organizations/roles. Add a role. Headless LMS Roles API reference.

POST
/api/organizations/roles

Requires roles:write. The role starts from a deployment role (base) and needs every permission it holds.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/organizations/roles" \  -H "Content-Type: application/json" \  -d '{    "base": "string",    "name": "string"  }'
{  "key": "string",  "name": "string",  "description": "string",  "base": "string",  "levels": [    "org"  ],  "team": true,  "permissions": [    "organizations:read"  ],  "system": true,  "added": true,  "customized": true,  "holders": -9007199254740991,  "givable": true}
{  "error": "string",  "message": "string",  "requestId": "string",  "issues": [    {      "path": "string",      "message": "string"    }  ]}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}