delete_secret #

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_secret, with a bearer credential and the action's payload as the JSON body. An MCP connection lists this action as the tool tzcloud_delete_secret.

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 your stored secret by name and scope. This cannot be undone. Use a signed-in session or account-wide token minted with destructive. Give the account's owner approval_url for browser approval, then read read_approval_status to its end. Nothing is deleted before approval. End settings, upstream, sign-in and push uses first or meet secret_in_use. A platform-managed secret cannot be deleted. To change a value, use store_secret with replace: true. Replace a leaked key at its issuer.

More about this action #

If you store a value under the same name afterwards, it is a new value.

A name is in use while a setting is bound to it in the recorded manifest, in a running copy, or in an act in progress such as a deploy. It is also in use while it is an upstream's key, a realm route's credential, or a push provider's credential. A use that begins before the approval ends the pending action declined. A use that begins after the approval ends it failed with secret_in_use.

If the value is already gone, or was re-supplied, rotated, or stored again since the approval, the action completes with deleted false, and nothing is deleted.

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.

No action reads or restores a deleted value. The vault keeps it soft-deleted for its retention period.

Deleting the environment, application or account removes its platform credentials. Platform names credential-<application id>, database-<application id> and issue-tracking-<application id> refuse platform_minted_name. An issue-space: token's colon fails validation before lookup.

Access and action metadata #

{
  "name": "delete_secret",
  "resource": "secret",
  "tier": "destructive",
  "surface": "tzcloud",
  "addresses": [
    "tzcloud"
  ],
  "product": "cloud",
  "clients": [
    "bearer",
    "browser_session"
  ],
  "summary": "End one stored value through the pending action, its description rendered from the custody index: the entry leaves the index and no caller reads the value again, the vault holding it in its soft delete for its retention window. A platform-minted name, and a name a binding, an upstream, a realm route, or a push provider uses, is refused.",
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "openWorldHint": false
  }
}

MCP catalog entry #

{
  "name": "delete_secret",
  "title": "Delete secret",
  "tier": "destructive",
  "scenario": "CHI-L0-08",
  "summary": "Delete your stored secret by name and scope. This cannot be undone. Use a signed-in session or account-wide token minted with `destructive`. Give the account's owner `approval_url` for browser approval, then read `read_approval_status` to its end. Nothing is deleted before approval. End settings, upstream, sign-in and push uses first or meet `secret_in_use`. A platform-managed secret cannot be deleted. To change a value, use `store_secret` with `replace: true`. Replace a leaked key at its issuer.",
  "owners": [
    "SCRT-L0-07",
    "SCRT-L0-08",
    "SEC-L0-07",
    "MAN-14",
    "API-L0-07",
    "MAPI-05"
  ]
}

request #

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["name"]
Additional properties: false
/properties/name The stored name to delete, as list_secrets lists it.

Type: string
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$
/properties/application The application id whose scope holds the secret; omitted, the account scope.

Type: string
/properties/environment Optional, and only with application: the environment whose scope of that application holds the secret, development or production; leave it out for production. Refused if given without application. Each environment's value is deleted on its own call.

Type: string
Pattern: ^(development|production)$
/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. A completed outcome holds deleted, the secret with its name, scope, application, and environment, and a detail. Where deleted is false the value was already gone, or was re-supplied, rotated, or stored again since the approval. Where it is true the detail states the vault's retention window. A use made after the approval ends the record failed with secret_in_use.

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": [
      "name"
    ],
    "properties": {
      "name": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$",
        "description": "The stored name to delete, as `list_secrets` lists it."
      },
      "application": {
        "type": "string",
        "description": "The application id whose scope holds the secret; omitted, the account scope."
      },
      "environment": {
        "type": "string",
        "pattern": "^(development|production)$",
        "description": "Optional, and only with `application`: the environment whose scope of that application holds the secret, `development` or `production`; leave it out for `production`. Refused if given without `application`. Each environment's value is deleted on its own call."
      },
      "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."
      }
    },
    "additionalProperties": false
  },
  "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). A completed outcome holds `deleted`, the `secret` with its `name`, `scope`, `application`, and `environment`, and a `detail`. Where `deleted` is false the value was already gone, or was re-supplied, rotated, or stored again since the approval. Where it is true the detail states the vault's retention window (SCRT-L0-07). A use made after the approval ends the record `failed` with `secret_in_use`.",
    "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 #