Skip to main content
PUT
https://api.trillet.ai
/
v1
/
api
/
roles-and-permissions
/
roles
/
{roleId}
{
  "name": "Senior Manager",
  "description": "Full access to everything including billing and settings",
  "permissions": [
    "agent_view",
    "agent_create",
    "agent_edit",
    "agent_delete",
    "call_history_view"
  ]
}
{
  "_id": "665a1b2c3d4e5f6a7b8c9d0e",
  "name": "Senior Manager",
  "description": "Full access to everything including billing and settings",
  "permissions": [
    { "key": "agent_view", "category": "agents" },
    { "key": "agent_create", "category": "agents" },
    { "key": "agent_edit", "category": "agents" },
    { "key": "agent_delete", "category": "agents" },
    { "key": "call_history_view", "category": "calls" }
  ]
}

Headers

x-api-key
string
required
API key used for authenticating requests to the API.
x-workspace-id
string
required
Workspace identifier for the API.

Path Parameters

roleId
string
required
The unique identifier of the role to update.

Request Body

name
string
Updated name for the role.
description
string
Updated description for the role.
permissions
array of strings
Updated array of permission ID strings. Each item must be a string (e.g., "agent_view"). Use the List Permissions endpoint to retrieve available permission IDs.
userIds
array
Updated array of user IDs to assign.

Response Fields

_id
string
Unique identifier for the role.
name
string
Updated name of the role.
description
string
Updated description of the role.
permissions
array
Updated permissions array.
{
  "name": "Senior Manager",
  "description": "Full access to everything including billing and settings",
  "permissions": [
    "agent_view",
    "agent_create",
    "agent_edit",
    "agent_delete",
    "call_history_view"
  ]
}
{
  "_id": "665a1b2c3d4e5f6a7b8c9d0e",
  "name": "Senior Manager",
  "description": "Full access to everything including billing and settings",
  "permissions": [
    { "key": "agent_view", "category": "agents" },
    { "key": "agent_create", "category": "agents" },
    { "key": "agent_edit", "category": "agents" },
    { "key": "agent_delete", "category": "agents" },
    { "key": "call_history_view", "category": "calls" }
  ]
}