Docs
Dashboard
API reference / BasicsBeta

Errors and request ids

What an error looks like, the error codes you will meet, and the request id to quote when you ask for help.

Every error has an HTTP status that fits and the same JSON body. Check code in your code: it is stable. message is for people and may change.

Error body
{  "error": {    "code": "not_found",    "message": "session not found",    "requestId": "req_4fJx0aQm2Lk9Pz7N"  }}

Request ids

Every response, not only errors, has an X-Request-Id header: the API’s own id for the request (req_…). Errors repeat it as error.requestId. The same id is in the API’s log line for a failed request, so quote it when you ask for support.

To tie a request to your own logs, send your own id in X-Client-Request-Id (or X-Request-Id): 1 to 64 letters, digits, ., _, : or -. It comes back in the X-Client-Request-Id response header and is logged next to the API’s id. Anything else is ignored. Your id never replaces the API’s own.

In the SDKs, pass your id as clientRequestId (Python: client_request_id in options). Their errors carry both ids, and the typed error classes let you handle one case, such as RateLimitError or NotFoundError.

curl -i https://api.boxline.dev/v1/sessions/does-not-exist \  -H "x-api-key: $BOXLINE_API_KEY" \  -H "X-Client-Request-Id: checkout-worker-42"# HTTP/1.1 404 Not Found# x-request-id: req_4fJx0aQm2Lk9Pz7N# x-client-request-id: checkout-worker-42# {"error":{"code":"not_found","message":"…","requestId":"req_4fJx0aQm2Lk9Pz7N"}}

Error codes

The codes you are most likely to meet, and whether trying again can help:

