Revoke a shell role from a user
DELETE
/api/users/{user_id}/roles
const url = 'https://example.com/api/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/roles?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0&role=example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” user_id
required
User Id
string format: uuid
Query Parameters
Section titled “ Query Parameters ” organization_id
required
Organization Id
string format: uuid
role
required
Role
Role string to revoke
string
Role string to revoke
Responses
Section titled “ Responses ”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" } ]}