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

# Delete a user

> POST /v1/platform-users/delete: delete a platform user and their data, or unlink a user who claimed their account.

Removes one of your [platform users](https://docs.cabalspy.xyz/cabalspy-id/white-label.md).

* **Managed user**: the account and its data are deleted. Tracking of its wallets stops at the next sync.
* **Claimed user**: the person owns the account now, so only the link to your platform is removed. They keep their CabalSpy ID.

Afterwards the `external_id` is free again and can be created anew.

## Body

**external\_id** `string` *required*

Your id of the user. Alternatively pass csid\_id.

## Usage Example

```bash cURL theme={null}
curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/delete" \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"external_id": "user_8412"}'
```

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

r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/delete",
                  json={"external_id": "user_8412"},
                  headers={"Authorization": "Bearer YOUR_KEY"})
print(r.json()["data"])
```

```javascript JavaScript theme={null}
const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/delete", {
  method: "POST",
  headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({ external_id: "user_8412" }),
});
const { data } = await res.json();
console.log(data.deleted, data.unlinked);
```

## Response

**data** `object`

**data**

**external\_id** `string`

Your id of the user.

**deleted** `boolean`

True when the managed account and its data were deleted. False for a claimed user.

**unlinked** `boolean`

Always true: the user is no longer one of your platform users.

```json Response theme={null}
{
  "success": true,
  "data": { "external_id": "user_8412", "deleted": true, "unlinked": true },
  "meta": {
    "request_id": "req_5162c7cf7f87",
    "cached": false,
    "cache_age_seconds": 0,
    "version": "v1",
    "timestamp": "2026-10-26T08:04:11Z"
  }
}
```

## Errors

| Status | Code | Meaning |
| - | - | - |
| 400 | missing\_parameter | external\_id missing. |
| 400 | invalid\_parameter | external\_id or csid\_id invalid. |
| 401 | missing\_api\_key | API key missing. |
| 403 | invalid\_api\_key | API key invalid or not enabled for CabalSpy ID. |
| 404 | platform\_user\_not\_found | No user with this id in your instance. |
| 429 | rate\_limit\_exceeded | Rate limit exceeded. |

See [Errors](https://docs.cabalspy.xyz/cabalspy-id/errors.md) for the full list.


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