v66

OpenAPI 3.1.0raw.githubusercontent.com2026-08-04176310979.2 KB
roles

Update Role

Update an existing role.

put/api/v1/roles/

Request body

namestring required

The name of the role.

descriptionstring nullable

The description of the role.

permissionsstring[] required

The permissions associated with the role. Available permissions can be found by calling GET /permissions.

idinteger required

The internal ID of the role.

last_updated_commentsstring nullable

Comments for the most recent edit to the role.

Example request

{
  "name": "Prompt Engineer",
  "description": "Role for users who can fetch and change prompts",
  "permissions": [
    "prompts_read",
    "prompts_write",
    "prompts_delete"
  ],
  "id": 1,
  "last_updated_comments": "Updated to add delete permission"
}

Response

Successful Response

namestring required

The name of the role.

descriptionstring nullable

The description of the role.

permissionsstring[] required

The permissions associated with the role. Available permissions can be found by calling GET /permissions.

idinteger required

The internal ID of the role.

last_updated_commentsstring nullable

Comments for the most recent edit to the role.

is_system_roleboolean required

Whether this is a built-in system role that cannot be updated or deleted

last_updatedstring date-time required

The timestamp of the most recent update to the role

last_updated_bystring required

The email of the user who last updated the role

Example response

{
  "name": "Prompt Engineer",
  "description": "Role for users who can fetch and change prompts",
  "permissions": [
    "prompts_read",
    "prompts_write",
    "prompts_delete"
  ],
  "id": 1,
  "last_updated_comments": "Updated to add delete permission",
  "last_updated_by": "user@email.com"
}