Reference / Roles

Create a custom role.

POST /v1/roles
Secret API key operationId: create

Authorization

Server-to-server. Send a secret key as a Bearer token plus the x-application-id header.

Request body · required

  • description string
  • key string required
  • name string required
  • permissions string[]

Responses

201 Role created
{
  "data": {
    "created_at": "2026-01-15T09:30:00Z",
    "description": "string",
    "effective": [
      "string"
    ],
    "id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
    "is_system": false,
    "key": "string",
    "name": "string",
    "permissions": [
      "string"
    ]
  },
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "timestamp": "string"
  },
  "success": false
}
409 Key in use or reserved
422 Invalid input or unknown permission

Request

curl -X POST "http://localhost:8080/v1/roles" \
  -H "Content-Type: application/json" \
  -d '{
  "description": "string",
  "key": "support",
  "name": "Support agent",
  "permissions": [
    "string"
  ]
}'

Try it

live request
POST http://localhost:8080/v1/roles

Request body

application/json