delete_account

Delete a test account

act entity tenant-private since 2026-10-01

Deletes a test account (one created synthetic) once every org in it is torn down with teardown_synthetic_org: its roles, scopes and portfolios go, and the audit trail stays. A customer's account is never deleted here. Trade HQ staff only, with a reason.

Contract

shape
entity
authority
act
evidence
none
subscription
false
permission
any one of: staff.ops (the staff role staff_ops held in the Internal org, tradehq_role.staff_role); a deactivated caller is refused first
idempotency
natural
emits
account.deleted
MCP tool
delete_account
decision_set
approve, reject, escalate
REST
POST https://api.containertradehq.com/v1/cap/delete_account

Through MCP this call returns an approval request first; see Approvals.

Idempotency: keyed by the contract's own inputs: the same inputs replay the first call's result

Inputs

nametyperequiredvalidation
account_idaccount_idrequiredtradehq-account-id
The test account.
reasontextrequired1 to 500 characters
Why it is deleted, for the audit log.

Response

  • account_id · string · The account deleted.
Full JSON Schema
{
  "type": "object",
  "properties": {
    "account_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "format": "tradehq-account-id",
      "description": "The account deleted.",
      "x-data-class": "operational"
    }
  },
  "required": [
    "account_id"
  ],
  "additionalProperties": false
}

Refusals

  • account_not_synthetic · 422 · the account is not a test account; only a synthetic account is deleted
  • account_has_orgs · 422 · the account still holds an org that is not torn down; tear each down first
  • account_provisioned · 422 · a provisioning record names the account, and it is kept
  • account_not_found · 422 · the account was deleted between the call's admission and its write

The platform refusals apply to every call: version, authentication, authority, validation and rate limits, each in the same envelope.

Surfaces

DesktopF
MobileD5
APIF
MCPF*
VoiceD2
PushF
OneBoxN
OutboundN
  • Mobile: degraded: composition
  • MCP: approval required
  • Voice: degraded: confirmation
  • OneBox: no document originates an account's deletion
  • Outbound: crosses to no counterparty

Events

Related

None.