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_KEYEverything is identical to the retention audits endpoint:
- Note this is a
/v1path. - Authenticate with your organization-level API key; no
X-Tenant-Idheader. 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 samerunIdoverwrites the same file, so retries are idempotent.finishedAt(ISO 8601) is recommended: it anchors the year/month folder the audit is filed under. sourceis 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": "..." }.
| Status | Meaning | What to do |
|---|---|---|
| 200 | Audit stored | Mark the run as reported |
| 400 | Missing/invalid runId, payload over 10MB, or body is not a JSON object | Fix the payload; do not retry as-is |
| 401 / 403 | Bad or missing key | Check your org API key |
| 503 | Storage 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 window | POST /v1/retention/audits |
| A churned customer's data | POST /v1/churn/audits |