Approve a pending action
Approve a suspended HITL pending action, releasing the binding government write through the existing idempotency store. Gated on the reserved act:approve scope (act: prefix is in the closed reserved-scope list; held back pending legal review; NOT default-granted at v1). The middleware short-circuits with 403 SCOPE_RESERVED on every call regardless of the holder's scopes — this is the load-bearing precondition that prevents an agent's own API key from approving its own binding writes today.
Exactly-once guarantee. The state machine claims PENDING → APPROVING via an atomic conditional UPDATE; two concurrent approves race on the row lock and only the winner reaches the government call. The release flows through the existing idempotency store with key hitl:<id> so a crash + retry cannot double-submit. APPROVING is NEVER auto-reverted (a blind revert would permit double-submit); reconciliation reads the idempotency record.
Status SCAFFOLD. The route exists; the stub releaseFn returns FAILED with hitl_enforcement_disabled until the enforcement PR lands.
Request
- Base URL: https://www.apier.no
- URL: https://www.apier.no/api/v1/actions/pending/{id}/approve
- Auth: HTTP bearer
Path parameters
Request body
Response
APPROVED — government release succeeded. data.government_response carries the upstream's structured response (Altinn / Skatteetaten / NAV depending on action_type).
Example response
{
"_meta": {
"rulebook_version": "v1.0.0",
"source": "apier.no",
"data_source": "Brønnøysund Enhetsregisteret + Apier Universal Rulebook",
"schema_version": "1.0.0",
"legal_basis": "NLOD — public registry reuse",
"response_timestamp": "2026-04-24T12:00:00.000Z",
"response_hash": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"source_snapshot_id": "brreg-2026-04-24T02:00:00.000Z",
"cost_nok": 0.5,
"wallet_remaining_nok": 9.5,
"spend_cap_remaining_nok": 12.5
}
}Changes
No recorded changes to this operation across all 1 revision of this API.