Revoke a fullmakt (retire a delegation + its principal)
revoke_fullmaktRevoke a delegated authority for a Norwegian company, permanently ending an agent's access. Immediate and idempotent, with outcome tokens for verification.
Instructions
Revoke a fullmakt — withdraw an agent's delegated authority for a Norwegian company and retire the agent principal (broker with request_fullmakt, inspect with check_fullmakt). Given ONLY the agent_principal_id (system_user_id and org_number resolve server-side from the write-once binding, so a client cannot redirect the revoke), Apier revokes the bound delegation and flips the principal to terminal revoked — never resurrected; create a new principal to act again. LOCAL revocation is authoritative and immediate. Idempotent: an already-revoked principal/delegation is a 200 no-op. warnings[] carries NAMED outcome tokens (principal_revoke_failed, delegation_not_found, upstream_revoke_unconfirmed) - read the specific token, not just array emptiness. Input: { agent_principal_id (uuid), reason? (audit-only) }. Failure modes: FULLMAKT_PRINCIPAL_NOT_FOUND, SCOPE_INSUFFICIENT (needs read:altinn), VALIDATION_FAILED. No sandbox mirror — a sandbox bearer gets SANDBOX_TOOL_UNAVAILABLE. Docs: https://www.apier.no/docs/fullmakt
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Optional operator-facing reason, recorded on the audit row only. Send content or omit — an empty string is rejected. | |
| agent_principal_id | Yes | The agent principal (UUID) whose delegation to revoke — one of YOUR OWN; an unknown or foreign id returns FULLMAKT_PRINCIPAL_NOT_FOUND. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | No | ||
| result | Yes | The revocation outcome: `revoked: true`, the `agent_principal` snapshot, and `warnings[]` (empty on the clean path; NAMED tokens otherwise). | |
| metadata | Yes | ||
| justification | Yes |