Update Role
Update an existing role's name, description, or permissions.
PUT
Headers
x-api-keystringrequiredAPI key used for authenticating requests to the API.
x-workspace-idstringrequiredWorkspace identifier for the API.
Path Parameters
roleIdstringrequiredThe unique identifier of the role to update.
Request Body
namestringUpdated name for the role.
descriptionstringUpdated description for the role.
permissionsarray of stringsUpdated 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.
userIdsarrayUpdated array of user IDs to assign.
Response Fields
_idstringUnique identifier for the role.
namestringUpdated name of the role.
descriptionstringUpdated description of the role.
permissionsarrayUpdated 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" }
]
}