Skip to main content
POST
/
api
/
v2
/
backoffice
/
roles
Create a new role
curl --request POST \
  --url https://sandbox.killb.app/api/v2/backoffice/roles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "ADMIN",
  "description": "Administrator role with full access",
  "permissionIds": []
}
'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "permissions": [
    {
      "id": "<string>",
      "name": "<string>",
      "resource": "<string>",
      "action": "<string>",
      "description": "<string>",
      "active": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "active": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
name
string
required
Example:

"ADMIN"

description
string
Example:

"Administrator role with full access"

permissionIds
string[]
Example:
[]

Response

id
string
required
name
string
required
description
string
required
permissions
object[]
required
active
boolean
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required