Skip to content

Guides

Errors

The problem details format, every error code the API returns, and what to do about each one.

On this page

Errors are JSON in the application/problem+json format. Branch on code, which is stable; message is for people and may change.

json
{
  "type": "https://api.vmyard.example/problems/insufficient_scope",
  "title": "Forbidden",
  "status": 403,
  "code": "insufficient_scope",
  "message": "The API key preset does not allow this action.",
  "remediation": "Use an API key whose preset includes this action.",
  "correlation_id": "0d9f3b9e-5c1a-4b7e-9e0b-2f4c6a8d1e3f",
  "field_errors": {}
}
FieldMeaning
codeThe machine-readable error code.
statusThe HTTP status, repeated.
messageWhat went wrong, in words.
remediationWhat to do next.
correlation_idQuote it when you contact support. It is also sent as the x-correlation-id header.
field_errorsField name → problem, for invalid requests.
retry_after_secondsWhen a retry can succeed; also sent as Retry-After.

The SDKs turn problems into typed errors: BadRequestError (400), AuthenticationError (401), PaymentRequiredError (402), PermissionDeniedError (403), NotFoundError (404), ConflictError (409), PayloadTooLargeError (413), UnprocessableEntityError (422), RateLimitError (429), and ServerError (5xx), all subclasses of APIError with code, message, remediation, correlationId, fieldErrors, and retryAfterSeconds (snake_case in Python).

Authentication and access

StatusCodeMeaning and fix
401unauthenticatedNo valid session. Sign in again, or send an API key.
401invalid_api_keyThe key is malformed, unknown, expired, or revoked. Create or rotate a key.
403csrf_invalidA browser-session change is missing the x-csrf-token header, or it is wrong. Refresh and retry once.
403session_requiredThis route needs a signed-in browser session; API keys can't use it (key management, sign-out, device approval, sign-in methods).
403insufficient_scopeThe key's preset doesn't allow this route. See presets.
403organization_mismatchX-Organization-ID doesn't match the API key's organization. Omit it or send the right one.
403forbiddenYour role can't do this (for example a Viewer starting a machine, or a non-admin reading webhooks).
403organization_suspendedThe organization is suspended, so nothing can create, start, or reach into its machines. Reads, billing, keys, and settings still work. Contact support. See Suspended organizations.
403recent_auth_requiredLinking or removing a sign-in method needs a sign-in within the last 15 minutes. Sign in again.
404resource_not_foundNothing with that ID in this organization.

Requests

StatusCodeMeaning and fix
405method_not_allowedThat HTTP method isn't supported on this path.
409idempotency_conflictThe Idempotency-Key was already used with a different body. Retry the original body, or use a new key.
413body_too_largeThe request body is too large.
422invalid_requestA field is missing or invalid. field_errors names it. On GET /v1/machines this includes an unknown sort, order, state, or desired_state, a q over 128 characters, and a cursor made for another sort or order: start again from the first page.
429rate_limitedToo many attempts (sign-in, email codes, device codes, or more than 5 organizations created in 24 hours). Wait Retry-After seconds.
500internal_errorSomething failed on VMYard's side. Retry later; quote the correlation_id.
503creates_quiescedMachine creation is paused on this server. Try again later.

Machines, commands, and files

StatusCodeMeaning and fix
409machine_deletedThe machine was deleted; its settings can't change.
409machine_not_createdThe machine's create is still pending or didn't succeed, so only a delete is accepted.
409command_not_startedThe background command's start operation hasn't succeeded, so it can't be killed yet. Wait for it.
422timeout_exceeds_runtime_limittimeout_ms is above the maximum (600,000). Lower it, or use a background command.
404file_not_foundNo file at that path.
413file_too_largeThe file is over 32 MiB.
422file_not_textThe file isn't UTF-8. Read it with encoding=base64.
502guest_action_failedThe machine didn't complete a read. Check the operation and retry.
404path_not_foundThe folder to list or download doesn't exist in the machine. List its parent to see what does.
422not_a_directoryThe path to list or download is a file. Read it with GET /v1/machines/{id}/files instead.
422path_not_allowedThe path resolves, through a symlink, outside /work, /root, and /home. Browse the symlink's target by its own path.
422listing_too_largeThe listing is too large to return. Ask for a smaller depth or a deeper path.
413archive_too_largeThe folder is over 512 MiB. Download smaller folders, or copy it over SSH.
503files_unavailableThis server doesn't browse files live. Read and write files by path instead.
409machine_not_runningThe machine must be running for this action. Start it and wait until it is observed running.
409machine_not_stoppedThe machine must be stopped for this action. Stop it and wait until the stop succeeds.
410output_expiredThe command's stored output was removed after the retention period. Its exit code, flags, timing, and sizes remain. See Command history.

Web terminal

