API error codes
Last updated: 26 November 2026 · API v1 (beta)
An error response has the form { "statusCode", "error", "code", "message", "details" }; the full format is on the API page. Write your code against the code field: the code is stable, while the text of message may change. In a VALIDATION response, message is an array of strings. If the Authorization header is missing or carries a value that does not start with hb_live_, the response is 401 UNAUTHENTICATED; for a key that starts with hb_live_ but is not recognised, 401 INVALID_API_KEY is returned (Authentication).
Rules
- A published code is not renamed, deleted or reused with another meaning. A code that is no longer produced stays in the catalogue; its name is not used for another meaning.
- The HTTP status of a code does not change during v1. Codes that can come back with more than one status are listed with all of them in the table.
- A new code can always be added. For an unknown code, fall back to the HTTP status class:
4xxis permanent,429and5xxare temporary. A402with an unknownPLAN_LIMIT_*code must be treated as a general quota limit. detailskeys are not removed and their types do not change; new keys can be added.- The messages below are the default English texts. The
messageof a real response can differ (the API answers in the language of the request); do not depend on it.
Public codes
This list is the codes that the endpoints called with an API key can return; it is the same as the ErrorCode list in the contract file. Codes that belong to panel and administration operations are not included here.
| Code | HTTP status | Message | details keys |
|---|---|---|---|
VALIDATION | 400 | The request failed validation. Check the fields and try again. | — |
SESSION_INVALID | 401 | The session is invalid or has ended. Sign in again. | — |
EMAIL_NOT_VERIFIED | 403 | Verify your email address first. | — |
NOT_A_MEMBER | 403 | You are not a member of this organization. | — |
FORBIDDEN_ROLE | 403 | Your role does not allow this action. | — |
SESSION_REQUIRED | 403 | This endpoint does not accept API keys; it needs a signed-in session. | — |
INVALID_API_KEY | 401 | The API key is invalid, revoked or expired. | — |
PLAN_UPGRADE_REQUIRED | 402 | Your package does not include this feature. | — |
PLAN_LIMIT_MACHINES | 402 | You have reached your machine limit. | — |
PLAN_LIMIT_SNAPSHOTS | 402 | You have reached your snapshot limit. | — |
PLAN_CATALOG_MISSING | 503 | Package information is unavailable right now. Try again shortly. | — |
NAME_TAKEN | 409 | This name is already in use. | — |
ENCRYPTION_UNAVAILABLE | 503 | Environment variables cannot be encrypted right now. Try again shortly. | — |
SANDBOX_NOT_FOUND | 404 | Machine not found. | — |
SANDBOX_NOT_SNAPSHOTTABLE | 409 | A snapshot cannot be taken of this machine in its current state. | — |
SNAPSHOT_NOT_FOUND | 404 | Snapshot not found. | — |
SNAPSHOT_NOT_READY | 409 | The snapshot is not ready yet. | — |
TEMPLATE_NOT_FOUND | 404 | Template not found. | — |
RESERVED_ENV_KEY | 400 | This environment variable name is reserved. | — |
CONFLICTING_SOURCE | 400 | A template and a snapshot cannot be given together. | — |
INVALID_STATE | 409 | The machine is not in a state that allows this action. | — |
SANDBOX_HOST_BUSY | 429 | Too many commands are running on the machine’s host. Try again in a few seconds. | retryAfterSeconds |
SANDBOX_HOST_UNAVAILABLE | 503 | The machine’s host is not responding right now. Try again in a few seconds. | retryAfterSeconds |
HOST_CAPACITY_EXHAUSTED | 503 | There is no free capacity for this machine right now. Try again in a few seconds. | retryAfterSeconds |
MACHINE_IMAGE_UNAVAILABLE | 503 | The selected machine image is not available in this environment yet. Pick another image. | — |
SNAPSHOTS_UNAVAILABLE | 503 | Taking snapshots is turned off in this environment right now. Try again later. | — |
PLAN_LIMIT_SIZE | 402 | The selected machine size is not included in your package. | allowed |
ACCOUNT_SUSPENDED | 401, 403 | This account is suspended. | — |
ACCOUNT_INACTIVE | 401, 403 | This account is inactive. | — |
MACHINE_OWNER_SUSPENDED | 409 | The machine cannot be resumed because its owner is suspended. | — |
AUTO_PAUSE_REQUIRED | 403 | Your package does not allow turning auto-pause off. | — |
IDLE_TIMEOUT_OUT_OF_RANGE | 400 | The idle timeout is outside the allowed range. | minmaxrequested |
ACCOUNT_DELETION_PENDING | 401 | The account is scheduled for deletion and in its 30-day undo window. | — |
MACHINE_ABUSE_HOLD | 409 | The machine is on hold because of an open abuse review. | — |
RATE_LIMITED | 429 | Too many requests. Try again after Retry-After seconds. | — |
CLI_UPGRADE_REQUIRED | 426 | This CLI version is no longer supported. Update the CLI. | minVersiondocs |
UNAUTHENTICATED | 401 | Authentication required. Send a valid API key as a Bearer token in the Authorization header. | — |
ORGANIZATION_DELETION_PENDING | 409 | The organization is scheduled for deletion and is read-only until then. | organizationIddeletionScheduledAt |
INSUFFICIENT_SCOPE | 403 | This API key does not have the scope this endpoint needs. Create a key with the required scope. | requiredScope |
NEW_ACCOUNT_LIMIT | 403 | New accounts run with a stricter limit during their first days. Verify your email and wait, or pause a running machine. | resourcelimituseduntil |
TERMINAL_SESSION_NOT_FOUND | 404 | Terminal session not found or already ended. | — |
PLAN_LIMIT_TERMINALS | 402 | You reached the concurrent terminal session limit. Close an open session and try again. | resourcelimitusedplanBasedpaymentsEnabledupgradeUrl |
TERMINAL_LIMIT_MACHINE | 429 | This machine already has the maximum of 8 terminal sessions. Close one and try again. | limit |
PORT_NOT_FOUND | 404 | Preview port not found or already removed. | — |
PORT_ALREADY_EXPOSED | 409 | This port of the machine is already exposed. Use its existing preview URL. | portportId |
PORT_RESERVED | 400 | This port is reserved by the platform (52, 5900-5999, 6080, 8052). Choose another port. | port |
PLAN_LIMIT_PORTS | 402 | You reached the open preview port limit. Remove a port you no longer use and try again. | resourcelimitusedplanBasedpaymentsEnabledupgradeUrl |
FEATURE_NOT_AVAILABLE | 403 | This feature is not available yet. | feature |
EDGE_UNAVAILABLE | 503 | Terminals and preview ports are not available on this deployment right now. Try again later. | feature |
PREVIEW_BLOCKED | 403 | This preview port is blocked by the platform; no access link can be issued. | — |
ORG_REQUIRES_TWO_FACTOR | 403 | This organization requires two-factor authentication. The API key owner must turn it on for their account. | organizationIdsetupPath |
TOOLS_WITH_SNAPSHOT | 400 | Tools cannot be chosen for a machine created from a snapshot; the snapshot brings its own tools. | — |
TOOLS_DISK_BUDGET | 400 | The selected tools do not fit the machine tool disk. Choose fewer tools. | limitMibrequestedMib |
TOOL_NOT_FOUND | 404 | This tool is not on the machine. | — |
TOOL_NOT_RETRYABLE | 409 | This tool install cannot be retried: its attempts are used up or the tool is no longer in the catalogue. | reasonattemptsmaxAttempts |
CREDIT_INSUFFICIENT | 402 | Your credit balance is not enough for this operation. Try again once your balance is replenished. | balanceKurusrequiredKurusreason |
PLAN_LIMIT_SERVICES | 402 | You reached the service limit of this machine. Delete a service you no longer use and try again. | resourcelimitusedplanBasedpaymentsEnabledupgradeUrl |
SERVICE_NOT_FOUND | 404 | This machine has no service with this name. | — |
SERVICE_NAME_TAKEN | 409 | This machine already has a service with this name. | name |
SERVICES_UNSUPPORTED | 409 | This machine cannot run background services right now. | reason |
SERVICE_DISABLED | 409 | The service is stopped. Start it instead of restarting it. | — |
WORKSPACE_SIZE_NOT_ALLOWED | 402 | Your plan does not allow this disk size. | sizeGibmaxSizeGibchoices |
WORKSPACE_SHRINK_REFUSED | 409 | The persistent disk cannot be made smaller, only larger. | sizeGibcurrentGib |
WORKSPACE_GROW_UNAVAILABLE | 409 | The persistent disk cannot be made larger right now. Try again later. | reason |
DESKTOP_SIZE_TOO_SMALL | 400 | A desktop machine needs at least the medium size (2 GB of memory is not enough for the desktop). Choose medium or large. | sizeminSize |
COMMAND_BLOCKED | 400 | The security scan blocked the command: a part of it looks like a blocked network address or path (details.target). If a part that only looks like an address was blocked by mistake, run the command from `hb sh` or from a script file (`hb cp` + `hb exec <machine> -- sh script.sh`). | reasontargethint |
BUDGET_EXCEEDED | 402 | This month's spend budget is used up (action: pause). To start the machine, raise the budget, switch its action to "warn only" or remove it. | budgetIdscopesandboxIdlimitKurusspentKurus |
BUDGET_NOT_FOUND | 404 | This budget was not found. | — |
BUDGET_EXISTS | 409 | This target already has a budget; change the existing budget instead of adding a new one. | budgetId |
SCHEDULE_NOT_FOUND | 404 | This scheduled job was not found. | — |
SCHEDULE_LIMIT | 409 | An organization can have at most 5 scheduled jobs. Delete one before adding another. | limit |
SCHEDULE_NEW_ORGANIZATION | 403 | Creating scheduled jobs is closed during the first 7 days of a new organization. The limit prevents abuse; you can add jobs when the period ends. | until |
SCHEDULE_CRON_INVALID | 400 | The schedule expression is invalid. Use a 5-field cron (minute hour day month weekday); the shortest interval is 15 minutes. | problemminIntervalMinutes |
SCHEDULE_DISABLED | 409 | This scheduled job is disabled. It accepts triggers again once you enable it. | disabledReason |
TRIGGER_UNAUTHORIZED | 401 | The trigger could not be authenticated. Send a valid trigger token (Authorization: Bearer) or an X-Hadronbox-Signature signature. | — |
TRIGGER_PAYLOAD_TOO_LARGE | 413 | The trigger body can be at most 64 KB. | — |
AGENT_RUNS_DISABLED | 404 | Agent runs are turned off in this environment. | — |
AGENT_RUN_NOT_FOUND | 404 | This agent run was not found. | — |
REPO_URL_INVALID | 400 | The repository URL is not valid. Only public repositories on github.com, gitlab.com or bitbucket.org over https can be run; the URL must not contain a user name, password or query. | reason |
AGENT_RUN_SECRET_NOT_FOUND | 400 | One of the selected secrets does not exist in this organization. Check the name on the Secrets page. | names |
AGENT_RUN_NOT_CANCELLABLE | 409 | This run has already ended; it cannot be cancelled. | status |
AGENT_RUN_LIMIT | 409 | At most 5 agent runs can be unfinished at the same time. Wait for one to finish or cancel one. | limit |
AGENT_RUN_GROUP_NOT_FOUND | 404 | This comparison was not found. | — |
Rate limit errors
In a RATE_LIMITED (429) response, the Retry-After header gives the wait time in seconds. In a SANDBOX_HOST_BUSY (429) response, the same time is in details.retryAfterSeconds. A 429 response always comes back before anything is done: if you got a 429 when running a command (POST /v1/sandboxes/{id}/exec), the command has not started, and you can safely send the same request again after the wait. For all the headers, see the Rate limits section.