Skip to content

Reference

Errors

Every error says what went wrong, what to do next, and links back here.

Error shape

Errors use the HTTP status below and one JSON body. details appears when there is more to say, such as the providers skipped by routing.

Response · 402
{
  "error": {
    "code": "insufficient_credits",
    "message": "Balance $0.00 is too low to start this sandbox",
    "hint": "Add credits at https://sandboxplease.com/settings/credits or use your own provider key (BYOK) at https://sandboxplease.com/settings/byok.",
    "docs_url": "https://sandboxplease.com/docs/errors#insufficient_credits",
    "request_id": "req_4f4efcbdeb03d8aa1c142c84"
  }
}

In the SDKs

Both SDKs throw a SandboxPleaseError subclass per kind of failure (InsufficientCreditsError, NoEligibleProviderError…) with code, hint, docsURL (docs_url in Python) and requestId. Uncaught, they print:

Terminal
InsufficientCreditsError: [insufficient_credits] Balance $0.00 is too low to start this sandbox
  hint: Add credits at https://sandboxplease.com/settings/credits or use your own provider key (BYOK) at https://sandboxplease.com/settings/byok.
  docs: https://sandboxplease.com/docs/errors#insufficient_credits
  request: req_4f4efcbdeb03d8aa1c142c84

They retry 408, 429 and 5xx twice with backoff before throwing, and exec(cmd, { check: true }) throws CommandError when the command exits non-zero.

All codes

400invalid_request

The request body or query does not match the endpoint.

Fix: Fix the field named in the message. Every field is listed at /docs/api-reference.

400unknown_sandbox

The sandbox slug names no provider in the catalog.

Fix: Use "auto", a provider id or "provider/size", e.g. "e2b/standard". All slugs: /sandboxes.

400unknown_size

The size is not small, standard, large, a size name of the provider, or { cpu, memory_gb }.

Fix: Use "small" (1 vCPU, 2 GB), "standard" (2 vCPU, 4 GB), "large" (8 vCPU, 16 GB), a size the provider lists at /sandboxes, or { cpu, memory_gb }.

400no_eligible_provider

No provider passes the require, only and ignore filters, has credentials, or is healthy right now.

Fix: Relax provider.require, provider.only or provider.ignore; details.skipped says why each was left out.

400template_not_allowed

On credits, a template must be one the provider publishes to everyone.

Fix: Add your own provider key at /settings/byok to run a private template, or pick a public one from /docs/provider-options.

400provider_option_conflict

A provider option sets a field SandboxPlease owns, like the size, the lifetime or the credentials.

Fix: Drop the field from provider_options and use the SandboxPlease parameter named in the message. Owned fields per provider: /docs/provider-options.

400unsupported

The sandbox's provider does not have this feature.

Fix: Create the sandbox with provider: { require: ["pause"] } (or "ports") so it lands on a provider that has it.

400payment_method_required

Auto top-up needs a saved card.

Fix: Buy credits once with a card at /settings/credits, then turn auto top-up on.

400invalid_invite

The invite code is unknown, expired, revoked or already used.

Fix: Check the code for a typo, or ask whoever sent it for a new one.

400authorization_pending

Nobody has approved this device login yet.

Fix: The person has not approved the code yet. Ask them to open verification_url and approve it, then poll again.

400expired_token

The device code expired after 15 minutes, or its key was already handed out.

Fix: Start again with POST /v1/auth/device and show the person the new code.

400unknown_provider

The provider id is not in the catalog.

Fix: Use a provider id from /sandboxes, e.g. "e2b".

400snapshot_unsupported

The sandbox's provider cannot snapshot a running sandbox through SandboxPlease.

Fix: Create the sandbox with provider: { require: ["snapshot"] } (or "fork" to keep memory and processes). Providers: /docs/snapshots.

400too_many_devices

The create asks for more than 3 mobile devices in one sandbox.

Fix: Spread the devices over several sandboxes, or contact support at support@sandboxplease.com.

400invalid_signature

The Stripe webhook signature does not match.

Fix: Only Stripe's payment notifications get this; your API calls never do.

400amount_mismatch

A Stripe payment does not match the top-up it claims.

Fix: Nothing to do on your side; the payment was not credited. Write to support@sandboxplease.com with the request_id.

401unauthorized

No API key was sent.

Fix: Send "Authorization: Bearer $SANDBOXPLEASE_API_KEY". The SDKs read SANDBOXPLEASE_API_KEY; create a key at /settings/keys.

401invalid_key

The API key is unknown, revoked or expired.

Fix: Check SANDBOXPLEASE_API_KEY for a typo, or create a new key at /settings/keys.

401invalid_session

The dashboard session expired.

Fix: Sign in again at /sign-in.

402insufficient_credits

The balance cannot cover 10 minutes of the cheapest matching sandbox.

Fix: Add credits at /settings/credits or use your own provider key (BYOK) at /settings/byok.

402key_limit_reached

This key used up its credit limit for the period, or its daily cap.

Fix: Raise or remove the key's limit at /settings/keys, or wait for it to reset.