StatusCodeMeaning and fix
403origin_not_allowedThe terminal WebSocket came from a page other than the console's configured address. Open the console from that address.
403terminal_ticket_invalidThe terminal ticket is missing, expired (30 seconds), already used, or for another machine or session. Mint a new one.
409terminal_refusedThe machine (16) or its host (64) has too many terminals. Close some.
429terminal_limit_reachedYou or the organization have the maximum number of open terminals. Close one first.
503terminals_unavailableThis deployment has no runtime for terminals.
503runtime_unavailableThe machine's host can't be reached. Retry shortly.

Opening a terminal also needs a key preset above read_only (insufficient_scope), and a machine that is running (machine_not_running). See Web terminal.

Coding agents

StatusCodeMeaning and fix
403organization_suspendedThe organization is suspended, so agents can't run in its machines. Contact support.
404conversation_not_foundNo conversation with that ID on this machine. List them with GET /v1/machines/{id}/agents/conversations.
409agent_turn_runningThe conversation already has a running turn. Steer it, interrupt it, or wait for it to end.
409provider_mismatchA conversation keeps the agent it started with. Leave provider out, or start a new conversation.
409no_active_turnNothing is running to steer or interrupt. Send a prompt instead.
503agents_unavailableThis deployment or the machine's host can't run agents.

See Coding agents.

Desktop

StatusCodeMeaning and fix
403desktop_ticket_invalidThe desktop ticket is missing, expired (30 seconds), already used, or for another machine, session, or a terminal. Mint a new one.
429desktop_limit_reachedThe machine has 4 viewers, or you or the organization have the maximum number of open desktops. Close one first.
503desktop_unavailableThis deployment has no desktops, or the runtime refused: the machine's image has no desktop, or its host is at a limit.
503browser_unavailableThe runtime refused browser mode: the machine's image has no browser session, or its host predates browser mode. Open the full desktop instead.

Opening a desktop also needs a key preset above read_only (insufficient_scope), the console's address (origin_not_allowed), and a running machine (machine_not_running). See Desktop.

Machine metrics

StatusCodeMeaning and fix
409machine_not_runningLive metrics need a running or sleeping machine. Read the one-minute history instead.
503runtime_unavailableThe machine's host couldn't be reached for live samples. One-minute history still works; retry later.
503metrics_unavailableThis server has no runtime for live samples. Use the one-minute history. See Machine metrics.

Snapshots and templates

StatusCodeMeaning and fix
409snapshot_pendingThe push is still running, so it can't be deleted yet. Wait for it to settle.
409snapshot_not_readyThe template's push hasn't finished, or failed. Wait, or use another.
409snapshot_limit_reachedThe machine has 20 live API pushes. Delete one first.
409template_limit_reachedThe organization has 10 live templates. Delete one first.
409template_name_takenAnother live template in the organization has that name.
422unknown_templateA create named a template that doesn't exist in the organization.
404no_snapshotThe machine has no ready snapshot yet. Push one, or wait for the next automatic snapshot.

A fork needs a running machine and a snapshot or template a stopped one (machine_not_running, machine_not_stopped above). See Snapshots and tiers, Templates, and Fork and restore.

Organizations and alerts

StatusCodeMeaning and fix
403waitlistedVMYard is invite-only and this account isn't approved yet. Join the waitlist at the problem's waitlist_url; you get an email when you're in. Reads, stopping and deleting machines, billing, and settings still work.
409waitlist_decision_conflict(Operators) The waitlist entry can't move that way: only a pending entry can be rejected, and only an approved one revoked.
409already_memberThe invited person, or you, already belong to the organization.
409invitation_closedThe invitation was already accepted, revoked, or has expired. Ask for a new one.
403invitation_email_mismatchNone of your sign-in addresses is the invited one. Sign in with the invited address, or link it first.
409last_ownerThe organization's only owner can't be removed or demoted. Transfer ownership first.
409subscription_activeAn organization with a renewing plan can't be deleted. Cancel the plan and wait for its period to end.
503invitations_unavailableThis deployment can't send invitations: email or the console's address (ui_base_url) isn't configured.
409organization_name_takenYou already created an organization with that name (names are unique per creator, ignoring case).
400invalid_unsubscribe_tokenThe unsubscribe link is damaged, or the server's session secret was rotated since it was sent. Change the alert from the console's Alerts page instead. See Email alerts.

Ports and SSH

StatusCodeMeaning and fix
503ingress_unavailableThis deployment has no edge configured, so ports and SSH aren't available.
409port_limit_reachedThe machine already has 16 exposed ports. Close one first.
404port_not_exposedExpose the port before asking for a token.

Billing and limits

