Submit a resource request for an asset
POST /assets/{id}/request-access
Creates a pending resource_request for the calling user
against the target asset. Any authenticated user may submit
a request; the approver decides via /admin/requests.
When the approver grants the request, a row lands in
user_capability_grants with request_ref populated — the
CapabilitySweeper reaps both the grant and the linked
request together at expires_at.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
Capability code being requested.
Optional free-text justification.
Responses
Section titled “ Responses ”Request created.
A resource_request row. The state machine is pending → granted / denied (admin decision); granted → expired (CapabilitySweeper cascade). Terminal states admit no further transitions.
object
On granted requests, the linked grant’s auto-expiry. Null means permanent.
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"}