HTTP reference

Every route, who may call it, and the shape of its errors.

Every route Forkbase serves. Keys: A anon key, U a signed-in person's token, S service key, G agent token fba_, R run token fbr_, J job token fbj_, M MCP token fbm_, — none.

Send the API key as apikey: <key>; send tokens (and the service key, outside /rest, /auth, /storage) as Authorization: Bearer <token>. Bodies are JSON unless said.

Server

MethodPathKey
GET/—name, version, mode, API prefixes
GET/health—200 ok, 503 degraded
GET/metrics—Prometheus text
GET/skills/index.json—the skill pack: skills and their files
GET/skills/{skill}/{path}—one file of the pack
GET/skills/install.sh—downloads the pack into .claude/skills (or sh -s -- <folder>)
GET/skill/SKILL.md, /skill/setup.md—the forkbase-agent and forkbase-setup skills
GET/llms.txt, /llms-full.txt—these docs for language models
GET/dashboard/...—the dashboard's pages

/auth/v1

MethodPathKey
GET/settingsA
POST/signupA
POST/token?grant_type=password|refresh_token|email_code|pkceA
POST/otpA
GET, POST/verify— (from an emailed link)
GET/authorize?provider=—
GET/callback/{provider}— (from the provider)
POST/recover, /reset, /resendA
GET, PUT/userU
POST/logout?scope=U
GET/.well-known/jwks.json—
GET, POST/admin/usersS
GET, PUT, DELETE/admin/users/{id}S
GET/admin/users/{id}/sessionsS
POST/admin/users/{id}/logoutS
POST/admin/inviteS
GET/admin/eventsS
GET/admin/keysS
POST/admin/keys/rotate, /admin/keys/{kid}/retireS

/rest/v1

MethodPathKey
GET/A, U, S
GET, POST, PATCH, DELETE/{table}A, U, S (as RLS allows)

/realtime/v1

MethodPathKey
GET (WebSocket)/websocket?apikey=&vsn=1.0.0A, U, S
GET, POST/tablesS
DELETE/tables/{schema.table}S
GET/inspectS

/storage/v1

MethodPathKey
GET, POST/bucketA, U, S (as RLS allows)
GET, PUT, DELETE/bucket/{id}ditto
POST/bucket/{id}/emptyditto
POST, PUT, GET, DELETE/object/{bucket}/{path}ditto
DELETE/object/{bucket}ditto
GET/object/authenticated/{bucket}/{path}ditto
GET/object/public/{bucket}/{path}, /object/info/public/{bucket}/{path}— (public buckets)
GET/object/info/{bucket}/{path}, /object/info/authenticated/{bucket}/{path}A, U, S
POST/object/list/{bucket}A, U, S
POST/object/move, /object/copyA, U, S
POST/object/sign/{bucket}, /object/sign/{bucket}/{path}A, U, S
GET/object/sign/{bucket}/{path}?token=— (a signed URL)
POST/object/upload/sign/{bucket}/{path}A, U, S
PUT/object/upload/sign/{bucket}/{path}?token=— (a signed upload URL)

/agents/v1

MethodPathKey
POST, GET/agentsS
DELETE/agents/{name}S
POST/runsS, G
GET/runsS, G
GET/runs/{id}S, G, R
POST/runs/{id}/sqlS, G, R
GET/runs/{id}/changes?view=rows|summary|sql&limit=S, G, R
GET/runs/{id}/ledger?after=&limit=&format=jsonlS, G, R
POST/runs/{id}/propose, /runs/{id}/discardS, G, R
POST/runs/{id}/approve, /runs/{id}/reject, /runs/{id}/undoS
GET, POST/approvals/{token}— (a signed approval link)
POST, GET/webhooksS
DELETE/webhooks/{id}S
GET/eventsS
GET/policiesS
PUT, DELETE/policies/{name}S
POST/policies/checkS

/jobs/v1

MethodPathKey
GET/runtimesS
POST, GET/functionsS
GET, PATCH, DELETE/functions/{name}S
POST/functions/{name}/invoke?wait=S
GET/jobs?function=&status=&before=&limit=S
GET/jobs/{id}S
POST/jobs/{id}/cancel, /jobs/{id}/retryS
POST, GET/schedulesS
GET, PATCH, DELETE/schedules/{id}S
POST/schedules/{id}/runS
POST, GET/triggersS
PATCH, DELETE/triggers/{id}S
GET/selfJ
GET, PUT/self/steps/{name}J

MCP and OAuth

MethodPathKey
POST/mcpM, G
GET/.well-known/oauth-protected-resource, /.well-known/oauth-protected-resource/mcp—
GET/.well-known/oauth-authorization-server—
POST/oauth/register, /oauth/token, /oauth/revoke—
GET/oauth/authorize—
GET/oauth/request, POST /oauth/consentS (the consent page)
GET/oauth/grantsS
DELETE/oauth/grants/{id}S

/platform/v1

MethodPathKey
GET/project, /tables, /logs, /stats?range=1h|24h|7d, /meS, T
POST/sqlS, T admin
GET/database?schema=, /connection, /backupsS, T
POST/backups, /backups/checkpoints, /backups/restore (chronos mode)S, T admin
GET/backups/dump (postgres mode)S, T admin
GET, POST/membersS, T admin
PATCH, DELETE/members/{id}S, T admin
POST/members/{id}/keyS, T admin
GET/audit?limit=&before=&actor=S, T

T is a team member's key (fbtm_): viewers read, operators also decide runs and jobs, admins do everything S does.

Errors

WhereShape
/rest/v1{"code", "message", "details", "hint"} (PostgREST's; Postgres SQLSTATE or PGRST...)
/auth/v1{"error", "message"}
/storage/v1{"statusCode", "error", "message"} (Supabase Storage's)
/agents/v1, /jobs/v1, /platform/v1{"code", "message", ...}; a conflict adds conflicts
/mcpJSON-RPC errors; a tool's failure is a result with isError: true
HTTPMeans
400the request is wrong; message says how
401no key or token, or it's invalid or expired
403the key is valid but may not do this (e.g. needs the service key)
404no such thing
409a conflict: a run's rows changed, a run isn't in the state the call needs
429too many sign-in attempts or emails
503the database or the engine isn't answering

Something wrong or missing? Edit this page on GitHub or open an issue.

HTTP reference · Forkbase