API access
Pull churn scores, at-risk lists, and summaries into your own tools via the REST API.
What the API offers
ChurnWhisper exposes a REST API under /api/v1/ that returns JSON. You can pull churn scores for individual customers, get your at-risk list, and fetch a store summary — all authenticated with an API key.
API access is a Pro feature. API keys use the format cw_ + 32 hex characters, are SHA-256 hashed at rest, and the plaintext is shown only once at creation time.
Creating an API key
- Go to Settings > API Keys in the dashboard.
- Click "Create key" and give it a label (e.g. "CRM integration").
- Copy the key immediately — it is shown only once.
- Store it securely. If lost, you must create a new key.
Endpoints
All endpoints require a Bearer token in the Authorization header:
Authorization: Bearer cw_yourkeyhere
- GET /api/v1/scores — all churn scores for the store, paginated.
- GET /api/v1/at-risk — customers sorted by churn probability, highest first.
- GET /api/v1/summary — store-level summary (customer count, revenue at risk, score distribution).
Example: fetch at-risk customers
curl -H "Authorization: Bearer cw_..." \ https://app.churnwhisper.com/api/v1/at-risk?limit=50
Returns an array of customer objects with their churn probability, risk band, revenue at risk, and last order date.
Rate limits
API requests are rate-limited to 60 per minute per key. If you exceed the limit, you receive a 429 response with a Retry-After header.