Skip to main content
POST
/
api
/
v1
/
roles
Create custom role
curl --request POST \
  --url https://api.rafftechnologies.com/api/v1/roles \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "Custom Operator",
  "slug": "custom-operator",
  "scope": "account",
  "permissions": [
    "vm.view",
    "vm.create",
    "volume.view"
  ],
  "description": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "Operator",
    "slug": "operator",
    "scope": "account",
    "permissions": [
      "<string>"
    ],
    "is_system": true,
    "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "description": "<string>",
    "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.rafftechnologies.com/llms.txt

Use this file to discover all available pages before exploring further.

Updated May 8, 2026

Authorizations

X-API-Key
string
header
required

API key for authentication. Each key is bound to a specific account.

Body

application/json
name
string
required
Required string length: 1 - 64
Example:

"Custom Operator"

slug
string
required
Maximum string length: 64
Pattern: ^[a-z0-9-]+$
Example:

"custom-operator"

scope
enum<string>
required
Available options:
account,
project
permissions
string[]
required
Minimum array length: 1
Example:
["vm.view", "vm.create", "volume.view"]
description
string

Response

Role created

success
boolean
data
object
Last modified on May 8, 2026