Skip to content
Dashboard
Theme
Theme

Update role rule

PATCH /v1/role_rules/{role_rule}: Update role rule.

View Markdown

PATCH /v1/role_rules/{role_rule}

Scope
policies:write
Auth
Secret key (sk_…)
Since
1.0
  • role_rule string Required

  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • match RoleRuleMatch

  • role string

    min length 1 · max length 128

  • priority integer

  • clear_condition boolean

  • condition RoleRuleCondition

Errors share one shape; see the error code catalogue.

curl -X PATCH \
"https://api.ohauthcat.com/v1/role_rules/rrule_01J9ZQ4M7K2X8V3N5B6C1D0E9F" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"match": {
"idp_group": "Engineering",
"scim_group": "dgrp_01J9ZQ4M7K2X8V3N5B6C1D0E9F",
"domain": "acme.com",
"connection": "conn_01J9ZQ4M7K2X8V3N5B6C1D0E9F"
},
"role": "admin",
"priority": 1,
"clear_condition": true,
"condition": {
"action": "allow",
"expr": {
"kind": "leaf",
"attribute": "email",
"operator": "equals",
"values": [
"enterprise"
],
"children": [
null
]
}
}
}'
Response 200
{
"id": "rrule_01J9ZQ4M7K2X8V3N5B6C1D0E9F",
"object": "role_rule",
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"kind": "group",
"match": {
"idp_group": "Engineering",
"scim_group": "dgrp_01J9ZQ4M7K2X8V3N5B6C1D0E9F",
"domain": "acme.com",
"connection": "conn_01J9ZQ4M7K2X8V3N5B6C1D0E9F"
},
"role": "admin",
"priority": 1,
"condition": {
"action": "allow",
"expr": {
"kind": "leaf",
"attribute": "email",
"operator": "equals",
"values": [
"enterprise"
],
"children": [
null
]
}
},
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}