Skip to content

Advanced

Churn audits

File an audit report after cleaning up a churned customer's data.

When you clean up the data of a churned customer — as opposed to the ongoing retention-window cleanup — report it to this separate endpoint. Churn audits are filed under a separate storage prefix so the two audit types stay segregated and can carry different retention rules.

Endpoint#

Request
POST https://core-api.heysadie.ai/v1/churn/audits
Content-Type: application/json
Authorization: ApiKey YOUR_ORG_API_KEY

Everything is identical to the retention audits endpoint:

  • Note this is a /v1 path.
  • Authenticate with your organization-level API key; no X-Tenant-Id header. Tenant-level keys are rejected — see Organization-level access.
  • The body is any JSON object (max 10MB), stored exactly as sent. Only runId (UUID) is required — it names the stored file, and re-sending the same runId overwrites the same file, so retries are idempotent. finishedAt (ISO 8601) is recommended: it anchors the year/month folder the audit is filed under.
  • source is derived server-side from your authenticated organization id and cannot be spoofed.
Example payload
{
  "runId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "finishedAt": "2026-06-11T03:01:30.000Z",
  "status": "completed",
  "customerId": "<your-internal-customer-id>",
  "recordsDeleted": 4213
}

Responses#

A successful submission returns the standard envelope with { "stored": true, "runId": "..." }.

StatusMeaningWhat to do
200Audit storedMark the run as reported
400Missing/invalid runId, payload over 10MB, or body is not a JSON objectFix the payload; do not retry as-is
401 / 403Bad or missing keyCheck your org API key
503Storage temporarily unavailable (CHURN_AUDIT_STORAGE_FAILED)Keep the run marked unreported; re-send on your next run

Which endpoint do I use?#

You cleaned up…Endpoint
Data older than your retention windowPOST /v1/retention/audits
A churned customer's dataPOST /v1/churn/audits