Remove a capability grant from a user (admin)
DELETE /admin/users/{ref}/grants/{capability}
DELETE
/admin/users/{ref}/grants/{capability}
Pass team_id query param to scope to a team-scoped grant;
omit for the global grant. Returns 404 when no matching grant
exists (composite key, not by ID — there is no ID).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” ref
required
integer format: int64
capability
required
string
Query Parameters
Section titled “Query Parameters ” team_id
string format: uuid
Responses
Section titled “ Responses ”Grant removed.
Grant removal refused — would leave the system with
zero users holding system.admin (last-admin
invariant guard). Applies to global system.admin
grants only.
object
error
required
Human-readable error summary
string
Example
the request could not be completedAuthentication required, missing, or invalid
object
error
required
Human-readable error summary
string
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
error
required
Human-readable error summary
string
Example
the request could not be completedResource not found
object
error
required
Human-readable error summary
string
Example
the request could not be completed