API Reference
Build on top of Resurgo with our REST API, webhooks, and integrations. 17+ endpoints available.
1. GENERATE_API_KEY
Go to Dashboard → Integrations → API Keys → Generate Key
2. MAKE_FIRST_REQUEST
curl https://resurgo.life/api/v1 \ -H "x-api-key: rsg_your_key_here"
3. RESPONSE
{
"version": "1.4.0",
"status": "operational",
"endpoints": {
"goals": "/api/v1/goals",
"habits": "/api/v1/habits",
"stats": "/api/v1/stats"
}
}4. CREATE_A_GOAL
curl -X POST https://resurgo.life/api/v1/goals \
-H "x-api-key: rsg_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Learn Spanish",
"category": "learning",
"timeline": "6 months",
"description": "Reach B1 level conversational fluency"
}'All API requests require authentication via API key. Pass your key in the request header:
x-api-key: rsg_your_api_key_here # or Authorization: Bearer rsg_your_api_key_here
Generate API keys from your Integrations dashboard. Keys start with rsg_ and are shown once upon generation.
SECURITY_NOTE
Never expose your API key in client-side code or public repositories. Use environment variables and server-side requests only.
{
"success": true,
"goal": {
"id": "g_abc123xyz",
"title": "Learn Spanish",
"category": "learning",
"progress": 0,
"milestones": [
{ "title": "Complete A1 basics", "target": "Month 1" },
{ "title": "Hold 5-min conversation", "target": "Month 3" },
{ "title": "Pass B1 test", "target": "Month 6" }
],
"createdAt": "2026-02-15T10:30:00Z",
"status": "active"
}
}REQUEST_BODY
{
"message": "I keep procrastinating on my coding project",
"coach": "marcus",
"context": { "currentStreak": 5, "level": 12 }
}RESPONSE
{
"response": "Procrastination on a project you care about usually means the next step isn't clear enough. Break it into a 15-minute task. What's the smallest thing you could ship today?",
"coach": "marcus",
"actionItems": [
"Define one small deliverable for today",
"Set a 25-min focus session",
"Review progress tomorrow"
]
}Resurgo supports outgoing webhooks to notify your systems when events occur. Configure webhooks in Dashboard → Integrations → Webhooks.
AVAILABLE_EVENTS
goal.createdgoal.completedgoal.updatedhabit.loggedhabit.streak_milestoneuser.level_upuser.achievement_unlockedsession.focus_completedpayment.succeededpayment.failedWEBHOOK_PAYLOAD_EXAMPLE
{
"event": "habit.logged",
"timestamp": "2026-02-15T08:00:00Z",
"data": {
"habitId": "h_xyz789",
"habitName": "Morning Meditation",
"streak": 21,
"xpAwarded": 25
},
"signature": "sha256=..."
}FREE
0 req/hr
No API access
PRO
100 req/hr
Standard rate
ENTERPRISE
Custom
Contact us
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-ResetERROR_RESPONSE_FORMAT
{
"error": true,
"code": 401,
"message": "Invalid API key. Check your x-api-key header.",
"docs": "https://resurgo.life/docs#auth"
}JavaScript / Node.js
COMING SOONnpm install @resurgo/sdkPython
COMING SOONpip install resurgocURL
AVAILABLEWorks out of the boxTelegram Bot
BUILT-IN@ResurgoBot on Telegram