> _**HTTP skill (basic)** · ~22,121 tokens · hoody-sdk v1.0.0-beta.17_ # HTTP mode — drive Hoody with curl Drive Hoody with `curl` or any HTTP client. No SDK or CLI. ## What is Hoody Hoody is a remote-first computing platform: every workflow — coding, browsing, scheduling, agent runtimes, file storage, GUI desktops, HTTP services, scripts, databases, displays — runs in account-owned cloud containers reachable by URL, with zero local setup. **Thesis: everything remote, no friction.** A container is a **full Linux box (systemd + root, just like a VM — not a Docker-style minimal sandbox)** you can spin up, fill, and use from anywhere; ports are auto-published on `https://...containers.hoody.com`; GUIs render to browser tabs; one-shot scripts mount as HTTP endpoints; databases, terminals, file watchers, full XFCE/MATE desktops, and SSH are first-class kits. Standard distro tooling works as expected — `apt install nginx && systemctl enable --now nginx`, `journalctl`, `crontab`, etc. The CLI / SDK / HTTP surfaces are three skins on the same control + container plane — drive whichever fits your runtime. **Prefer a GUI?** The **Hoody Agent** browser GUI runs at `https://{P}-{C}-agent-1.{N}.containers.hoody.com` — file browser, code editor, agent sessions, PR review, MCP, memory, image-gen, web search, all in a browser tab. It's the human-facing surface over the same `agent` kit these skills drive programmatically (same `-agent-1` host — the HTTP API lives under its `/api/v1/agent/` path). **Every kit URL is also iframable** (`code`, `files`, `terminal`, `display`, `desktop`, `notes`, `agent`, …) — you can compose a full HTML "operating system" out of kit iframes with no native code. Use whichever surface fits the moment. **Need a custom API, script-as-service, or multi-step workflow?** Default to `exec`. Drop a `.ts` / `.js` (or shell-out via Bun) into the scripts dir and it auto-mounts as an HTTP endpoint — no framework, no deploy, schema-validated, logged, metric-instrumented, alias-able to a public hostname. Each script is a micro-service, kept warm by the kit; **multi-step workflows** (call agent A → check with agent B → trigger action C) are just one script orchestrating the steps. (Not a sandbox for untrusted code — see `exec` namespace.) **Need a GET-only URL for something that's actually a POST?** Use `curl` — `GET /api/v1/curl/request?url=…&method=POST` on the curl kit URL turns any REST call into a single GET-able link (the GET surface takes 21 query params (`body` and `body_base64` are aliases of `data` and `data_base64`) — including `data`, `json`, `data_base64` and a repeatable `header`, so bodies AND headers DO work as query params, and supplying a body auto-upgrades the upstream call GET→POST; URL-encoded `form` fields, a headers map, cookies, Basic auth and the connection limits stay `POST /api/v1/curl/request`-only, and neither form sends multipart uploads). See `curl` namespace. **Stuck, or unsure how to do something?** Ask Hoody's public docs assistant — an unauthenticated MCP endpoint at `https://chatbot.hoody.com/mcp` (one tool, `search_hoody_docs`; or the `POST /api/chat` SSE fallback) answers any "how do I…" with cited doc URLs. Use it for discovery when you're not sure which namespace fits. ## When to choose HTTP Use when there's no SDK for your language, you need copy-pasteable recipes (runbooks, CI, webhooks), gluing into an HTTP toolchain, or debugging the wire. Skip for SDK ergonomics (`SKILL-SDK.md`) or `hoody` CLI (`SKILL-CLI.md`). You handle pagination, retries, errors. ## Endpoint surface | Surface | Hostname | Auth | |---|---|---| | Control plane | `https://api.hoody.com` | `Authorization: Bearer ` | | Container kit | `https://{projectId}-{containerId}-{kit_slug}-{serviceIndex}.{server}.containers.hoody.com` | URL is the credential | See § Proxy URLs and § Auth model below. ## Reference table sigils Per-namespace `## Reference` tables compress params with sigils: - `{x}` — path param (already in URL). - `?x` / `?x*` — query param (`*` = required). - `body` / `body*` — JSON body (`*` = required); `body*:foo_CreateInput` names the schema. - `H:x` / `H:x*` — header param. - Type column dropped — inferable from name (`id` string, `limit` int, `enabled` bool). Body schema refs are kept verbatim. Bare `body*` rows are spelled out under the same service in a **Body shapes** block: `{ field*: type=default, … }` one-liners (`*` = required, `=v` = default, `|` = alternatives) plus field-semantics bullets. Named refs (`body*:foo_CreateInput`) resolve in the namespace's **Body schemas** appendix. ## Auth - Control plane: header starts with `Bearer ` (one space, capital B); an `hdy_` auth token may also be sent bare. Kit URL: none, on every kit including `bot`'s management routes — gate kit URLs with proxy permissions. - Sign-in: browser sign-in is the default — `POST /api/v1/auth/device/code`, give the user the link and code, poll `POST /api/v1/auth/device/token` (§ Login). Never collect a password in chat. - Password login (fallback the user chooses): `POST /api/v1/users/auth/login` with `{ username, password }` **or** `{ email, password }` — field **`token`**. `password` plus one identifier (`username` or `email`) is required; `username` must match `^[a-zA-Z0-9_-]+$` (3–50 chars), so an email address authenticates **only** through the `email` field — sending one as `username` returns `422 Validation failed`. Every Hoody account is created with an email, so `email` is the common path. - Long-lived: `POST /api/v1/auth/tokens`, only for unattended automation the user asked for. ## Response envelope Control plane (`api.hoody.com`) success: `{ "statusCode": 200, "message": "...", "data": { ...payload } }`. Paginated: shape varies per route. The page-based shape is `data.{: [...], pagination: { total, page, limit, totalPages }}` (e.g. projects, containers); iterate `?page=` until `totalPages`. A few routes (e.g. events) use `{ total, limit, offset, has_more }` instead — check the response type for the call you're making. `GET /api/v1/auth/available-regions` returns `r.data.regions` (single envelope wrap, like every other API response — earlier docs incorrectly called it doubly-wrapped). Errors: `{ "statusCode": 401, "error": "...", "message": "..." }`. Codes: § Reference appendix. Kit URLs use per-kit shapes: many answer bare JSON with no `data` wrapper (e.g. watch `POST /api/v1/watch/watchers` returns `{id,...}` at the root; tunnel `GET /api/v1/tunnel/tunnels` returns `{sessions,...}`). Check the kit's response schema before writing a `jq` path. ## Streaming - **SSE** — `Accept: text/event-stream`; use `curl --no-buffer`. Resume mechanism is per-endpoint: watcher uses `?since_id=` / `?since_timestamp=`; proxy-logs `/_logs/stream` honours `Last-Event-ID:` (on `event: reset` discard the saved id and reconnect fresh); `/api/v1/exec/logs/stream?file=` has no resume cursor (re-reads the file). Endpoints: watcher events, `/api/v1/exec/logs/stream?file=`, proxy-logs `/_logs/stream`. (Notifications `GET /api/v1/notifications/stream` serves both: a WebSocket upgrade, or SSE on a plain GET with `?displays=all` or a display list; the SDK's `notifications.connect` uses WebSocket.) - **WebSocket** — watcher `events/ws`, tunnel data planes. Use `websocat`/`wscat`. ## Index of common ops § Core ops cheat-sheet covers: auth (signup/login/2FA/refresh/long-lived); projects + containers (list/create/lifecycle, kit-URL resolution); one-off shell and terminal sessions; files up/down/append; display screenshot and click; sqlite db and KV; watch SSE; tunnels; snapshot/restore; vault; wallet; proxy alias. Per-namespace recipes in `SKILL-HTTP/.md`: `agent api bot browser code cron curl daemon display egress exec files notes notifications pipe proxyLogs run sqlite terminal tunnel watch`. --- # Proxy URLs — capability-based per-container routing ## What it is `https://{projectId}-{containerId}-{kit_slug}-{n}.{node}.containers.hoody.com` - Proxy terminates TLS on `*.containers.hoody.com`, parses the hostname segments (project, container, kit, index) and routes to that kit. - Hoody API: global `https://api.hoody.com`. - Aliases (`my-api.{N}.containers.hoody.com`) are shortcuts; canonical URL is authoritative. ## Components | Segment | Meaning | |---|---| | `projectId` | 24-char hex. | | `containerId` | 24-char hex. Bearer credential. | | `kit_slug` | Kit id (see Kit slug table); some namespaces differ from their slug (e.g. `notifications` → `n`, `proxyLogs` → `logs`). | | `n` | 1-based instance index; single-instance kits use `1`. | | `node` | Bare server hostname (use the `server_name` field from container responses). | | Suffix | `.containers.hoody.com` | ## Every kit URL is iframable — compose a UI out of kits Each kit URL serves a regular HTML/JS page (or HTTP/WS API) — drop it into an ` ``` You can compose a **full HTML "operating system" out of Hoody kit iframes** — no native code, no installer, just URLs. Hoody itself does this: `os.hoody.com` is essentially a kit-iframe shell. ### Collaborative embeds — work from inside the chat Most modern collaboration tools accept iframes (or unfurl URLs into rich previews that render iframes), so a Hoody kit URL drops straight into: | Platform | Embed surface | Outcome | |---|---|---| | **Slack** | Canvas embed, custom unfurls, Slack apps | Drop a `terminal-1` URL into a channel canvas → live shell that everyone in the channel can see + drive. Pair with a Cline `?extension=…` `code-1` URL for "agent-in-the-channel" support. | | **Notion** | `/embed` block (paste URL → Embed) | Wiki page that contains the live editor / agent / file browser as part of the doc. | | **ClickUp** | Embed view in any list / dashboard | Project board with the relevant repo's `files-1` and `code-1` panes alongside tickets. | | **Matrix / Element** | `m.html` event, custom widgets | Same as Slack — live terminal / agent in a room. | | **Microsoft Teams / Zoom** | Apps that accept URL iframes | Shared workbench during calls. | | **Discord** | Activity URLs, link previews | Drop the URL; viewers click into the live surface. | | **Confluence / Jira** | "Smart Link" / iframe macro | Runbook page with the live tool baked in. | | **Plain HTML** | `