403policy_violation

The key's policy does not allow this call; details.rule names the rule.

Fix: Change the request to fit the rule, or edit the key's policy at /settings/keys. Every rule: /docs/key-policies.

403key_disabled

The key's kill switch is on: its calls are refused and its sandboxes were stopped.

Fix: Turn the key back on at /settings/keys, or use another key.

403invite_required

Sign-ups need an invite code right now and this account has not redeemed one.

Fix: Enter your invite code at /activity, or ask for access at /request-access.

403mfa_required

The session has not passed two-factor authentication, which this account or page requires.

Fix: Enter your authenticator code at /two-factor, or turn two-factor on at /settings/account.

403account_suspended

The account is suspended: its sandboxes were stopped and its keys refused.

Fix: Reply to the suspension email or write to support@sandboxplease.com with the request_id to get it reviewed.

403forbidden

Your role in this workspace does not allow this action.

Fix: Ask the workspace's owner or an admin for a role that does, at /settings/workspace.

403email_unverified

The account's email is not verified, so it cannot buy credits yet.

Fix: Click the link in the welcome email, or send a new one from /settings/credits.

403new_account_limit

Accounts younger than 7 days run at most 3 sandboxes, 1 hour each, and top up at most $50 a day.

Fix: Run at most 3 sandboxes at once with a timeout of 3600 seconds or less; these limits lift 7 days after sign-up, or sooner once support verifies the account (write to support@sandboxplease.com).

403access_denied

The person denied this device login.

Fix: Ask the person whether to try again before starting a new login with POST /v1/auth/device.

404not_found

Nothing with this id belongs to your account.

Fix: Check the id. GET /v1/sandboxes lists the sandboxes that are still running or paused.

404snapshot_not_found

No snapshot with this id belongs to your account, or it was deleted.

Fix: Check the id. GET /v1/snapshots lists the snapshots you can create sandboxes from.

409sandbox_ended

The sandbox was killed, expired, ran out of credits or its provider lost it.

Fix: Create a new sandbox. Pass a longer timeout (seconds, up to 86400) at create to keep one alive longer.

409sandbox_paused

The sandbox is paused: exec, files and ports wait until it is resumed.

Fix: Resume it with POST /v1/sandboxes/:id/resume, then retry.

409device_booting

The mobile device is still booting: its screen and input answer once it is ready.

Fix: Retry in a second or two; a device is usually ready within seconds of its sandbox.

409feature_not_live

The feature is not open yet; your request for access was recorded.

Fix: We will email you when it opens. Tell us what you will build at /mobile#request-access.

409byok_key_missing

The sandbox runs on your own provider key, and that key was removed.

Fix: Add the key back at /settings/byok to reach the sandbox, or create a new sandbox.

410snapshot_expired

The snapshot reached its expiry and was deleted.

Fix: Take a new one with POST /v1/sandboxes/:id/snapshot. Snapshots last 7 days.

429policy_limit_reached

The key reached a concurrency or rate cap of its policy; details.rule names the cap.

Fix: Wait for a running sandbox to end or for the window to pass, or raise the cap at /settings/keys.

429slow_down

The device code was polled faster than its interval.

Fix: Wait the seconds in details.interval between polls.

429too_many_snapshots

50 snapshots are already kept on the account.

Fix: Delete the ones you are done with (DELETE /v1/snapshots/:id); GET /v1/snapshots lists them.

429device_limit_reached

The workspace already has 10 mobile devices attached across its running sandboxes, or every device SandboxPlease runs at once is in use (details.scope says which).

Fix: Workspace: pause or kill a sandbox with devices to free them, or contact support at support@sandboxplease.com. Platform: retry in a few minutes.

429too_many_sandboxes

20 sandboxes are already running or paused on the account.

Fix: Kill the ones you are done with (DELETE /v1/sandboxes/:id); GET /v1/sandboxes lists them.

429too_many_workspaces

You already created as many team workspaces as one person can: 10, or 1 in the first 7 days.

Fix: Reuse or delete a workspace you no longer need, at /settings/workspace.

429rate_limited

Too many requests from this key or IP.

Fix: Wait the seconds in the Retry-After header, then retry. Spread bursts over time; each key gets 20 requests a second.

429checkout_blocked

Too many declined payments or checkouts in a short time.

Fix: Wait a day before trying another card, or write to support@sandboxplease.com with the request_id.

500internal

Something broke on our side.

Fix: Retry. If it keeps failing, write to support@sandboxplease.com with the request_id.

502provider_error

The provider failed the call, or every candidate failed at create.

Fix: At create, let SandboxPlease fall back: drop provider.allow_fallbacks: false or list more providers in provider.order; details.attempts has each provider's error. On a running sandbox, retry the call.

502provider_unavailable

The sandbox's provider is no longer served.

Fix: Create a new sandbox; it will land on a provider that is up.

503billing_unavailable

Payments are unavailable right now.

Fix: No card was charged. Retry in a few minutes; if it keeps failing, write to support@sandboxplease.com with the request_id.