API Reference
The RetainQ API lets you programmatically interact with your retention flows, sessions, and data.
Base URL
https://app.retainq.com/api/v1Authentication
The runtime API endpoints (session init, step, complete) are public — they're designed to be called from your website's frontend via the widget. No authentication is required for these endpoints.
Dashboard API endpoints (intelligence, flows management) require an authenticated session via Supabase Auth cookies. These are used internally by the dashboard and are not intended for external consumption in V1.
Endpoints
Runtime (Public — called by widget)
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/runtime/session/init | Start a new flow session |
POST | /api/v1/runtime/session/step | Submit answer, get next node |
POST | /api/v1/runtime/session/complete | End session with outcome |
Intelligence (Authenticated)
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/intelligence/analyze | Run AI churn analysis |
POST | /api/v1/intelligence/ask | Ask AI a question |
Rate Limits
- Runtime endpoints: 100 sessions per workspace (free tier)
- Intelligence endpoints: 10 requests per minute per workspace
Error Format
All errors return JSON with an error field:
{
"error": "Human-readable error message"
}Webhook Events
RetainQ can send HTTP POST webhooks to your server when events occur. See the Webhooks documentation for details.