Skip to content

Update a role (non-system only)

PATCH
/v1/roles/{slug}
curl --request PATCH \
--url https://example.com/v1/roles/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant-ID: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "name": "example", "description": "example", "scopes": [ "example" ] }'
slug
required
string
X-Tenant-ID
required
string format: uuid

Tenant identifier. Must match the tenant associated with the credential. Returns 403 tenant_mismatch if the credential and header belong to different tenants.

Media type application/json
object
name
string
description
string
scopes
Array<string>
Example generated
{
"name": "example",
"description": "example",
"scopes": [
"example"
]
}

OK

Media type application/json
object
id
required
string format: uuid
slug
required
string
name
required
string
description
string
nullable
scopes
required
Array<string>
is_system
required
boolean
blast_radius
object
level
required
string
Allowed values: low medium high admin
summary
required
string
warnings
Array<string>
created_by
string
nullable
updated_by
string
nullable
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{
"blast_radius": {
"level": "low"
}
}

Unauthenticated

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

Forbidden — system role or insufficient permissions

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

Not found

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

Unprocessable — invalid scopes

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}