StatusCodeWhat it meansRetry?
400invalid_requestA field is not valid. The message names it.No. Fix the request.
400invalid_jsonThe body is not valid JSON.No.
400invalid_confirmation_codeThe 6-digit code for confirming your email is wrong, or not 6 digits. The message says how many tries are left. See Confirm your email.No. Check the code, or ask for a new one.
400invalid_cursorafter is not the next value of this list (with the same filters and sort). See Pagination.No.
400invalid_idempotency_keyThe Idempotency-Key header is not 1 to 255 printable characters without spaces. See Idempotency keys.No.
400 to 413invalid_pathA files call with a path outside /workspace or through a link (403 or 400), a missing file (404), no matching file in time (408), or a body too large (413). See Files.No.
400not_a_directoryDownload a folder was given the path of a file. See Files.No. Read the file instead, or give the folder.
400not_updatableUpdate a session names a setting that is fixed when the session is created (browser or shell on or off, viewport, profile, recordSession, setup, extensions, env, credentials). The message names the field. See Lifecycle.No. Start a new session with it.
400out_of_viewportA mouse or computer-use action points outside the page (or the screenshot). The message gives the page's size. See Mouse and keyboard.No. Fix the point.
400webhook_url_not_allowedA webhook endpoint that is not public HTTPS: http, a private or internal address or name, a mail port, or credentials in the URL. See Webhooks.No. Use a public HTTPS URL.
400invalid_extensionAn extension upload failed a check: not a Manifest V3 zip, a refused permission, native code, or unsafe files. The message says which. See Extensions.No. Fix the extension.
400variables_with_extensionsAn agent run with variables, a task with secret variables, or a run, step, script or type action with credentials, in a session with extensions, without allowWithExtensions: true. See Extensions.No.
400missing_variablesA task run, or a task's schedule, has no value for a variable without a default. The message names them. See Tasks.No. Send the values.
400credential_not_for_aiAn agent run, step, script, task or type action asked for a credential with scope "shell". See Credentials.No. Change the credential's scope, or leave it out.
400credential_not_for_shellA session or command asked to export a credential with scope "agent", or boxline-otp asked for a credential the session does not export. See Credentials.No. Change the credential's scope, or leave it out.
400credential_link_wrong_siteA sign-in link is not on one of the credential's sites, so it was not used (pushed, answered by the credential's codeUrl, or opened by an agent or a login action). See Credentials.No. Send a link from the credential's own site.
400code_url_not_allowedA credential's codeUrl is not a public HTTPS address: the webhook rules (no http, no private, loopback or internal address or name). See Credentials.No. Use a public HTTPS address.
401unauthorizedThe API key is missing or not valid, a session URL's token has expired or was rotated, or a console login's membership of the organization has ended (the person was removed, left, or the organization was deleted).No.
402feature_not_in_planYour plan does not include a feature the call needs. The Free plan runs AI on your own model keys only: without a key for the provider, agent runs, steps and extract get this. See Plans and features.No. Add your own model key or upgrade.
402spend_limitYour organization or the project reached the monthly spending limit its owners set, or the plan's model spend cap or proxy data allowance is used up. All of them are shared by the organization's projects; error.details.limit says which one (organization, project or plan). Running sessions stop within about a minute of a spending limit, with stopReason spend_limit. See Credit and spending limits.No. Raise the spending limit in the console (it works at once), or wait for the 1st (UTC). The plan's caps move only with the plan.
402out_of_creditThe organization has no credit left (error.details.limit is credit). It is for the day refusing work at zero credit is switched on, and it is not switched on yet: today, running out of credit only sends an alert. Running sessions would stop with stopReason out_of_credit. See Credit and spending limits.No. Add credit: contact us.
402plan_limitBeyond a plan limit: a timeout above your plan's maximum, a platform proxy without a data allowance, this month's searches used up on a plan without extra searches, or as many webhook endpoints, tasks, schedules switched on, credentials or browser profiles (their count or total size) as the plan allows. See Plans and features.No.
400invalid_model_keyThe provider did not accept the model key you tried to save. Nothing was saved. See Your own model keys.No. Check the key.
403project_suspendedYour project's organization is suspended, so every project in it is; the message gives the reason. Every call fails except GET /v1/auth/me and a few account calls. See Plans and features.No.
403organization_suspendedA call on a suspended organization's own pages (members, projects, invitations). Reading it and leaving it still work. See Plans and features.No.
403role_forbiddenYour role in the organization does not allow this. The message names the role: a viewer cannot write, a developer cannot manage members, only an owner touches owners and billing members. See Organizations, projects and team members.No. Ask an owner or admin.
403console_login_requiredOrganizations, members, invitations, spending limits and credit, password changes and the terms need a console login. An API key is not allowed. See Organizations, projects and team members.No. Do it in the console.
403email_unconfirmedA new sign-up has not entered its 6-digit code yet: the account can sign in only to confirm it, and cannot create an API key. Also, for any account whose email is not confirmed: inviting someone or transferring an organization, and the creator of an organization cannot be demoted or removed by others. See Confirm your email.No. Enter the 6-digit code, or reset the password.
403confirmation_locked15 wrong tries at email confirmation codes over all of the account's codes. No code is accepted or sent any more. See Confirm your email.No. Reset the password: that confirms the email.
403impersonatingA call that only the account's own user may make (accept terms, change the password, invite, transfer, change a member's role or projects, confirm the email) while Boxline support is signed in as that user to help. See Organizations, projects and team members.No. Do it as yourself.
403invite_email_mismatchAn invitation was opened with another email than the one invited. Sign in or sign up with the invited address. See Invitations.No.
403extension_deniedThe platform does not allow this extension. See Extensions.No.
404credential_not_foundA run, step, script, task, session, command or type action named a credential your project does not have, or a profile was linked to one. See Credentials.No. Save the credential first.
408credential_code_timeoutNo 2FA code or sign-in link arrived within the credential's codeTimeoutSeconds. boxline-otp exits with 1. A type or login action answers with ok: false and this code, and an agent run records a code step with state timeout. See Credentials.Yes. Send the code while the wait lasts, or raise codeTimeoutSeconds.
200, ok: false (the SDKs: 422)credential_login_failedA login action could not sign in. The action's result has ok: false, this code, the run's last step in error and the runId of the run that tried. See Credentials.Check the run, then try again.
200, ok: false (the SDKs: 408)credential_login_timeoutA login action ran out of time (15 steps of 30 seconds, plus codeTimeoutSeconds when the codes come from you) and its run was canceled. The result has the runId. See Credentials.Yes, with a longer time limit on your call, or after sending the code sooner.
404not_foundNo such session, browser profile, run, crawl or route in your project, or an organization you are not in, or a project you cannot reach.No.
404invite_not_foundThe invitation link is not a valid one. See Invitations.No. Ask for a new invitation.
409session_not_runningThe session is not running: it is stopped (a call on a stopped session does not resume it; only reading its files works) or deleted. An agent run given a deleted session gets it too. See Lifecycle.Resume a stopped session first. A deleted one cannot come back: start a new session.
409nothing_savedResume, or reading the files of a stopped session: nothing was saved when the session stopped (its machine was lost before its first checkpoint, or it stopped without saving). See Files.No. Start a new session.
409session_not_stoppedResume: the session was deleted, so there is nothing to resume. See Lifecycle.No. Start a new session.
409not_resumableResume a run: the run is neither paused nor stopped early (it is running, finished, canceled or failed for another reason), or its window passed. See AI agent.No. Start a new run.
409run_not_livePause, resume or a message for a run whose API server stopped. It ends as server_restarted within about 90 seconds. See How runs and sessions end.Resume it once it shows as stopped early.
409too_many_messagesA run already got 50 messages. See AI agent.No.
409shell_disabledThe session has no shell: it was created without shell: true. See Configuring sessions.No. Start a session with a shell.
409browser_disabledThe session has no browser: it was created with browser: false, so the browser calls, the live view and its socket are refused. See Configuring sessions.No. Start a session with a browser.
409invalid_stateThe call does not fit the current state, e.g. pausing a run that is not running.No.
409conflictSomething else holds the resource, e.g. a browser profile already in use by a running session, or a credential whose sites changed while you changed them.Later, or send the change again.
409machine_lostThe session's machine went away during the call.Yes, after the session recovers.
409idempotency_in_progressA request with the same Idempotency-Key is still being answered. See Idempotency keys.Yes, after Retry-After (1 second), with the same key.
409 or 408 (SDKs)captcha_timeoutA CAPTCHA kept waiting for a person: 409 when a plain-English step waited 4 minutes, 408 when the SDKs' waitForHuman / wait_for_human ran out of time. See CAPTCHAs.After someone solves it.
409credential_existsA credential with that name exists already. See Credentials.No. Change it with PATCH /v1/credentials/:name.
409too_many_credential_valuesThe session already hides 256 earlier credential values (or 256 KB) in its output. See Credentials.No. Start a new session.
409machine_too_oldDuring a platform update, a session on an older machine cannot take env or credentials.No. Start a new session.
409limit_reachedYour project keeps 100 extensions already, your organization has 20 projects, or it has 50 pending invitations. See Extensions.No. Delete or withdraw one first.
409no_projectA console login without a current project called a project route. Choose a project in the switcher (the billing role has none). See Organizations, projects and team members.No.
409last_ownerThe last owner of an organization cannot leave, be removed or get another role. See Organizations, projects and team members.No. Make someone else an owner first.
409organization_not_emptyAn organization is deleted only when it has no projects. See Organizations, projects and team members.No. Delete its projects first.
409project_has_sessionsA project with running sessions cannot be deleted. See Organizations, projects and team members.After the sessions have stopped.
409already_memberThe invited email belongs to a member of the organization already. See Invitations.No.
409invite_pendingA pending invitation for this email exists already. An expired one is replaced. See Invitations.No. Withdraw it first, or wait for the person.
410invite_expiredThe invitation is older than 7 days. See Invitations.No. Ask for a new one.
410invite_usedThe invitation was used already. See Invitations.No.
410invite_withdrawnThe invitation was withdrawn, or the person who sent it left, was removed or can no longer give that role. See Invitations.No. Ask for a new one.
410confirmation_code_expiredThe email confirmation code was never asked for, was used or replaced, or is older than 15 minutes. See Confirm your email.No. Ask for a new code.
410confirmation_code_locked5 wrong tries at one email confirmation code. See Confirm your email.No. Ask for a new code.
410session_endedA session URL (connect, live or terminal) of a session that has stopped or was deleted.No. Get the session for fresh URLs (resume it first if it is stopped).
413profile_too_largeA sign-in saved from a session is over 16 MB. See Browser profiles.No. Sign out of sites you do not need, then save again.
413payload_too_largeAn upload is too large (an extension zip over 10 MB).No.
413archive_too_largeDownload a folder: the folder is over 1 GiB or 100,000 entries. Nothing was sent. See Files.No. Download a smaller folder.
422idempotency_mismatchThe Idempotency-Key was already used for a different request. See Idempotency keys.No. Use a new key.
422not_a_web_pagefetch or extract (and the pages search and crawl open) was given the address of a PDF: Chrome only displays it, so there is no page text. See Fetch.No. Download the file in a session and read it there, e.g. with pdftotext.
422model_refusedThe AI model declined to extract from these pages (POST /v1/extract), or the code of a failed extract action.Maybe, with other pages or another model.
429rate_limitedToo many requests. Also when 10 email confirmation codes were already sent to the account in a day. See Rate limits.Yes, after Retry-After seconds.
429archive_busyDownload a folder: another folder download of this session is still running (two at once per session). See Files.Yes, when the other one is done.
429concurrency_limitThe organization's running sessions (its plan's concurrency, shared by all its projects) are all in use, or the project's own concurrencyCap is reached. See Organizations, projects and team members.Yes, after Retry-After (5 seconds), or once a session ends.
502page_unreachableA web API could not load the page. The message names the host and Chrome's reason, and when that is generic, the real one in words. See Why a page did not load.Maybe. Check the URL.
502machine_errorThe session's machine failed to answer properly (also machine_unreachable).Yes, with backoff.
502model_errorA call on your own model key failed at the provider. The provider's text is shown with the key removed. See Your own model keys.Maybe.
400model_key_rejectedThe provider refused your own model key, or the key was removed while a run worked. A run ends with this errorCode. It never falls back to Boxline's key. See Your own model keys.No. Save a working key.
502extraction_failedThe AI model returned no usable data.Yes.
500secret_unreadableThe platform can no longer open a stored credential (or model key). See Credentials.No. Set the values again.
503mail_unavailableAn email, such as the confirmation code, could not be sent. See Confirm your email.Yes, later.
503browser_unreachableThe session's browser did not answer in time (a busy machine, or a Chrome that is starting or restarting). Nothing ran.Yes, after Retry-After (2 seconds).
503no_capacityNo machine was free. A start waits up to 110 seconds while the platform adds one (about 70 seconds when a new server must start) before this answer. See When no machine is free.Yes, with backoff.
503provider_unavailableNo key exists for the AI provider you asked for: none of your own, and none on the platform.No. Add your own key or pick another provider.
503search_unavailableWeb search is not set up on the platform, or the search provider did not answer or is limiting the platform. See Search.Later, after Retry-After when it is sent.
503webhooks_unavailableWebhooks are not set up on this API server. See Webhooks.Later.
503proxy_unavailableThe platform's proxies are not available. See Proxies.Later.
504page_timeoutA web API's page did not finish loading within timeoutMs.Yes, with a longer timeoutMs.

