Create a role

Creates a new role.

POST/v3/roles
JWT
role:write

Request Body Schema

PropertyTypeDescriptionConstraints
name*stringName of the role.min: 1
descriptionstringDescription for the role.min: 0, max: 256
claims*arrayList of permission claims for the role.items: string

Request Example

{
  "name": "string",
  "description": "string",
  "claims": [
    "string"
  ]
}
Triggers webhook: role.created
POST <your-webhook-url>
{
  "event": "role.created",
  "data": {
    "id": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "name": "string",
    "description": "string",
    "claims": [
      "string"
    ]
  },
  "triggeredAt": "string"
}

Responses

201 Created
{
  "id": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "name": "string",
  "description": "string",
  "claims": [
    "string"
  ]
}