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

# Delete Client

> Permanently delete a client from your account

> [!WARNING]
>
> Deletion is permanent and cannot be undone. The client can no longer log in, **all of its API keys are revoked immediately**, and it is unlinked from any SmartServers, servers and infrastructure it was assigned to. Clients with no API keys are deleted the same way.

> [!NOTE]
>
> This endpoint is limited to **5 requests per minute** per account. Requests over the limit return `429`.

## Path Parameters

**id** `number` *required*

ID of the client to delete. Must belong to your account.

## Query Parameters

**api\_key** `string` *required*

Your SmartLead API key (client API keys are not allowed)

**confirm\_email** `string` *required*

Email address of the client you are deleting. It must match the email of the client with this `id` on your account (case-insensitive). This guards against deleting the wrong client: on a mismatch the request returns `400` and nothing is deleted.

**downgradeClientAddOn** `boolean` (default: false)

Also reduce your paid client add-on subscription by one seat. Ignored for accounts with grandfathered whitelabel pricing. Rejected with `406` if it would take you below the clients included free in your plan.

## Rate Limit

| Limit | Scope | Window |
| - | - | - |
| 5 requests | Per account (all API keys of the account share it) | 60 seconds |

* Every request counts, including ones rejected for invalid parameters.
* Requests over the limit return `429` until the window resets; retry after 60 seconds.
* Your account's general API rate limit still applies on top of this.

```bash cURL theme={null}
curl -X DELETE "https://server.smartlead.ai/api/v1/client/456?api_key=YOUR_KEY&confirm_email=client@acme.com"
```

```bash cURL (with add-on downgrade) theme={null}
curl -X DELETE "https://server.smartlead.ai/api/v1/client/456?api_key=YOUR_KEY&confirm_email=client@acme.com&downgradeClientAddOn=true"
```

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

response = requests.delete(
    "https://server.smartlead.ai/api/v1/client/456",
    params={"api_key": "YOUR_API_KEY", "confirm_email": "client@acme.com"}
)
print(response.json())
```

## Response

**ok** `boolean`

`true` when the client was deleted

**clientId** `number`

ID of the deleted client

**apiKeysRevoked** `number`

Number of the client's active API keys that were revoked (`0` if it had none)

```json 200 theme={null}
{
  "ok": true,
  "clientId": 456,
  "apiKeysRevoked": 1
}
```

```json 400 theme={null}
{
  "message": "confirm_email does not match the client's email. Nothing was deleted."
}
```

```json 401 theme={null}
{
  "message": "Not authorized"
}
```

```json 403 theme={null}
{
  "message": "Invalid client id!"
}
```

```json 406 theme={null}
{
  "message": "You can't delete more clients subscription than the number of clients subscription you have as free in your plan."
}
```

```text 429 theme={null}
You have exceeded the 5 requests in 60 sec limit for this endpoint!
```

```json 500 theme={null}
{
  "ok": false,
  "message": "An internal server error occurred while deleting the client. Please retry after some time. If the issue persists, please contact support.",
  "clientId": 456
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.