API overview

The platform exposes a REST API at https://api.fold.run. All endpoints require Authorization: Bearer <token> unless noted.

Endpoint groups

Group Path Description
Signup POST /signup Self-service registration (public)
Auth POST /auth/login Email/password login (public)
Organizations /tenants Create organization, list organizations, create organization token
Bindings /bindings Create/list/delete bindings (key-value, database, object-storage, queue) for an organization
Deploy POST /deploy Deploy a function
Functions /functions List (search, filter, paginate), get by ID, delete
Activations /activations List execution records, get by ID
Rollback POST /rollback Roll back a function to a prior version
Secrets /secrets Organization-level encrypted secrets (create, list, delete)
Custom domains /custom-domains Add (POST), get status (GET), verify (POST), remove (DELETE); Pro plan required
Env vars /env-vars Per-function encrypted environment variables
Usage /usage Usage metrics for an organization (query: days, default 30)
Billing /billing Billing management (setup, checkout, portal, usage reporting, webhook)
Teams /teams Team memberships, invites, accept invite
Workspaces /workspaces Workspace CRUD, members, switching, usage breakdown
Templates /templates Template marketplace (list, get, create; GET is public)
Hooks /hooks Webhook subscriptions for deploy lifecycle events
API keys /api-keys Scoped API keys (create, list, revoke)
Insights /insights Platform analytics
Diagnose /functions/:id/diagnose AI-powered error diagnosis
AI /ai/generate Natural language code generation
Schedules /schedules Scheduled execution triggers (cron)
Tools /tools MCP tool CRUD
Webhook configs /webhook-configs Inbound webhook configuration
Logs /logs Structured log queries
Analytics /analytics Platform analytics data
Subrequests /subrequests Subrequest tracking
Email verify POST /email-verify Email verification (public)
MFA /mfa Multi-factor authentication setup and verification
OAuth /auth/oauth/* OAuth provider login (e.g. GitHub) (public)
Password reset /password-reset Password reset flow (public)
MCP /mcp Model Context Protocol endpoint for AI agents

Full API reference

  • Interactive docs (Scalar): https://api.fold.run/docs — browse and try endpoints.
  • OpenAPI JSON: GET https://api.fold.run/doc — machine-readable spec.

Use these for request/response schemas, parameters, and status codes. This user guide summarizes flows and concepts; the spec is the authority for field names and types.

Authentication

Send Authorization: Bearer <token> with your API key or JWT. See Getting started.