captcha_timeout comes in the action’s result (ok: false, code: "captcha_timeout"), not as an HTTP error. The SDKs raise it with status 409, and their waitForHuman / wait_for_human raise the same code with status 408 when their own wait runs out. An agent run or task run that was accepted and then failed carries its own errorCode instead, such as output_invalid (see Structured output) or not_started (see Tasks). Each API reference page lists the errors of its endpoint.

Why a page did not load

A page that cannot be loaded gives 502 page_unreachable. The message names the host and Chrome’s reason, for example could not load example.com: ERR_NAME_NOT_RESOLVED. For some connection problems Chrome only says that the tunnel failed (ERR_TUNNEL_CONNECTION_FAILED). The session machine’s own proxy knows why, so the message adds it in words:

Text
could not load status.example.invalid: ERR_TUNNEL_CONNECTION_FAILED (the name does not resolve (DNS))

The same words are in the error of a failed goto action in a session (page.goto: net::ERR_TUNNEL_CONNECTION_FAILED at https://status.example.invalid/ (the name does not resolve (DNS)), which stays ok: false; the SDKs’ one-action methods raise it as action_failed), and for fetch, screenshot, PDF, extract and crawl, where the status stays 502. When the machine cannot say, the message is Chrome’s own.

The message saysWhat happened
the name does not resolve (DNS)The address has no such host name. Check the spelling.
the server refused the connectionThe host is there, but nothing accepts connections on that port.
the server could not be reachedNo route, or no answer: it timed out, or the host or network is unreachable.
the server closed the connectionIt accepted the connection, then dropped it.
the connection could not be madeAny other failure to connect.
the session blocks this site as an ad or tracker (blockAds)You turned on blockAds and the site is on the block list. Turn it off to load the page. See Ad and cookie-banner blocking.
the session’s proxy could not reach it (reason)The proxy refused or could not connect. The reason is one of the words in When a page does not load, for example target_restricted.

Retrying well

  • Retry only what can succeed later: 429, 503, 502 from a machine, and network errors.
  • Wait longer each time (1 s, 2 s, 4 s…), with some randomness, and give up after a few tries.
  • On 429, wait at least the Retry-After seconds.
  • Send an Idempotency-Key on calls that create something, so a retry never creates it twice.
  • Never retry project_suspended, feature_not_in_plan, spend_limit, out_of_credit, role_forbidden or email_unconfirmed: they will not change by themselves. A person has to change a plan, a limit, a role or confirm an email.
  • The SDKs follow these rules for you: they retry GETs and creates with an idempotency key, and never other POSTs. See the Node SDK and the Python SDK.

These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.