When you call POST /api/v1/containers, hzel provisions an isolated container and automatically starts it. The state field progresses from "provisioning" → "running" as the container boots; if the transition can't be confirmed within the polling window, it is set to "failed". See ContainerRecord for the full field reference.
POSThttps://api.hzel.org/api/v1/containers
Header
Required
Description
Authorization
Required
Bearer <token>. Accepted auth methods: PAT, OAuth app token, JWT.
Content-Type
Required
Must be application/json.
x-csrf-token
Session auth only
Session-bound CSRF token. Required only when authenticating via session cookie. Automatically skipped for Authorization: Bearer requests.
Each lifecycle action returns the updated ContainerRecord. If the requested state transition cannot be confirmed within the timeout, state is set to "failed". Attempting an action on a container you don't own returns 403 Forbidden.
The initial response has status: "queued". Poll GET /api/v1/commands/{id} to check progress, or connect to the job WebSocket endpoint to stream output in real time. See CommandExecutionRecord for the full field reference.
The dashboard provides a browser-based terminal connected to your container. You can also connect directly via the terminal WebSocket endpoint to build your own integrations. Each session is independent, and closing the connection ends the session cleanly.