delete_application #

View this page as Markdown

On this page

Generated automatically from the published contract sources.

A script calls this action over HTTPS at POST https://tzcloud.turnzero.ai/v1/delete_application, with a bearer credential and the action's payload as the JSON body. An MCP connection lists this action as the tool tzcloud_delete_application.

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 application in both environments: its databases, credentials, end-user realms, issue spaces and records, bound areas and files, application-scope secrets. It also removes upstreams, application tokens, transfer grants, schedules, custom domain, code, image repository and published assets. Nothing is restored. The label is retired. Account-scope secrets and metering history stay. Use delete_environment or clear_development_database for development alone. For production data, use the application's routes or a migration file applied by its normal deploy.

Destructive: needs a signed-in session or a token minted with destructive. Give the account's owner approval_url for browser approval. Nothing is deleted before it. Read read_approval_status to its end for one receipt per kind.

More about this action #

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.

A failed deletion leaves earlier removals in place. Request the same deletion again for fresh browser approval; completed members report zero removals. Report a repeated failure with its reference. A deletion holds a five-minute lease; on deletion_in_progress, wait until the instant in its detail before requesting again. If the estate changes before approval, description_changed declines the request: request again for approval of the current description.

Access and action metadata #

{
  "name": "delete_application",
  "resource": "application",
  "tier": "destructive",
  "surface": "tzcloud",
  "addresses": [
    "tzcloud"
  ],
  "product": "cloud",
  "clients": [
    "bearer",
    "browser_session"
  ],
  "summary": "Delete the application and everything provisioned for it.",
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "openWorldHint": true
  }
}

MCP catalog entry #

{
  "name": "delete_application",
  "title": "Delete application",
  "tier": "destructive",
  "scenario": "CHI-L0-10",
  "summary": "Delete an application in both environments: its databases, credentials, end-user realms, issue spaces and records, bound areas and files, application-scope secrets. It also removes upstreams, application tokens, transfer grants, schedules, custom domain, code, image repository and published assets. Nothing is restored. The label is retired. Account-scope secrets and metering history stay. Use `delete_environment` or `clear_development_database` for development alone. For production data, use the application's routes or a migration file applied by its normal deploy.\n\nDestructive: needs a signed-in session or a token minted with `destructive`. Give the account's owner `approval_url` for browser approval. Nothing is deleted before it. Read `read_approval_status` to its end for one receipt per kind.",
  "owners": [
    "MAPI-05"
  ]
}

request #

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["application"]
/properties/application Your account's application id from list_applications, not its name or label.

Type: string
/properties/request_id 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

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. On a failed walk the outcome carries receipts, one receipt per kind for the members that ran before the failing member, beside execution_failed; a retry of the deletion runs the walk again, and a member already run returns zero removals.

Type: object
Required fields: ["contract_version","pending_action","approval_url"]
/properties/contract_version Required value: 1
/properties/reference 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}$
/properties/pending_action $ref: #/shapes/pending_action
/properties/approval_url Type: string
/properties/detail Type: string

Complete payload contract #

{
  "request": {
    "type": "object",
    "required": [
      "application"
    ],
    "properties": {
      "application": {
        "type": "string",
        "description": "Your account's application `id` from `list_applications`, not its name or label."
      },
      "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."
      }
    }
  },
  "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). On a failed walk the outcome carries `receipts`, one receipt per kind for the members that ran before the failing member, beside `execution_failed`; a retry of the deletion runs the walk again, and a member already run returns zero removals (PLD-L0-66).",
    "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 #