---
title: "Initiate account deletion (send confirmation email)"
method: POST
path: "/v1/account/deletion-request"
tags: ["Account"]
---

# Initiate account deletion (send confirmation email)

`POST /v1/account/deletion-request`

## Request

- Base URL: `https://api.zindex.ai`
- URL: `https://api.zindex.ai/v1/account/deletion-request`
- Auth: API key in cookie `zindex_session`

Validates the typed workspace-name confirmation, and sends a confirmation email to the caller's registered address. The email link routes to /dashboard/confirm-account-deletion where the owner clicks Confirm. Token expires in 24 hours.

## Request body

- object
  - `confirmedName` string, required: Must exactly match the workspace name.
  - `gdprErasure` boolean: Operator-set flag, default false. Records the deletion as a GDPR erasure; the Stripe customer is deleted either way.

## Response `202`

Email queued. The owner must click the link in their inbox to complete deletion.

- object
  - `ok` boolean
  - `message` string
  - `expiresAt` string, date-time

## Other responses

- `400`: confirmedName missing or did not match.
- `401`: Missing or invalid API key. Response includes a `code` field that distinguishes the failure mode so clients (dashboard, MCP server) can render actionable copy: `AUTH_REQUIRED` (no key or session was sent), `API_KEY_INVALID` (key not found), `API_KEY_REVOKED` (key was revoked, or its person is no longer in its workspace), `API_KEY_EXPIRED` (key passed its expires_at), and for the site's session cookie `SESSION_EXPIRED` (past its 24 hours), `SESSION_REVOKED` (the account's sessions were ended, for example by a password reset) and `SESSION_INVALID` (not a session this server signed).
- `409`: LAST_OWNER: the person is the last owner of a team workspace with other people in it; blocking lists those workspaces. Make someone else an owner, or delete the workspace, first. No email is sent.
- `429`: RATE_LIMITED: over the request rate limit (see Rate Limiting). Wait retryAfter seconds (also the Retry-After header), then try again.
- `502`: EMAIL_UNAVAILABLE: the confirmation email could not be sent, so nothing was requested. Try again.

## Changes

- **2026-10-20** `1d21bd5bbf8e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zindex/apis/zindex-api/changes/v1/account/deletion-request/post.md)

---

[API](https://skmtc.dev/zindex/apis/zindex-api.md) · [All operations](https://skmtc.dev/zindex/apis/zindex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zindex/apis/zindex-api/revisions/1d21bd5bbf8e?raw)
