---
title: "delete_end_user"
description: "Generated reference for the management action delete_end_user: its description, access metadata, payload contract, and registration status."
slug: /reference/actions/delete-end-user
order: 71
visibility: public
redirects_from: []
---

# delete\_end\_user

Generated automatically from the [published contract sources](/cloud/reference/about/#contract-sources).

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

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](/cloud/concepts/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 app user in the selected environment, including sign\-in methods, sessions, passkeys, device registrations, and push delivery records\. The realm's event log, app usage records and invitation history stay\. Handle app\-owned data separately\. Destructive: needs a credential with the destructive class \(a signed\-in session, or a token minted with `destructive`\)\. Nothing is deleted until a person approves the pending action in the browser\. The final receipt gives `deleted` and removal counts\. If the user is gone at execution, `deleted` is false\. An optional `environment` \(`development` or `production`\) chooses the realm you address\. Without it, the call selects `production`\. The development realm exists only once `create_environment` has turned development on\.

## More about this action

If the end user is missing at request time, the call returns HTTP 404 with `no_such_end_user` and gives no approval link\.

Keep the pending action's ID and use `read_approval_status` until it ends\. For details, see \[The pending action\]\(/concepts/what\-happens\-without\-asking\#the\-pending\-action\)\. If you send `request_id`, the pending\-action rule applies\. For the same requesting account and action, a repeated identifier returns the existing record while that record is live: requested and not past its 24\-hour expiry, approved, or executing\. After it ends, the same identifier can start a new request\. Check the approval and the user's current state before repeating deletion\.

If the user disappears before the approval check, the request can end as `description_changed`\. If the user disappears after that check, execution can return `deleted: false`\. A deletion receipt's `removed.users` counts app users\. Its detail may report removed device registrations\. For a test user, deletion also removes held sign\-in codes and their tickets\.

## Access and action metadata

```json
{
  "name": "delete_end_user",
  "resource": "realm",
  "tier": "destructive",
  "surface": "tzcloud",
  "addresses": [
    "tzcloud"
  ],
  "product": "cloud",
  "summary": "Remove one end user's rows through the pending action, its description rendered from the platform's own record.",
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "openWorldHint": false
  }
}
```

## MCP catalog entry

```json
{
  "name": "delete_end_user",
  "title": "Delete app user",
  "tier": "destructive",
  "summary": "Delete an app user in the selected environment, including sign-in methods, sessions, passkeys, device registrations, and push delivery records. The realm's event log, app usage records and invitation history stay. Handle app-owned data separately. Destructive: needs a credential with the destructive class (a signed-in session, or a token minted with `destructive`). Nothing is deleted until a person approves the pending action in the browser. The final receipt gives `deleted` and removal counts. If the user is gone at execution, `deleted` is false. An optional `environment` (`development` or `production`) chooses the realm you address. Without it, the call selects `production`. The development realm exists only once `create_environment` has turned development on.",
  "owners": [
    "ACS-L0-01",
    "MAPI-05",
    "PLD-L0-40"
  ],
  "scenario": "ACS-L0-08"
}
```

## request

| JSON pointer | Description and constraints |
|---|---|
| "" \(root\) | Type: object<br>Required fields: \["application","end\_user"\]<br>Additional properties: false |
| /<wbr>properties/<wbr>application | Your account's application `id` from `list_applications`, not its name or label\.<br><br>Type: string |
| /<wbr>properties/<wbr>end\_user | The end user's opaque id, from `list_end_users`\.<br><br>Type: string |
| /<wbr>properties/<wbr>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\.<br><br>Type: string |
| /<wbr>properties/<wbr>environment | Optional\. The environment whose realm the call addresses, `development` or `production`; absent, `production`\.<br><br>Type: string<br>Pattern: ^\(development\|production\)$ |

## 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\.<br><br>Type: object<br>Required fields: \["contract\_version","pending\_action","approval\_url"\] |
| /<wbr>properties/<wbr>contract\_version | Required value: 1 |
| /<wbr>properties/<wbr>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\.<br><br>Type: string<br>Pattern: ^\[0\-9a\-f\]\{10\}$ |
| /<wbr>properties/<wbr>pending\_action | $ref: \#/shapes/pending\_action |
| /<wbr>properties/<wbr>approval\_url | Type: string |
| /<wbr>properties/<wbr>detail | Type: string |

## Complete payload contract

```json
{
  "request": {
    "type": "object",
    "required": [
      "application",
      "end_user"
    ],
    "properties": {
      "application": {
        "type": "string",
        "description": "Your account's application `id` from `list_applications`, not its name or label."
      },
      "end_user": {
        "type": "string",
        "description": "The end user's opaque id, from `list_end_users`."
      },
      "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."
      },
      "environment": {
        "type": "string",
        "pattern": "^(development|production)$",
        "description": "Optional. The environment whose realm the call addresses, `development` or `production`; absent, `production`."
      }
    },
    "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).",
    "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](/cloud/reference/refusals/): every refusal, by surface, with its cause and its remedy
- [schemas/wire\_error\.schema\.json](/cloud/reference/sources/schemas/wire-error-schema/)
- [schemas/wire\_errors\.json](/cloud/reference/sources/schemas/wire-errors/)
- [schemas/action\_payloads\.json](/cloud/reference/sources/schemas/action-payloads/) (includes shared shapes)
- [management\_api\_contract\.md](/cloud/reference/sources/management-api-contract/)
