Skip to main content

API Overview

This section catalogs the public endpoints exposed by the Reformer Platform backend. Each entry includes method, path, purpose, required headers, sample requests, and expected responses.

Base URLs

EnvironmentBase URL
Developmenthttp://localhost:10000
Productionhttps://reformer-platform.onrender.com

All requests must include Content-Type: application/json and authentication headers where noted.

Core Endpoints

Onboarding v2

MethodPOST
Path/api/onboarding-v2
PurposeKick off full automation cascade for a new member/company.
Authx-api-key (internal service token)
Body
{
"email": "client@example.com",
"companyName": "Client Co",
"companyUrl": "https://client.co",
"plan": "growth",
"metadata": {
"referrer": "landing-page"
}
}
Success (200){"status":"ok","integrations":{"clickup":"success","dropbox":"success", ...}}
Failure (4xx/5xx)Returns per-integration errors with context field.

Checkout Session

MethodPOST
Path/api/checkout/session
PurposeCreate a Stripe Checkout session for subscription onboarding.
AuthNone (public flow); anti-bot measures via captcha recommended.
Body{ "planId": "growth", "email": "client@example.com" }
Response{ "url": "https://checkout.stripe.com/..." }

Health Checks

  • GET /healthz – Basic liveness.
  • GET /status – Extended status including integration reachability.

Firecrawl Intelligence

MethodGET
Path/api/firecrawl/accounts/:accountId/summary
PurposeGet Firecrawl intelligence summary (job stats, recent jobs, events, geo targets).
AuthInternal (admin dashboard)
Response{"success": true, "summary": {"stats": [...], "recentJobs": [...], "recentEvents": [...], "geoTargets": [...]}}
MethodPOST
Path/api/firecrawl/accounts/:accountId/refresh
PurposeTrigger Firecrawl refresh with industry/location context.
AuthInternal (admin dashboard)
Body{"url": "https://example.com", "industry": "fitness", "city": "Los Angeles", "region": "CA"}

Authentication

MethodPathPurpose
POST/api/auth/signupCreate new user account
POST/api/auth/loginAuthenticate user
POST/api/auth/forgot-passwordRequest password reset email
POST/api/auth/reset-passwordReset password with recovery token
POST/api/verify-emailVerify email token

See Authentication Endpoints for detailed documentation.

Webhooks

PathSourcePurpose
POST /webhooks/memberstack/:secretMemberstackSync member signups/updates into Supabase and orchestrator.
POST /webhooks/stripeStripeHandle subscription events (checkout.session.completed, invoice.paid).
POST /webhooks/cal/:secretCal.comBooking notifications to create ClickUp tasks + Slack alerts.

Environment Variables Used

See reformer-platform/ENV-TEMPLATE.md for the complete list. Critical keys:

  • CLICKUP_* for task automation
  • SLACK_WEBHOOK_URL for notifications
  • RESEND_API_KEY for email sending (primary email service)
  • DROPBOX_ACCESS_TOKEN for folder provisioning
  • CURSOR_API_KEY for Cloud Agent automation
  • MCP Servers: See MCP Servers documentation for configuration

Testing

  • cURL examples stored in docs/api/examples/ (to be populated).
  • Automated tests run via npm run test:api and npm run test:e2e.
  • Sample Postman/Insomnia collections exported to /docs/api/collections/ (if used).***