Skip to main content
DELETE
Permanently delete imported historical data from your account. You can selectively clear sends, clicks, and/or revenue records.
Important scoping differences:
  • Sends: Only records where imported=true are cleared. Records from normal API sends or scheduled sends are never affected.
  • Clicks: Clicks are cleared based on the message IDs of imported send records. Only clicks associated with imported messages are removed.
  • Revenue: All revenue records for the account are cleared, not just those from imported messages. This includes revenue from live sends.
This is a destructive operation that cannot be undone. Cleared data is permanently deleted and cannot be recovered. Always verify your selection and consider using the before_date parameter to limit the scope of deletion.

Authentication

string
required
Your Trackly SMS API key. Format: trk_[32-char-alphanumeric].

Body Parameters

array
required
An array of entity types to clear. Valid values: sends, clicks, revenue. You may include one or more entity types.
datetime
Only clear records with timestamps before this ISO 8601 datetime. If omitted, all matching records are cleared regardless of date.For clicks, before_date is applied to the parent send’s (MessageSent) timestamp, not the click’s own timestamp. Clicks are cleared based on the imported send records whose timestamp falls before before_date, regardless of when the click itself occurred.
boolean
required
Safety confirmation flag. Must be set to true to proceed with deletion. Requests with confirm: false or a missing confirm field are rejected.

Response Fields

boolean
Whether the clear operation completed successfully.
object
An object with counts of cleared records by entity type. Only includes entities that were requested.
  • sends (integer) — Number of send records cleared.
  • clicks (integer) — Number of click records cleared.
  • revenue (integer) — Number of revenue records cleared.

Error Codes

Authenticated requests can also fail with 401 invalid_credentials, 403 account_suspended, or 429 rate_limited — see Error Codes.

Next Steps

Reporting Overview

Understand your analytics

Bulk Create Contacts

Re-import after clearing