Add a capability grant to a user (admin)
POST /admin/users/{ref}/grants
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”Body shared by POST /admin/users/{ref}/grants and POST
/admin/users/{ref}/revokes. Pass team_id to scope the
override to a team — omit / null for a global override.
expires_at is optional. When set, the
grant or revoke auto-expires at that time and is reaped by
the background sweeper. Past values are rejected with 400
(operator must explicitly choose to delete an already-
expired override rather than land it pre-stale).
object
Capability code (e.g. assets.read, users.write).
Optional admin-supplied justification recorded with the row.
Optional auto-expiry. NULL / omitted = permanent. Past values rejected with 400.
Responses
Section titled “ Responses ”Grant inserted (or refreshed if it already existed).
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