Skip to main content
GET
https://api.trillet.ai
/
v1
/
api
/
roles-and-permissions
/
roles
/
{roleId}
Get Role
curl --request GET \
  --url https://api.trillet.ai/v1/api/roles-and-permissions/roles/{roleId} \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>'
{
  "_id": "665a1b2c3d4e5f6a7b8c9d0e",
  "name": "Agent Manager",
  "description": "Can manage agents and view call history",
  "permissions": [
    { "key": "agent_view", "category": "agents" },
    { "key": "agent_create", "category": "agents" },
    { "key": "agent_edit", "category": "agents" }
  ],
  "userIds": ["user_001"]
}

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.

Response Fields

_id
string
Unique identifier for the role.
name
string
Name of the role.
description
string
Description of the role.
permissions
array
Array of permission objects assigned to the role.
userIds
array
Array of user IDs assigned to this role.
{
  "_id": "665a1b2c3d4e5f6a7b8c9d0e",
  "name": "Agent Manager",
  "description": "Can manage agents and view call history",
  "permissions": [
    { "key": "agent_view", "category": "agents" },
    { "key": "agent_create", "category": "agents" },
    { "key": "agent_edit", "category": "agents" }
  ],
  "userIds": ["user_001"]
}