Revoke a capability from a user
POST /admin/users/{ref}/revokes
Takes a capability away from a user, across the instance or, with
team_id, for one team. A revoke wins over the user’s roles and
grants at the same scope. A revoke for a team only cancels what was
given for that exact team, so a capability given for a parent team
still reaches it.
Revoking the same capability for the same scope again updates the
existing revoke: its note and expiry are replaced with the new
values, so leaving them out clears them. Needs the users.write
capability. An unknown user gets 404. An instance-wide
system.admin revoke is refused with 400 when this user is the only
system administrator.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”Set team_id to limit the override to a team; leave it out, or send
null, for one that applies across the instance.
object
The capability code, such as users.write.
A reason to record with it.
When it should expire. It must be in the future, or you get 400. Leave it out for a permanent one.
Responses
Section titled “ Responses ”The revoke was added or updated.
Malformed request
object
Human-readable error summary
Example
the request could not be completedAuthentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completedResource not found
object
Human-readable error summary
Example
the request could not be completed