For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inBook a demo
GuidesAPI Reference
GuidesAPI Reference
  • API Reference
        • GETList Roles
        • POSTCreate Role
        • GETGet Role
        • PUTUpdate Role
        • DELDelete Role
Logo
Log inBook a demo
API ReferencePermissionsRoles

Update Role

PUT
https://app.polytomic.com/api/permissions/roles/:id
PUT
/api/permissions/roles/:id
$curl -X PUT https://app.polytomic.com/api/permissions/roles/248df4b7-aa70-47b8-a036-33ac447e668d \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Custom"
>}'
1{
2 "data": {
3 "id": "248df4b7-aa70-47b8-a036-33ac447e668d",
4 "name": "Custom",
5 "organization_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
6 "system": false
7 }
8}

Updates an existing permissions role’s name and action set.

The update is a full replacement of the role definition.

🚧 Built-in system roles (such as Admin and Member) cannot be updated. Attempting to modify a system role returns an error.

Was this page helpful?
Previous

Delete Role

Next

Authentication

AuthorizationBearer
Bearer user API key
OR
AuthorizationBasic

Basic organization-scoped API key

Path parameters

idstringRequiredformat: "uuid"

Headers

X-Polytomic-VersionstringOptional

Request

This endpoint expects an object.
namestringRequired
organization_idstring or nullOptionalformat: "uuid"

Response

OK
dataobject

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error