Skip to content

API endpoints

This page is generated from apps/api/src/worker.ts and the routers it mounts. Every endpoint is tenant-scoped (requires x-tenant-id) unless explicitly noted otherwise.

  • Base URLhttps://api.cloudscode.com in production; http://localhost:8787 in local dev.
  • Tenant headerx-tenant-id: <tenant_id> is required on all data-plane calls.
  • Error envelope{ "error": "<message>" } on any non-2xx response.
  • Auth — session cookie (browser) or Authorization: Bearer <api_token> (machine).
MethodPathDescription
GET/healthzLiveness probe. Returns { ok, env }.
GET/auth/google/startBegin Google OAuth login.
GET/auth/google/callbackOAuth callback (server-driven).
POST/auth/google/callbackOAuth callback (POST variant).
GET/auth/meCurrent session user.
POST/auth/logoutInvalidate session.
MethodPathDescription
*/api/v1/tenantsTenant CRUD, members, plan changes.
*/api/v1/onboardingFirst-run onboarding flow.
*/api/v1/adminAdmin console surface.
*/api/admin-debugAdmin debug tools (gated).
MethodPathDescription
*/instancesCreate, list, stop runtime instances.
*/internal/jobsInternal job dispatch (operator-only).
*/liveviewWebSocket live-view of running instances.
*/runsReplay finished runs.
*/public/runsPublic-facing replay viewer.
MethodPathDescription
*/api/v1/conversationsSend/receive messages, list history.
*/api/v1/llmDirect LLM proxy with BYOK key.
MethodPathDescription
POST/byokAdd a provider key for the tenant.
GET/byokList keys (metadata only).
DELETE/byok/:idRemove a key.
*/api/v1/byokSame surface, versioned alias.
MethodPathDescription
*/subscriptionsPlan and subscription management.
*/creditsCredit balance and ledger.
*/usageMetered usage rollups.
*/webhooks/stripeStripe webhook receiver (when wired).
*/referralReferral / partner credits.
MethodPathDescription
*/Skills router (root-mounted; multiple paths).
POST/skills/verifyVerify a skill manifest signature.
*/cron/skill-registryPeriodic skill-registry reconciliation.

Channel routers are root-mounted; each one owns its own webhook + send paths.

ProviderPath prefix (typical)
Telegram/channels/telegram
WhatsApp/channels/whatsapp
Slack/channels/slack
Discord/channels/discord
iMessage/channels/imessage
Matrix/channels/matrix
Signal/channels/signal
Teams/channels/teams
Nextcloud/channels/nextcloud
Nostr/channels/nostr
Zalo/channels/zalo
Feishu/channels/feishu
MethodPathDescription
*/teamsTeam & member management.
*/auditAppend-only audit log.
*/approvalsMulti-party approval workflows.
*/residencyData-residency policy.
*/enterpriseEnterprise SSO, SCIM, audit export.