StatusCodeMeaning and fix
402billing_requiredThe spendable balance is at or below the minimum balance. Buy credits or a plan.
402spend_cap_reachedThis month's credit spend reached the spend cap. Raise or remove it, or wait for next month.
402card_verification_requiredThe deployment asks trials to verify a card before machines start. An Owner or Billing member starts a card check; the card is not charged.
403trial_machine_class_not_allowedTrials can use only small and default. Choose a smaller size, or buy credits or a plan.
409plan_not_pricedThe plan has no current price. Choose another from /v1/plans.
429limit_reachedA concurrency or start-rate limit. field_errors.limit says which; start windows send Retry-After.
409insufficient_credit(Operators) A claw-back is larger than the organization's credit balance.
409billing_customer_missingThe payment portal needs a completed purchase first.
409payment_method_missingAutomatic refill needs a default payment method. Add one in the payment portal.
409subscription_missingThere is no paid plan subscription to cancel or resume.
502payment_provider_errorThe payment provider failed. Retry later.
503billing_unavailableOnline payments aren't configured on this deployment.
400invalid_signature(Stripe events endpoint) The Stripe-Signature didn't verify.
400invalid_event(Stripe events endpoint) The event couldn't be read.

See Usage, billing, and limits.

Environments

StatusCodeMeaning and fix
409environment_name_takenAnother environment in the organization has that name.
409environment_limit_reachedThe organization already has 50 environments. Delete one first.
409environment_upgrade_conflictA machine's environment version changed while the upgrade was being made. Retry.
404variable_not_foundThe environment has no variable with that name.
422unknown_environmentA create named an environment that doesn't exist, or combined environment_id, environment, and no_env.
503environments_unavailableThis deployment has no environment encryption keys, so environments can't be changed or revealed.

See Environments.

Webhooks

StatusCodeMeaning and fix
409webhook_limit_reachedThe organization already has 10 endpoints. Delete one first.
503webhooks_unavailableThis deployment has no keys to encrypt signing secrets, so endpoints can't be created and secrets can't be rotated. Secrets are never stored in plaintext.

Sign-in

These come back from the email and linking routes:

StatusCodeMeaning and fix
400invalid_codeThe email code is wrong, expired, used, or replaced by a newer one. Request a new code.
404unsupported_providerThat sign-in method isn't configured.
409identity_in_useThat identity already belongs to another user.
409last_login_methodYou can't remove your only sign-in method. Link another first.
503email_unavailableThe email couldn't be sent. Retry later.
503oidc_unavailableThe sign-in provider couldn't be reached.
401oidc_failedThe provider's answer couldn't be verified. Start again.

Browser sign-in redirects to /sign-in?error=<code> with one of access_denied, identity_in_use, oidc_failed, oidc_unavailable, session_expired, or unsupported_provider. See Sign-in methods.

Device sign-in

POST /v1/auth/device/token uses the OAuth error shape, 400 {"error", "error_description"}, not problem details: authorization_pending, slow_down, access_denied, expired_token, invalid_grant, invalid_request, and unsupported_grant_type. See CLI device login.

Operation error codes

An operation that ends failed, uncertain, or correlation_miss has an error_code. These are the ones you are most likely to see:

error_codeMeaning
exec_nonzeroThe command exited with a non-zero code. exec_result has the output.
exec_timed_outThe command ran past timeout_ms.
exec_cancelledThe command was cancelled.
exec_no_exit_statusThe command ended without an exit status.
setup_prerequisite_failedThe create (or the environment apply it waits for) failed, so the setup script never ran.
environment_prepare_failed, environment_decrypt_failed, environment_keys_unavailableInstalling the machine's environment failed. The machine keeps running.
environment_prerequisite_failedThe create failed, so the environment was never installed.
invalid_transitionThe machine's observed state doesn't allow this action.
fleet_errorThe machine's host refused or failed the request, for example closing a port that isn't exposed, or an internet access change on a host without guest networking or with internet access turned off. Nothing changed.
restart_unsupportedThe machine's host can't restart its machines yet, so the restart never started. Nothing changed and the machine kept running; stop and start it instead.
network_mismatchThe host answered an internet access change with a different policy than the one requested, so VMYard did not report success. Read the machine's network before retrying.
runtime_timeout, runtime_transportThe host didn't answer in time or couldn't be reached.
correlation_missing, correlation_mismatch, correlation_duplicate, ingress_mismatchThe host's view of the machine didn't match the request, so VMYard did not report success.
snapshot_outcome_unknownA snapshot push or template save stayed uncertain through five attempts. The machine is unchanged; take a new snapshot.
snapshot_copy_discardedAn automatic snapshot lost its copy of the running machine before the upload finished. The machine is unchanged; the next interval takes another.
guest_inventory_unavailableVMYard couldn't yet confirm the machine's state after a guest action; the operation stays uncertain and is retried.

Treat any other code as a failure too, and quote the operation ID when you ask for help.