Skip to content

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: 4xx is permanent, 429 and 5xx are temporary. A 402 with an unknown PLAN_LIMIT_* code must be treated as a general quota limit.
  • details keys are not removed and their types do not change; new keys can be added.
  • The messages below are the default English texts. The message of 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.

Public error codes
CodeHTTP statusMessagedetails keys
VALIDATION400The request failed validation. Check the fields and try again.—
SESSION_INVALID401The session is invalid or has ended. Sign in again.—
EMAIL_NOT_VERIFIED403Verify your email address first.—
NOT_A_MEMBER403You are not a member of this organization.—
FORBIDDEN_ROLE403Your role does not allow this action.—
SESSION_REQUIRED403This endpoint does not accept API keys; it needs a signed-in session.—
INVALID_API_KEY401The API key is invalid, revoked or expired.—
PLAN_UPGRADE_REQUIRED402Your package does not include this feature.—
PLAN_LIMIT_MACHINES402You have reached your machine limit.—
PLAN_LIMIT_SNAPSHOTS402You have reached your snapshot limit.—
PLAN_CATALOG_MISSING503Package information is unavailable right now. Try again shortly.—
NAME_TAKEN409This name is already in use.—
ENCRYPTION_UNAVAILABLE503Environment variables cannot be encrypted right now. Try again shortly.—
SANDBOX_NOT_FOUND404Machine not found.—
SANDBOX_NOT_SNAPSHOTTABLE409A snapshot cannot be taken of this machine in its current state.—
SNAPSHOT_NOT_FOUND404Snapshot not found.—
SNAPSHOT_NOT_READY409The snapshot is not ready yet.—
TEMPLATE_NOT_FOUND404Template not found.—
RESERVED_ENV_KEY400This environment variable name is reserved.—
CONFLICTING_SOURCE400A template and a snapshot cannot be given together.—
INVALID_STATE409The machine is not in a state that allows this action.—
SANDBOX_HOST_BUSY429Too many commands are running on the machine’s host. Try again in a few seconds.retryAfterSeconds
SANDBOX_HOST_UNAVAILABLE503The machine’s host is not responding right now. Try again in a few seconds.retryAfterSeconds
HOST_CAPACITY_EXHAUSTED503There is no free capacity for this machine right now. Try again in a few seconds.retryAfterSeconds
MACHINE_IMAGE_UNAVAILABLE503The selected machine image is not available in this environment yet. Pick another image.—
SNAPSHOTS_UNAVAILABLE503Taking snapshots is turned off in this environment right now. Try again later.—
PLAN_LIMIT_SIZE402The selected machine size is not included in your package.allowed
ACCOUNT_SUSPENDED401, 403This account is suspended.—
ACCOUNT_INACTIVE401, 403This account is inactive.—
MACHINE_OWNER_SUSPENDED409The machine cannot be resumed because its owner is suspended.—
AUTO_PAUSE_REQUIRED403Your package does not allow turning auto-pause off.—
IDLE_TIMEOUT_OUT_OF_RANGE400The idle timeout is outside the allowed range.minmaxrequested
ACCOUNT_DELETION_PENDING401The account is scheduled for deletion and in its 30-day undo window.—
MACHINE_ABUSE_HOLD409The machine is on hold because of an open abuse review.—
RATE_LIMITED429Too many requests. Try again after Retry-After seconds.—
CLI_UPGRADE_REQUIRED426This CLI version is no longer supported. Update the CLI.minVersiondocs
UNAUTHENTICATED401Authentication required. Send a valid API key as a Bearer token in the Authorization header.—
ORGANIZATION_DELETION_PENDING409The organization is scheduled for deletion and is read-only until then.organizationIddeletionScheduledAt
INSUFFICIENT_SCOPE403This API key does not have the scope this endpoint needs. Create a key with the required scope.requiredScope
NEW_ACCOUNT_LIMIT403New accounts run with a stricter limit during their first days. Verify your email and wait, or pause a running machine.resourcelimituseduntil
TERMINAL_SESSION_NOT_FOUND404Terminal session not found or already ended.—
PLAN_LIMIT_TERMINALS402You reached the concurrent terminal session limit. Close an open session and try again.resourcelimitusedplanBasedpaymentsEnabledupgradeUrl
TERMINAL_LIMIT_MACHINE429This machine already has the maximum of 8 terminal sessions. Close one and try again.limit
PORT_NOT_FOUND404Preview port not found or already removed.—
PORT_ALREADY_EXPOSED409This port of the machine is already exposed. Use its existing preview URL.portportId
PORT_RESERVED400This port is reserved by the platform (52, 5900-5999, 6080, 8052). Choose another port.port
PLAN_LIMIT_PORTS402You reached the open preview port limit. Remove a port you no longer use and try again.resourcelimitusedplanBasedpaymentsEnabledupgradeUrl
FEATURE_NOT_AVAILABLE403This feature is not available yet.feature
EDGE_UNAVAILABLE503Terminals and preview ports are not available on this deployment right now. Try again later.feature
PREVIEW_BLOCKED403This preview port is blocked by the platform; no access link can be issued.—
ORG_REQUIRES_TWO_FACTOR403This organization requires two-factor authentication. The API key owner must turn it on for their account.organizationIdsetupPath
TOOLS_WITH_SNAPSHOT400Tools cannot be chosen for a machine created from a snapshot; the snapshot brings its own tools.—
TOOLS_DISK_BUDGET400The selected tools do not fit the machine tool disk. Choose fewer tools.limitMibrequestedMib
TOOL_NOT_FOUND404This tool is not on the machine.—
TOOL_NOT_RETRYABLE409This tool install cannot be retried: its attempts are used up or the tool is no longer in the catalogue.reasonattemptsmaxAttempts
CREDIT_INSUFFICIENT402Your credit balance is not enough for this operation. Try again once your balance is replenished.balanceKurusrequiredKurusreason
PLAN_LIMIT_SERVICES402You reached the service limit of this machine. Delete a service you no longer use and try again.resourcelimitusedplanBasedpaymentsEnabledupgradeUrl
SERVICE_NOT_FOUND404This machine has no service with this name.—
SERVICE_NAME_TAKEN409This machine already has a service with this name.name
SERVICES_UNSUPPORTED409This machine cannot run background services right now.reason
SERVICE_DISABLED409The service is stopped. Start it instead of restarting it.—
WORKSPACE_SIZE_NOT_ALLOWED402Your plan does not allow this disk size.sizeGibmaxSizeGibchoices
WORKSPACE_SHRINK_REFUSED409The persistent disk cannot be made smaller, only larger.sizeGibcurrentGib
WORKSPACE_GROW_UNAVAILABLE409The persistent disk cannot be made larger right now. Try again later.reason
DESKTOP_SIZE_TOO_SMALL400A desktop machine needs at least the medium size (2 GB of memory is not enough for the desktop). Choose medium or large.sizeminSize
COMMAND_BLOCKED400The 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_EXCEEDED402This 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_FOUND404This budget was not found.—
BUDGET_EXISTS409This target already has a budget; change the existing budget instead of adding a new one.budgetId
SCHEDULE_NOT_FOUND404This scheduled job was not found.—
SCHEDULE_LIMIT409An organization can have at most 5 scheduled jobs. Delete one before adding another.limit
SCHEDULE_NEW_ORGANIZATION403Creating 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_INVALID400The schedule expression is invalid. Use a 5-field cron (minute hour day month weekday); the shortest interval is 15 minutes.problemminIntervalMinutes
SCHEDULE_DISABLED409This scheduled job is disabled. It accepts triggers again once you enable it.disabledReason
TRIGGER_UNAUTHORIZED401The trigger could not be authenticated. Send a valid trigger token (Authorization: Bearer) or an X-Hadronbox-Signature signature.—
TRIGGER_PAYLOAD_TOO_LARGE413The trigger body can be at most 64 KB.—
AGENT_RUNS_DISABLED404Agent runs are turned off in this environment.—
AGENT_RUN_NOT_FOUND404This agent run was not found.—
REPO_URL_INVALID400The 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_FOUND400One of the selected secrets does not exist in this organization. Check the name on the Secrets page.names
AGENT_RUN_NOT_CANCELLABLE409This run has already ended; it cannot be cancelled.status
AGENT_RUN_LIMIT409At most 5 agent runs can be unfinished at the same time. Wait for one to finish or cancel one.limit
AGENT_RUN_GROUP_NOT_FOUND404This 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.

API error codes · hadronbox docs