Quickstart

Send your first event into ChurnWarn in under five minutes.

ChurnWarn turns the product, billing, and support signals you already emit into an early-warning churn score per account. This guide gets one event flowing end-to-end.

1. Get an ingest key

Open Settings → API keys in your project and create an ingest key. You can authenticate two ways:

  • X-Api-Key — a long-lived key, best for server-side SDKs and cron jobs.
  • Authorization: Bearer <jwt> — best for the browser SDK and short-lived sessions.
Keep server keys server-side

An X-Api-Key can write events for your whole tenant. Never ship it in browser code — use a Bearer token there instead.

2. Send an event

Every event needs an externalAccountId (the customer account id in your system) and an eventType. Pick the path that fits your stack:

curl -X POST https://your-gateway.example.com/api/events \
-H "X-Api-Key: $CHURNWARN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "externalAccountId": "acct-123",
  "eventType": "feature_used",
  "source": "backend",
  "payload": "{\"feature\":\"export_csv\"}"
}'

3. Verify it landed

Open your dashboard and find the account by its externalAccountId. New events feed the Engagement and Activity components within a minute. If nothing shows up, check the Security & data masking page for auth and CORS troubleshooting.

Where to go next

  • SDK overview — choose between background capture and direct send.
  • Direct HTTP & cURL — the full ingest API contract.
  • Event map — turn raw event names into the metrics that drive your score.