---
title: "Clear historical data for the account"
method: DELETE
path: "/v2/history/clear"
tags: ["history-v2"]
---

# Clear historical data for the account

`DELETE /v2/history/clear`

## Request

- Base URL: `https://api.tracklysms.com/api`
- URL: `https://api.tracklysms.com/api/v2/history/clear`
- Auth: API key in header `X-Api-Key`

Only clears records where imported=true (for sends).

## Request body

- ClearRequest
  - `before_date` string, date-time: Only clear records before this date
  - `confirm` boolean, required: Safety confirmation (must be true)
  - `entities` string[], required: Entities to clear: sends, clicks, revenue

## Response `200`

History cleared

- ClearResponse
  - `cleared` object: Counts of cleared records by entity
  - `success` boolean: Operation success

## Other responses

- `400`: Validation error
- `401`: Authentication error
- `409`: Active LTV pilot requires retained historical evidence

---

[API](https://skmtc.dev/tracklysms/apis/trackly-sms-api.md) · [All operations](https://skmtc.dev/tracklysms/apis/trackly-sms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tracklysms/apis/trackly-sms-api/revisions/ac1ad22cb2a9?raw)
