For AI agents: the complete documentation index for the Restless API is available at https://build.restless.ai/llms.txt. This page is also available as Markdown at https://build.restless.ai/usecases/find-customers-about-to-churn-on-errors.md (or send an Accept: text/markdown request header).
Find customers about to churn on errors
Surface the end-users whose error rate is climbing, then read what is failing for them.
Aggregate error rates hide the customers who are actually having a bad time. This finds the end-users whose failure rate stands out, then reads their traffic so you can tell a broken integration from a broken endpoint.
Reach for this on a regular sweep, or before a renewal conversation, when you want the list of accounts worth contacting and a specific reason for each one.
A curated task for the Restless API: the calls to make, in order, as the API's owner wrote them. Humans run this as a guided conversation at the same URL; the steps below are that same recipe.
Steps
1. Confirm the identity and access behind the API key with `GET /api/v1/me`.
2. Pick the target project. If you only have an example slug, verify it with `GET /api/v1/projects/{slug}`, or browse options via `GET /api/v1/projects`.
3. List the users whose error rate is above the line with `GET /api/v1/projects/{slug}/users`, passing `atRisk=true`. Tune `threshold` (a percentage) and `minRequests` so a user with two total requests does not outrank a heavy user sitting at 30 percent.
4. For each user worth chasing, pull their recent failures with `GET /api/v1/projects/{slug}/logs`, passing their address as `groupEmail` and narrowing with `status`.
5. Open the clearest example with `GET /api/v1/projects/{slug}/logs/{logId}` and work out whether the fault is theirs (a malformed request, the wrong credential) or yours.
6. Report back per user: what they are calling, what is failing, and which of those two it is.