Skip to main content
POST
/
workspaces
/
{workspaceId}
/
roles
Create workspace role
curl --request POST \
  --url https://app.freyavoice.ai/api/v2/workspaces/{workspaceId}/roles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "permissions": []
}
'
{
  "success": true,
  "data": {
    "message": "<string>",
    "result": {
      "role": {
        "id": "<string>",
        "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "description": "<string>",
        "permissions": [],
        "isSystem": true,
        "isDefault": true,
        "memberCount": 1,
        "assignable": true,
        "createdAt": "<string>",
        "updatedAt": "<string>"
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string<uuid>
required

Body

application/json
name
string
required
Required string length: 1 - 60
description
string | null
Maximum string length: 500
permissions
enum<string>[]
Available options:
agents:read,
agents:write,
agents:delete,
agents:sync,
agents:test,
workflows:read,
workflows:write,
workflows:delete,
workflows:sync,
workflows:test,
calls:read,
calls:write,
calls:delete,
calls:import,
calls:export,
calls:recording-download,
calls:metrics-read,
calls:logs-read,
calls:web-token,
calls:chat-message,
calls:cdr-read,
campaign:read,
campaign:write,
campaign:delete,
campaign:execute,
feedbacks:read,
feedbacks:write,
feedbacks:delete,
feedbacks:comment,
feedbacks:assign,
feedbacks:config,
reviews:read,
reviews:write,
reviews:delete,
reviews:assign,
insights:read,
insights:write,
insights:delete,
insights:assign,
assertions:read,
assertions:write,
assertions:delete,
assertions:assign,
personas:read,
personas:write,
personas:delete,
simulations:read,
simulations:write,
simulations:delete,
simulations:execute,
solutions:read,
solutions:write,
solutions:delete,
solutions:generate,
solutions:accept,
kb:read,
kb:write,
kb:delete,
kb:upload,
kb:sync,
kb:articles-write,
phone-numbers:read,
phone-numbers:write,
phone-numbers:delete,
phone-numbers:import,
phone-aliases:read,
phone-aliases:write,
phone-aliases:delete,
integrations:read,
integrations:write,
integrations:delete,
integrations:webhook,
analytics:read,
analytics:widgets-write,
analytics:widgets-delete,
api-keys:read,
api-keys:write,
api-keys:delete,
api-keys:manage-others,
members:read,
members:invite,
members:remove,
members:role-change,
members:mfa-reset,
roles:read,
roles:write,
roles:delete,
billing:read,
billing:manage,
workspace:read,
workspace:settings-write,
workspace:delete,
workspace:logs-read,
versions:read,
versions:publish,
models:read,
inbound:write,
chat:read,
custom:abbreviations-read,
custom:abbreviations-write,
speech-filter:preview

Response

Role created

success
enum<boolean>
required
Available options:
true
data
object
required