Skip to content
Dashboard
Theme
Theme

Change a role's name, description, priority or permissions

PATCH /v1/authorization/roles/{role}: Change a role's name, description, priority or permissions.

View Markdown

PATCH /v1/authorization/roles/{role}

Scope
authorization:write
Auth
Secret key (sk_…)
Since
1.0
  • role string Required

  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • name string or null

    max length 200

  • description string or null

    max length 1000

  • priority integer

    min 0 · max 10000

  • permissions array of string

    Replaces the role’s permissions.

    max items 500

Errors share one shape; see the error code catalogue.

curl -X PATCH \
"https://api.ohauthcat.com/v1/authorization/roles/role_01J9Z3K5V7W8X9Y0Z1A2B3C4D5" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp",
"description": "Primary SSO connection for Acme Corp.",
"priority": 0,
"permissions": [
"organizations:read"
]
}'
Response 200
{
"id": "role_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "role",
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"slug": "acme",
"name": "Acme Corp",
"description": "Primary SSO connection for Acme Corp.",
"priority": 0,
"permissions": [
"organizations:read"
],
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}