API Reference

Integrate SoftChurn data into your applications with our REST API.

API access is available on the Scale plan. Generate your API key from Settings.

Authentication

All API requests require an API key sent via the Authorization header.

Authorization: Bearer your_api_key_here

Rate Limits

The API is rate-limited to 60 requests per minute per API key. Rate limit headers are included in every response:

Header Description
X-RateLimit-LimitMaximum requests per minute
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the window resets

Endpoints

GET /api/v1/account

Returns your account details, plan, and usage stats.

GET /api/v1/customers

Returns paginated list of tracked customers. Supports ?status= and ?q= filters.

GET /api/v1/customers/{id}

Returns details for a single tracked customer.

GET /api/v1/customers/{id}/events

Returns payment events for a specific customer.

GET /api/v1/customers/export

Returns customer data as a CSV file download.

GET /api/v1/campaigns

Returns active dunning campaigns with their status.

GET /api/v1/stats/monthly

Returns recovery and failure statistics for the current month.

GET /api/v1/webhooks/deliveries

Returns recent webhook delivery attempts and their status.

POST /api/v1/webhooks/test

Sends a test webhook event to your configured URL.

Error Responses

The API returns standard HTTP status codes. Error responses include a JSON body:

{
  "error": true,
  "message": "Rate limit exceeded. Try again in 42 seconds.",
  "code": 429
}
Code Meaning
200Success
401Invalid or missing API key
403Feature not available on your plan
404Resource not found
429Rate limit exceeded
500Internal server error