POST
Check whether the calling principal may perform an action

Authorizations

Authorization
string
header
required

Authorization: Bearer twk_<prefix>_<secret>.

The prefix is public and safe to log: it is what identifies which credential leaked. The secret is never logged, never returned after creation, and stored only as a SHA-256 hash.

Body

application/json
action
string
required
resource_type
string
required
Required string length: 1 - 32
resource_id
string
permission
string
human_present
boolean

Honoured only when the CALLER is a human. From a machine it is ignored: an agent that could claim it could waive its own step-up. An agent satisfies a step-up with a human's approval at POST /agents/{id}/actions instead.

Response

The decision, with every rule's outcome and the obligation it carries.