> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bota.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete End User

> Permanently delete an end user and all associated data

Permanently delete an end user and all associated data including recordings, transcriptions, and device bindings. This operation is irreversible and supports compliance requirements (e.g., GDPR right to deletion, HIPAA).

## Authentication

Requires an [API key](/authentication) with `end_users:write` scope.

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api.bota.dev/v1/end-users/eu_abc123 \
    -H "Authorization: Bearer sk_live_..."
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.bota.dev/v1/end-users/eu_abc123', {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer sk_live_...',
    },
  });

  // 204 No Content on success
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      'https://api.bota.dev/v1/end-users/eu_abc123',
      headers={
          'Authorization': 'Bearer sk_live_...',
      },
  )

  # 204 No Content on success
  ```
</RequestExample>

## Path Parameters

<ParamField path="id" type="string" required>
  The end user's unique identifier (e.g., `eu_abc123`).
</ParamField>

## Response

Returns `204 No Content` on success.

<ResponseExample>
  ```json 204 theme={null}
  ```

  ```json 404 theme={null}
  {
    "error": {
      "code": "not_found",
      "message": "End user not found"
    }
  }
  ```
</ResponseExample>

## What Gets Deleted

When you delete an end user, the following data is permanently removed:

| Resource           | Action                                       |
| ------------------ | -------------------------------------------- |
| End user record    | Deleted                                      |
| All recordings     | Deleted (audio files and metadata)           |
| All transcriptions | Deleted                                      |
| All summaries      | Deleted                                      |
| Device bindings    | Unbound (devices return to `unbound` status) |

<Warning>
  This operation cannot be undone. All data associated with the end user is permanently deleted. Make sure to confirm with your user before proceeding.
</Warning>

## Compliance Use Cases

### GDPR Right to Erasure

When a user requests deletion under GDPR Article 17:

```javascript theme={null}
// Handle GDPR deletion request
async function handleDeletionRequest(customerUserId) {
  // Look up the Bota end user ID from your mapping
  const botaEndUserId = await getMapping(customerUserId);

  // Delete from Bota
  await fetch(`https://api.bota.dev/v1/end-users/${botaEndUserId}`, {
    method: 'DELETE',
    headers: { 'Authorization': 'Bearer sk_live_...' },
  });

  // Delete from your own system
  await deleteFromYourDatabase(customerUserId);

  // Remove the mapping
  await removeMapping(customerUserId);
}
```

### HIPAA Compliance

For healthcare applications, this endpoint supports patient data deletion requirements. Ensure you also maintain appropriate audit logs in your system.
