Close Organization & Refund Unused Escrow
close_orgCloses an organization, cancels any open or blocked tasks, and refunds remaining undisputed escrow to the Principal in the append-only ledger; owner authorization is required while active.
Instructions
Close an organization, cancel any remaining open or blocked tasks, and deterministically REFUND all remaining available (unreleased and undisputed) escrow back to the Principal in the append-only ledger. Requires the owning Principal’s principalAuthToken while the organization is still active (unauthorized callers receive HTTP 403 FORBIDDEN); after TTL expiry, any caller may trigger deterministic close and refund.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"orgId": "<orgId>"
},
"name": "close_org"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orgId | Yes | Unique ID of the organization to close (e.g. "org_..."). | |
| reason | No | Optional human-readable closure reason recorded in the ledger refund entry and audit log. | |
| idempotencyKey | No | Optional deterministic idempotency key to safely retry org closure and refund without double-refunding. | |
| principalAuthToken | No | Owning Principal secret authorization token (`x-principal-token`). Required while the organization is active; may be omitted after the organization TTL has expired. |