delete_account #
On this page
Generated automatically from the published contract sources.
A script calls this action over HTTPS at POST https://dev.turnzero.ai/api/v1/delete_account, with a bearer credential and the action's payload as the JSON body. An MCP connection lists this action as the tool delete_account.
OAuth access tokens and minted tokens, including the turnzero command's computer token, are bearer credentials. The action determines which kinds, scopes and grants it accepts (Sign-in, sessions, and tokens).
Build metadata: Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.
Contract description #
Delete an account and everything it holds. This includes applications, databases, storage areas, secrets and end-user realms. For your account, run export_account first. An account lock, an application lock, or both can block deletion with delete_locked. Lift the locks before requesting deletion. The refusal gives the account's own lock in delete_lock when set. It lists locked applications in locked_applications when there are any. An account with a platform operator identity is protected from deletion. Use a signed-in session or a token minted with destructive. Deletion requires browser approval.
More about this action #
The call returns pending_action and approval_url. Give the link to the person signed in to the account that requested deletion. For an operator's request to delete another account, the operator approves through their own account.
An account with a platform operator identity is protected from deletion. If that check blocks the request, the call returns operator_account_fixed. The platform checks the account and application deletion locks again before an approved request runs.
Pass request_id to make a repeat safe. While the earlier pending action is still live (requested, approved, or executing), a call with the same request_id from the same account returns that action and creates no second one. Once the action has completed, failed, been declined, or expired, the same request_id starts a new one.
Access and action metadata #
{
"name": "delete_account",
"resource": "account",
"tier": "destructive",
"surface": "account",
"addresses": [
"tzop"
],
"clients": [
"bearer",
"browser_session"
],
"summary": "Request erasure of the account through a pending action for browser approval. An account lock, an application lock, or both can block deletion with `delete_locked`. The refusal gives a standing account lock in `delete_lock` and any locked applications in `locked_applications`. An account with a platform operator identity is protected from deletion. If that check blocks the request, the call returns `operator_account_fixed`. The platform checks the account and application deletion locks again before an approved request runs.",
"annotations": {
"readOnlyHint": false,
"destructiveHint": true,
"openWorldHint": true
}
}
MCP catalog entry #
{
"name": "delete_account",
"title": "Delete account",
"tier": "destructive",
"scenario": "CHI-L0-12",
"summary": "Delete an account and everything it holds. This includes applications, databases, storage areas, secrets and end-user realms. For your account, run `export_account` first. An account lock, an application lock, or both can block deletion with `delete_locked`. Lift the locks before requesting deletion. The refusal gives the account's own lock in `delete_lock` when set. It lists locked applications in `locked_applications` when there are any. An account with a platform operator identity is protected from deletion. Use a signed-in session or a token minted with `destructive`. Deletion requires browser approval.",
"owners": [
"MAPI-05",
"API-L0-12"
]
}
request #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object |
| / |
Any string you choose. A repeat from the same account while that pending action is live returns it again, creating no second one. Omitted, every call creates a new one. Type: string |
| / |
Super-admin (platform operator) only: the id of another account to delete. Without that grant the member is ignored and the acting account is the subject; omitted, the acting account. Type: string |
response #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | The 202 creation envelope: the pending action and its approval link. Read the terminal outcome on the pending record with read_approval_status. Type: object Required fields: ["contract_version","pending_action","approval_url"] |
| / |
Required value: 1 |
| / |
The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row. Quote it when you report the call. Type: string Pattern: ^[0-9a-f]{10}$ |
| / |
$ref: #/shapes/pending_action |
| / |
Type: string |
| / |
Type: string |
Complete payload contract #
{
"request": {
"type": "object",
"properties": {
"request_id": {
"type": "string",
"description": "Any string you choose. A repeat from the same account while that pending action is live returns it again, creating no second one. Omitted, every call creates a new one."
},
"subject_account": {
"type": "string",
"description": "Super-admin (platform operator) only: the id of another account to delete. Without that grant the member is ignored and the acting account is the subject; omitted, the acting account."
}
}
},
"response": {
"type": "object",
"description": "The 202 creation envelope: the pending action and its approval link. Read the terminal outcome on the pending record with read_approval_status (API-L0-07).",
"required": [
"contract_version",
"pending_action",
"approval_url"
],
"properties": {
"contract_version": {
"const": 1
},
"reference": {
"type": "string",
"pattern": "^[0-9a-f]{10}$",
"description": "The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row. Quote it when you report the call."
},
"pending_action": {
"$ref": "#/shapes/pending_action"
},
"approval_url": {
"type": "string"
},
"detail": {
"type": "string"
}
}
}
}
Shared contracts #
- Refusals: every refusal, by surface, with its cause and its remedy
- schemas/wire_error.schema.json
- schemas/wire_errors.json
- schemas/action_payloads.json (includes shared shapes)
- management_api_contract.md