Get Role
Retrieve a specific role by its ID.
GET
Requires the role:view permission in the workspace.
Headers
x-workspace-idstringrequiredWorkspace identifier for the API.
Path Parameters
roleIdstringrequiredThe unique identifier of the role. An ID that matches no role in the workspace returns 404.
Response Fields
_idstringUnique identifier for the role.
namestringName of the role.
descriptionstringDescription of the role.
permissionsobjectPermissions grouped by category. Each key is a category and its value is the list of permission keys.
isSystembooleantrue for the built-in roles (owner, admin, editor, viewer).
workspaceIdstringWorkspace the role belongs to. Absent on system roles.
createdAtstringTimestamp when the role was created.
updatedAtstringTimestamp when the role was last updated.
This endpoint doesn't return the role's users. Use List Roles, which includes userIds for each role.
{
"_id": "a4a4a4a4a4a4a4a4a4a4a4a4",
"workspaceId": "a1a1a1a1a1a1a1a1a1a1a1a1",
"name": "Agent Manager",
"description": "Can manage agents and view call history",
"permissions": {
"agent": ["agent:view", "agent:create", "agent:edit"],
"call_history": ["call_history:view"]
},
"isSystem": false,
"createdAt": "2024-06-01T09:00:00.000Z",
"updatedAt": "2024-06-01T09:00:00.000Z",
"__v": 0
}Last updated on