# cmux platform API > The private cmux cloud platform: derived cloud environments, the agent mesh, machines, inference, > chat shares and more, as one HTTP API on Cloudflare Workers. Start with docs/agents.md (base URLs, > auth, errors, a worked example), then read the operation you need in openapi.json. Most surfaces are on in the development deployment only (https://cmux-platform-development.debussy.workers.dev); staging and production answer `/v1/health`. A surface that is off answers 404 `*.not_found` on every path. Errors are JSON `{_tag, message}`, and most add a stable dotted `code` to branch on; an empty 400 means the request did not match the schema. ## Start here - [Agent guide](docs/agents.md): base URLs, which token each route takes, the error format, conventions, a worked example - [OpenAPI spec](openapi.json): every public operation, schema, example and error code (generated from src/api/) ## Surfaces (OpenAPI tags) - Slack: `/v1/slack`, install the Chief bridge, read/disconnect your workspaces, and receive signed Slack events; development only ([setup](docs/slack-bridge.md)) - System: `GET /v1/health`, liveness and the deployed commit; no auth - Environments: `/v1/environments`, the environment a cloud chat runs in, derived from a repo and ref ([design](docs/github-connector-clone.md)) - Mesh: `/v1/mesh`, every acpmux daemon of a team reaches every other: sessions, messages, inbox - Mesh node registry: `/v1/mesh/nodes`, WireGuard node registration and peer maps for machine credentials - Mesh node ACL: `/v1/mesh/nodes/acl`, node-to-node denies set by team members; `/v1/mesh/nodes/{machineId}/attach|detach` put a joined device in or out of the peer map - Inference: `/v1/inference`, an OpenAI-compatible model router ([design](docs/inference-router.md)) - Chief: `/v1/chief`, the signed-in person's stable Chief address, scoped wire ticket and main-conversation messages; see docs/chief-web.md - Chat shares: `/v1/chat-shares`, hosted rooms for sharing an agent chat with guests - Cloud triggers: `/v1/triggers`, register owner-scoped GitHub filters and read the exact Cloud chat delivery and reply - Cloud trigger ingress: `/v1/triggers/{id}/github` accepts signed GitHub bytes; `/v1/triggers/{id}/authorize` verifies scoped guest trigger operations - Vault env: `/v1/vault/env`, a person saves, lists and deletes their own env entries (API keys, provider credentials, variables; never a subscription login); development only - Vault grants: `/v1/vault/grants`, a person lists, writes and revokes which of their machines read which entries, until when; development only - Vault reads: `/v1/vault/reads`, a person lists the latest machine reads of their vault (entry names, never values) and the alerts they raised; development only - Vault tailnet node: `/v1/vault/tailnet-node`, a person saves, reads and deletes the identity (tailscaled state) of their one cmux node on their own tailnet, and `/holder` names the one machine that may run it (claim, release); never served to a machine; development only - Vault (machine): `/v1/vault/machine`, a machine its owner consented to (a granted joined machine, or their own Cloud machine) reads their env entries; development only - Dependency caches: `/v1/dep-cache`, a Cloud machine restores its installed dependencies (node_modules, Cargo's registry, the npm, pnpm and uv caches) by lockfile key, and uploads them after a cold install, per person or team; development only - Machines: `/v1/machines`, a team's machines and snapshots under the team machine policy ([design](docs/team-machines.md)); `/v1/cloud/machines/{machine}/previews/refresh` discovers private new Cloud port previews ([staging setup](docs/cloud-previews.md)) - Runnable links: `/v1/runnable-links`, a team machine shared as a link its teammates fork into machines of their own (staging only, RUNNABLE_LINKS) - Apps: `/v1/cloud/apps`, a stable private hostname over a Cloud machine's port, with versions, promote, rollback and grants ([design](docs/cloud-apps.md)) - Enterprises: `/v1/cloud/enterprises`, a named set of teams (the parent-of-teams grant) that an app can be shared with ([design](docs/cloud-apps.md#org-and-enterprise-audiences)) - Cloud environments: `/v1/cloud-environments`, what a Cloud chat's machine is set up with (setup script, variables, secrets, network access), per person or team, with a Default in each - Workspace machines: `/v1/workspaces/{workspace}/machine`, a workspace's own small machine from a warm snapshot, one workspace per machine - defaultMachines: `POST /v1/machines/default`, the account owner's private default Cloud machine, with a server-chosen workspace and key, normal caps and budget admission - Cloud turn capabilities: `/v1/workspaces/{workspace}/machine/turns/{turn}/capability`, owner-issued preparation and execution authority for one turn and generation - Cloud turn execution: `/v1/turn-execution/claim` and `/finish`, validate preparation or claim and finish execution with a scoped turn capability ([contract](docs/team-machines.md#10-whole-machine-turn-checkpoints)) - Machine automatic sizing: `/v1/machines/{id}/autosize`, a machine grows (snapshot first) when starved and shrinks after a long idle, on its own; this reads its decisions and why ([design](docs/machine-autosize.md)) - Cloud fork runs: `/v1/workspaces/{workspace}/fork-runs`, one durable source snapshot and N copy-on-write machines across harnesses, with one selected sync-back child - Machine placement: `/v1/machines/pick` (old name `/v1/machines/place` still works), Auto placement of a new machine ([design](docs/machine-placement.md)) - machineReservations: `/v1/machines/reservations`, reserve a warm Cloud machine while composing, bind it when Send starts, or release it when abandoned - Session moves: `/v1/sessions/{id}/move-intents` and `/v1/sessions/{id}/moves`, a chat's move intents (claimed by a daemon) and append-only move receipts, with `/v1/sessions/moves/count` for billing (RFD 0138) - Registered machines: `/v1/machines/joined/heartbeat` (old path `/v1/machines/registered/heartbeat` still works), capacity reports from cmux-owned hosts - Machine join credentials: `/v1/machines/join-tokens`, `/v1/machines/credentials`, onboarding a machine ([recovery](docs/machine-join-recovery.md)) - Machine join redemption: `/v1/machines/join-tokens/redeem`, a machine's single-use join - Connectors: `/v1/connectors`, repository connectors (GitHub, GitLab) - Usage sharing: `/v1/usage`, opt-in sharing of cmux usage records (counts and timings, never content) with the person's own team: upload, delete, a summary per person (team admins: per teammate), and a spend audit of agent turns (tokens, cache hit rate, agent and machine time per person, repository, model, harness, machine or day, JSON or CSV; development only); sharing team members only - Automation ingress: `/v1/automations/{id}/github` and `/v1/automations/{id}/webhook`, where GitHub and signed webhooks deliver events to an automation; the signature covers the raw bytes and no person bearer is used - Automations: `/v1/automations`, a person's and their team's conditions on GitHub events, signed webhooks or a schedule that start an AutoCloud agent, with each one's run log and a webhook secret shown once (rotated with a 24-hour overlap) - Team usage: `/v1/team-usage`, a team's measured usage (Cloud machine time and model-router tokens, quantities only) per member, project, machine class, model, day or unit, with shared sessions and turns; owner, admin and billing roles read the whole team, other members their own; where the usage store is on - Team import: `/v1/teams/{team}/import` and `/v1/teams/{team}/scim/token`, moving a team to AutoCloud: a team admin imports a roster (JSON or CSV of email, role, groups; at most 10000 rows) as a dry-run plan per person (the default), applies it as a job (idempotent by email, in batches, invitations bounded per day and confirmed with confirmInvites) read back at `/v1/teams/{team}/import/{job}` and undone by DELETE (only what that job made; roles it changed go back), and makes the team's SCIM 2.0 bearer for an identity provider at `/scim/v2` (Users, Groups; a deactivated person leaves the team and their machines are paused, nothing deleted) - Team SSO: `POST /v1/teams/{team}/sso/join`, a person who signed in through their team's SSO joins it as a member, on a domain the team owns or a pending import row; a person removed by SCIM, import undo or deactivation is refused until a fresh sign-in - Install counts: `/v1/install-counts`, opt-in anonymous counts of the packages agents install (`manager:name`), so the Cloud image bake pre-bakes the common ones: a person sets their choice, their machines (or a joined machine's `cmm_` credential) upload counts only while it is on, and sharing team members read a summary that shows a package only once 3 installs reported it - Extension registry: `/v1/extensions`, `/v1/setups`, `/v1/authors`, plugins, themes, snippets and setups: `status: "reviewed"` when the public registry repository manaflow-ai/cmux-extensions lists them, `status: "community"` for a public GitHub repository with its kind's topic and a valid marker file (`?status=reviewed` for the reviewed set only), indexed from their git repositories (releases, README, stars, downloads), for cmux.com pages and the in-app community browser; public, no auth - Extension linking: `POST /v1/extensions/link` (`DELETE` to unlink), an owner lists their own public GitHub repository with a manifest or marker file as a community listing, no pull request; ownership is the cmux bearer's GitHub connection (send `team`) or a GitHub Actions OIDC token minted in the repository with audience `https://cmux.com`; read at once, then kept up to date - Me: `/v1/me/github`, which GitHub account the caller's cmux account has connected (login, never a token) - Artifacts: `/v1/artifacts`, versioned per-user artifacts and synced memory (off everywhere for now) - Sync: `/v1/sync`, the per-user content-addressed blob store behind `cmux link sync push`: upload once, read back by token or one-hour `csg_` grant; a person's own Cloud machine's token writes its blobs and roots under `m..`; development only - Hosted MCP (development only): `POST /mcp`, a Streamable HTTP MCP endpoint for GitHub reads and approved issue comments; `create_issue_comment` requires a verified `mcp:write` bearer ([design](docs/hosted-mcp.md)) - MCP servers: `/v1/mcp-servers` (development only), a person's or a team's own remote MCP servers (Streamable HTTP, bearer or no auth), probed and pinned once, then served by `POST /mcp` as `__` with the credential added at the edge ([design](docs/mcp-servers.md)) - Integrations hub: `/v1/hub` (development only), a person links an account once (Stripe by restricted key) and their agents call typed actions on it (`stripe.charges.list`, `stripe.charge.get`, `stripe.refund.create`) under rules: allow, ask a person, or block, with conditions on the arguments and spend limits; approvals, a stop switch, and a hash-chained audit log ([design](docs/hub.md)) - Webhooks: `/v1/webhooks`, subscribe an https URL to events (`machine.started`, `machine.stopped`, `session.finished`, `run.*`, `pr.opened`); each delivery is a signed JSON POST (`X-Cmux-Signature-256` over `.`), retried with backoff for 24 hours, with a delivery log, redelivery and a ping ([guide](docs/webhooks.md)) - Authentication: `/v1/auth/challenge`, `/v1/auth/token`, install challenge and access-token minting - JWKS: `/.well-known/jwks.json`, public keys for verifying install access tokens - Home attachments: `/v1/home/attachments`, conversation-scoped intent, upload, commit and signed download routes (off until the ConversationDO and storage ports are bound) - Home attachment downloads: `/v1/home/attachments/{conversation}/{file}`, short-lived signed byte downloads for Home attachments - Native network: `GET /v1/host/network/target`, server-selected Native routing metadata for an authenticated client install; development only - Cloud daemon approvals: `POST /v1/cloud/machines/{machine}/acpmux/keyed-start` and `/person-holds`, restart a Cloud machine's agent daemon with approvals and check who holds it; not served yet ([port](docs/port-cloud-worker.md)) - Cloud machine ssh route: `POST /v1/cloud/machines/{machine}/ssh-endpoint`, a short-lived ssh route to one Cloud machine, for file copy over scp - Cloud machine shares: `POST`, `GET /v1/cloud/machines/{machine}/shares` and `DELETE /v1/cloud/machines/{machine}/shares/{share}`, the machine's creator shares it with a teammate for some or all of its acpmux sessions, lists the live shares and revokes one - Cloud start traces: `GET /v1/cloud/start-traces`, `GET /v1/cloud/start-traces/{trace}` and `POST /v1/cloud/start-traces/{trace}/spans`, the start timing waterfall: a team's recent Cloud starts hop by hop with each hop's p50/p95, one start's spans, and the spans the app, CLI or machine measured - API tokens: `/v1/tokens`, personal and team `cmux_pat_` tokens scoped to machines, chats and usage (shown once, revocable, last use and recent uses), and GitHub Actions OIDC trust (`/v1/tokens/github`, `/v1/tokens/github/exchange`) so CI needs no stored secret; a token is a bearer on the machine routes - Agent forum: `/v1/forum`, a team's forum where its agents and people ask and answer (spaces, threads, comments, search, stats); off unless FORUM_ENABLED and the team is in FORUM_TEAMS; the page is `/forum/` ## Optional - [README](README.md): how the service is built, tested and deployed - [Credential boundaries](docs/credential-boundary-comparison.md) - [VM-hours meter](docs/vm-hours-meter.md)