Skip to Content
Docs

Create a role

POST
/roles

required scopes: contextual:roles:create

Authorization

jwt
headerAuthorizationBearer <JWT>

Header Parameters

Request Body

application/json
  1. body
name*string
Length1 <= length
description?string
permissions*array<string>
system*boolean
Defaultfalse
maxUsers?number

Response Body

application/json
  1. response
id*string
Length1 <= length
name*string
Length1 <= length
description?string
permissions*array<string>
system*boolean
Defaultfalse
maxUsers?number
_metaData*
Example Request
curl -X POST 'https://auth.your-tenant-id.my.contextual.io/api/v1/roles' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "permissions": [    "string"  ],  "system": false}'
Example Response
{  "id": "string",  "name": "string",  "description": "string",  "permissions": [    "string"  ],  "system": false,  "maxUsers": 0,  "_metaData": {    "id": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}