Skip to content

Revoke a shell role from a user

DELETE
/api/users/{user_id}/roles
curl --request DELETE \
--url 'https://example.com/api/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/roles?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0&role=example' \
--header 'Authorization: Bearer <token>'

Revoke (soft-delete) a shell role grant from user_id in org.

Idempotent-ish: returns 404 if no active grant exists.

Errors

404 — no active grant for this role. 422 — unknown role string.

user_id
required
User Id
string format: uuid
organization_id
required
Organization Id
string format: uuid
role
required
Role

Role string to revoke

string

Role string to revoke

Successful Response

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}