set_account_delete_lock #
On this page
Generated automatically from the published contract sources.
A script calls this action over HTTPS at POST https://turnzero.ai/api/v1/set_account_delete_lock, with a bearer credential and the action's payload as the JSON body. An MCP connection lists this action as the tool set_account_delete_lock.
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 #
Lock your account against deletion. Give a short reason. The call needs no browser approval. An existing lock keeps its reason and set time.
More about this action #
Use a signed-in session or an account-scoped token for your account. Give reason as one nonblank line of 1 to 200 characters with no control or Unicode format characters. Leave personal details out of it. Call read_account to read the current lock. A synthetic account gets HTTP 400 with invalid_request. The detail says that the account cannot be locked.
The call returns HTTP 200 with account, delete_lock, changed and detail. The delete_lock gives its reason and set_at. A new lock returns changed: true. If the account is already locked, the call returns the existing lock with changed: false and leaves its reason and set time as they were.
While the account is locked, delete_account refuses with delete_locked. Use lift_account_delete_lock to request removal of the lock and give the account owner the browser approval link. Account deletion takes a separate approval.
Access and action metadata #
{
"name": "set_account_delete_lock",
"resource": "account",
"tier": "reversible",
"surface": "account",
"addresses": [
"tzcloud",
"tztools"
],
"clients": [
"bearer",
"browser_session"
],
"summary": "Lock the calling account against deletion and record a reason. No browser approval is needed. A repeat returns the existing lock without changing it.",
"annotations": {
"readOnlyHint": false,
"destructiveHint": false,
"openWorldHint": false,
"idempotentHint": true
}
}
MCP catalog entry #
{
"name": "set_account_delete_lock",
"title": "Add account deletion lock",
"tier": "reversible",
"scenario": "CHI-L0-04",
"summary": "Lock your account against deletion. Give a short reason. The call needs no browser approval. An existing lock keeps its reason and set time.",
"owners": [
"ACB-L0-110"
]
}
request #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object Required fields: ["reason"] Additional properties: false |
| / |
Give the reason for locking the account in one nonblank line of 1 to 200 characters. Leave out control characters, Unicode format characters such as zero-width characters, and personal details. The reason is visible in account reads and on the lift approval page. Type: string Minimum length: 1 Maximum length: 200 |
response #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | The account's deletion lock after this call. Type: object Required fields: ["contract_version","account","delete_lock","changed","detail"] |
| / |
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}$ |
| / |
The id of the calling account. Type: string |
| / |
The lock set by this call or the existing lock if the account was already locked. Type: object Required fields: ["reason","set_at"] Additional properties: false |
| / |
The reason given when the lock was set. Type: string |
| / |
When the lock was set, in ISO 8601 format in UTC to the millisecond. Type: string |
| / |
True if this call set the lock. False if the existing lock was returned unchanged. Type: boolean |
| / |
Whether this call set the lock or returned an existing lock. Type: string |
Complete payload contract #
{
"request": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Give the reason for locking the account in one nonblank line of 1 to 200 characters. Leave out control characters, Unicode format characters such as zero-width characters, and personal details. The reason is visible in account reads and on the lift approval page."
}
},
"additionalProperties": false
},
"response": {
"type": "object",
"description": "The account's deletion lock after this call.",
"required": [
"contract_version",
"account",
"delete_lock",
"changed",
"detail"
],
"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."
},
"account": {
"type": "string",
"description": "The id of the calling account."
},
"delete_lock": {
"type": "object",
"description": "The lock set by this call or the existing lock if the account was already locked.",
"required": [
"reason",
"set_at"
],
"properties": {
"reason": {
"type": "string",
"description": "The reason given when the lock was set."
},
"set_at": {
"type": "string",
"description": "When the lock was set, in ISO 8601 format in UTC to the millisecond."
}
},
"additionalProperties": false
},
"changed": {
"type": "boolean",
"description": "True if this call set the lock. False if the existing lock was returned unchanged."
},
"detail": {
"type": "string",
"description": "Whether this call set the lock or returned an existing lock."
}
}
}
}
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