Skip to content

API Common Errors Reference

This document lists all common errors returned by the API, organized by HTTP status code.

Errors indicating that the request was malformed or invalid.

Error CodeError MessageDescriptionSuggested Action
400Error when parsing request: <details>The request body format is invalid or contains syntax errorsCheck the request body format and ensure all required fields are present and correctly formatted
400Invalid environment ID: <details>The template ID format is invalidVerify the template ID format matches the expected pattern (e.g., UUID or alias)
400Invalid template ID format: <details>The template ID cannot be parsedEnsure the template ID is correctly formatted
400Invalid team ID format: <details>The team ID format is invalidVerify the team ID is a valid UUID format
400Invalid request body: <details>The request body failed validationCheck the request body against the API schema and ensure all required fields are provided
400Invalid code lengthThe verification code must be exactly 6 charactersEnter a 6-digit verification code
400Invalid code, not matchThe verification code doesn’t match the code sent to your emailRequest a new verification code and try again
400Invalid code, please contact adminThe verification code is invalid for admin authenticationContact the administrator for assistance
400invalid email: <details>The email address format is invalidEnsure the email address follows the standard format (e.g., user@example.com)
400name field is requiredThe team name field is missingProvide a team name in the request
400UserID and TeamID are requiredBoth user ID and team ID must be providedInclude both user ID and team ID in the request
400password and token are both requiredBoth password and reset token are required for password resetEnsure both password and token are included in the password reset request
400email and redirectTo are both requiredBoth email and redirect URL are requiredInclude both email and redirectTo parameters in the request
400phone verification code not supported nowPhone verification is currently not supportedUse email verification instead
400Timeout cannot be greater than <hours> hoursThe sandbox timeout exceeds your team’s maximum allowed durationReduce the timeout value to be within your team tier limit
400you need to re-build template to allow secure flagThe template needs to be rebuilt to support the secure flagRebuild the template with the secure flag enabled
400current template build does not support access flag, you need to re-build template to allow itThe template’s envd version is too old (< 0.2.0) to support the access flagRebuild the template with envd version 0.2.0 or later
400validation error: <details>The request failed OpenAPI schema validationCheck the request parameters against the API documentation
400Endpoints are deprecated, please update your SDK to use the new endpoints.You are using deprecated endpoints (/instances or /envs)Update your SDK to use the new endpoints (e.g., /sandboxes)
400Endpoint deprecated please update your CLI to the latest versionYou are using a deprecated CLI version with multipart/form-dataUpdate your CLI to the latest version
400user data information not found, err: <details>User data could not be found during password resetVerify the reset token is valid and has not expired
400failed to generate password, err: <details>Password generation failed due to an internal errorTry again later or contact support if the issue persists
400your new password is the same as old passwordThe new password must be different from the current passwordChoose a different password
400token is expired, please try to reset againThe password reset token has expiredRequest a new password reset token
400Error when parsing API key ID: <details>The API key ID format is invalidEnsure the API key ID is a valid UUID format
400Error when parsing access token ID: <details>The access token ID format is invalidEnsure the access token ID is a valid UUID format
400Bad user idThe user ID format is invalidProvide a valid user ID (UUID format)
400Invalid team IDThe team ID validation failedVerify the team ID is correct and properly formatted
400email is requiredThe email field is missing from the requestInclude an email address in the request
400password is requiredThe password field is missing from the requestInclude a password in the request
400email and password are requiredBoth email and password fields are missingInclude both email and password in the request
400invalid user ID format: <details>The user ID format is invalid or cannot be parsedEnsure the user ID is a valid UUID format
400invalid isDefault value: <details>The isDefault parameter value is invalidEnsure isDefault is a valid boolean value
400failed to parse team id, err: <details>The team ID cannot be parsedEnsure the team ID is a valid UUID format
400can not remove a default team memberAttempting to remove a team member who has a default teamRemove the default team assignment first or remove a different team member
400can not remove the last team memberAttempting to remove the only remaining member of a teamTeams must have at least one member
400failed to count team members: <details>Failed to count team members during validationRetry the request. If the issue persists, contact support
400sandbox "<sandboxID>" auth info get failed, err: <details>Failed to retrieve authentication information for the sandboxVerify the sandbox ID is correct and retry the request
400failed to exchange Google token: <details>Failed to exchange Google OAuth authorization code for access tokenVerify the authorization code is valid and not expired
400failed to get Google user info: <details>Failed to retrieve user information from Google OAuthRetry the OAuth flow. If the issue persists, contact support
400failed to exchange GitHub token: <details>Failed to exchange GitHub OAuth authorization code for access tokenVerify the authorization code is valid and not expired
400failed to get GitHub user info: <details>Failed to retrieve user information from GitHub OAuthRetry the OAuth flow. If the issue persists, contact support

Errors indicating authentication is required or has failed.

Error CodeError MessageDescriptionSuggested Action
401Authentication errorAuthentication credentials are missing or invalidProvide valid authentication credentials (API key, access token, or authorization header)
401security requirements failed: <details>The authentication header is missing or invalidInclude a valid authentication header (X-API-Key, Authorization, or X-Supabase-Token)
401Cannot get the team for the given API keyThe API key is invalid or does not existVerify the API key is correct or generate a new API key
401Cannot get the user for the given access tokenThe access token is invalid or expiredRefresh the access token or request a new one
401Invalid Access tokenThe access token format is invalidEnsure the access token is correctly formatted
401Backend authentication failedBackend authentication service failedTry again later or contact support
401failed to mask access token: <details>Failed to mask the access token for displayRetry the request. If the issue persists, contact support

Errors indicating the request is forbidden due to insufficient permissions.

Error CodeError MessageDescriptionSuggested Action
403team forbidden: <details>Your team does not have permission to access this resourceContact your team administrator to request access
403Team '<teamID>' does not have access to the template '<templateID>'Your team does not have permission to access this templateRequest access from the template owner or use a public template
403Creating team is disabledTeam creation is currently disabledContact support if you need to create a team
403Permission denied, please contact the team administratorYou don’t have sufficient permissions for this operationContact your team administrator to grant the necessary permissions

Errors indicating the requested resource was not found.

Error CodeError MessageDescriptionSuggested Action
404template '<templateID>' not foundThe specified template does not existVerify the template ID is correct or check if the template has been deleted
404Sandbox '<sandboxID>' not foundThe specified sandbox does not existVerify the sandbox ID is correct or check if the sandbox has been deleted
404id not foundThe API key or access token ID does not existVerify the ID is correct or check if it has been deleted
404email has not been registered, please sign upThe email address is not registered in the systemSign up with this email address first
404code not found or expired, please request a new oneThe verification code does not exist or has expiredRequest a new verification code
404failed to query operator user info or team, err: <details>The user or team information could not be foundVerify the user ID or team ID is correct
404failed to query given email, err: <details>The email address is not found in the databaseVerify the email address is correct or register a new account
404team not found: <details>The specified team does not existVerify the team ID is correct or check if the team has been deleted
404tier not found: <details>The team tier information could not be foundVerify the team ID is correct and the team has an assigned tier
404default team not foundThe user does not have a default team assignedAssign a default team or verify the user’s team memberships
404failed to query default team: <details>Failed to retrieve the user’s default teamRetry the request. If the issue persists, contact support
404failed to query user teams: <details>Failed to retrieve user team associationsRetry the request. If the issue persists, contact support
404failed to query teams: <details>Failed to retrieve team informationRetry the request. If the issue persists, contact support
404user team relation not found: <details>The user-team relationship does not existVerify the user ID and team ID are correct
404user not found: <details>The specified user does not existVerify the user ID is correct or check if the user has been deleted
404failed to query users: <details>Failed to retrieve user informationRetry the request. If the issue persists, contact support
404access token not found: <details>The specified access token does not existVerify the access token ID is correct or check if it has been deleted

Errors indicating a conflict with the current state of the resource.

Error CodeError MessageDescriptionSuggested Action
409team named <name> already existsA team with this name already existsChoose a different team name
409email already registered, please sign inThis email address is already registeredSign in with your existing account or use a different email address
409email already existsThis email address is already registeredUse a different email address or sign in with your existing account
409Sandbox <sandboxID> is already being startedA sandbox creation is already in progress for this sandbox IDWait for the current creation to complete or use a different sandbox ID

Errors indicating rate limiting has been exceeded.

Error CodeError MessageDescriptionSuggested Action
429you have reached the maximum number of concurrent AgentBox sandboxes (<count>). If you need more, please contact us at 'https://agentbox.cloud/contact'Your team has reached the maximum number of concurrent sandboxes allowed by your tierStop some running sandboxes or contact us at https://agentbox.cloud/contact to upgrade your tier
429too high frequency, please try again in <seconds> secondsToo many verification code requests in a short periodWait for the specified number of seconds before requesting another verification code

Errors indicating an internal server error occurred. These are typically temporary issues that should be resolved by retrying the request.

Error CodeError MessageDescriptionSuggested Action
500Error when starting transactionDatabase transaction initialization failedRetry the request. If the issue persists, contact support
500Error when creating API keyAPI key creation failed due to an internal errorRetry the request. If the issue persists, contact support
500Server errorAn unexpected server error occurredRetry the request. If the issue persists, contact support
500failed to check team, err: <details>Team verification query failedRetry the request. If the issue persists, contact support
500failed to get user email, err: <details>User email lookup failedRetry the request. If the issue persists, contact support
500failed to generate tokenToken generation service failedRetry the request. If the issue persists, contact support
500failed to query base user by email, err: <details>User database query failedRetry the request. If the issue persists, contact support
500failed to create user, err: <details>User account creation failedRetry the request. If the issue persists, contact support
500failed to create auth user, err: <details>Authentication user creation failedRetry the request. If the issue persists, contact support
500failed to save code: <details>Verification code storage failedRetry requesting a verification code
500failed to save time: <details>Timestamp storage failedRetry the request
500failed to send email: <details>Email delivery service failedRetry requesting a verification email
500Failed to send verification emailEmail service is temporarily unavailableRetry requesting a verification email after a few minutes
500failed to generate recover token, err: <details>Password recovery token generation failedRetry the password recovery request
500failed to reset password, err: <details>Password reset operation failedRetry the password reset request
500internal error: <details>An internal processing error occurredRetry the request. If the issue persists, contact support
500error while getting template: <details>Template retrieval from database failedRetry the request. If the issue persists, contact support
500Error when updating team API key name: <details>API key name update failedRetry the request. If the issue persists, contact support
500Error when deleting API key: <details>API key deletion failedRetry the request. If the issue persists, contact support
500Error when creating team API key: <details>Team API key creation failedRetry the request. If the issue persists, contact support
500Error when getting user: <details>User retrieval failedRetry the request. If the issue persists, contact support
500Error when creating response key mask: <details>API key masking failedRetry the request. If the issue persists, contact support
500Error when generating access token: <details>Access token generation failedRetry the request. If the issue persists, contact support
500Error when creating access token: <details>Access token creation failedRetry the request. If the issue persists, contact support
500Error when masking access token: <details>Access token masking failedRetry the request. If the issue persists, contact support
500Error when deleting access token: <details>Access token deletion failedRetry the request. If the issue persists, contact support
500Error when clearing access token: <details>Access token clearing failedRetry the request. If the issue persists, contact support
500Error when getting team API keysTeam API keys retrieval failedRetry the request. If the issue persists, contact support
500Failed to create sandbox: <details>Sandbox creation failed due to an internal errorRetry creating the sandbox. If the issue persists, contact support
500Failed to get node to place sandbox on.No available compute node to host the sandboxRetry creating the sandbox after a few minutes
500Failed to get build information for the templateTemplate build information retrieval failedRetry the request. If the issue persists, contact support
500Failed to create sandboxSandbox creation failed (generic error)Retry creating the sandbox. If the issue persists, contact support
500Not support env type: <type>, only support for [ linux_arm64 | linux_x86 | android ]The specified environment type is not supportedUse one of the supported environment types: linux_arm64, linux_x86, or android
500error during sandbox access token generationEnvd access token generation failedRetry the request. If the issue persists, contact support
500Error when setting sandbox timeoutSandbox timeout update failedRetry the request. If the issue persists, contact support
500Failed to get inbox messages: <details>Notification inbox retrieval failedRetry the request. If the issue persists, contact support
500Failed to get filtered inbox messages: <details>Filtered inbox messages retrieval failedRetry the request. If the issue persists, contact support
500Failed to send alert: <details>Alert notification delivery failedRetry the request. If the issue persists, contact support
500Error executing query: <details>Failed to execute Prometheus queryRetry the request. If the issue persists, contact support
500failed to create base user: <details>Base user account creation failed during OAuth sign-inRetry the OAuth sign-in. If the issue persists, contact support
500failed to create auth user, err: <details>Authentication user creation failed during OAuth sign-inRetry the OAuth sign-in. If the issue persists, contact support
500failed to issue refresh token: <details>Failed to generate refresh token after OAuth authenticationRetry the OAuth sign-in. If the issue persists, contact support
500failed to query user by email: <details>User database query failed during OAuth sign-inRetry the OAuth sign-in. If the issue persists, contact support
500failed to update user: <details>User profile update failedRetry the request. If the issue persists, contact support
500error generating sandbox access token: <details>Failed to generate access token for secure sandbox accessRetry the request. If the issue persists, contact support
500failed to delete member, err: <details>Failed to remove team memberRetry the request. If the issue persists, contact support
500Error when creating user team relation: <details>Failed to create user-team relationshipRetry the request. If the issue persists, contact support

Errors indicating the service is temporarily unavailable.

Error CodeError MessageDescriptionSuggested Action
503Service is unavailableThe service is temporarily unavailable, typically because compute nodes are not readyWait a few minutes and retry the request
503Metrics handler is not configuredThe Prometheus metrics handler is not configured or initializedContact support to enable metrics functionality

Common errors related to authentication and authorization:

  • 400: OAuth authentication failures
    • Common errors: failed to exchange Google token, failed to get Google user info, failed to exchange GitHub token, failed to get GitHub user info
    • Retry the OAuth flow. If the issue persists, contact support
  • 401: Missing or invalid API key, access token, or authorization header
    • Check that authentication credentials are correctly included in the request headers
    • Verify API keys and tokens are valid and not expired
    • Common errors: failed to mask access token, Authentication failed. Please check your email and password.
  • 403: Team access denied, insufficient permissions
    • Contact your team administrator to request access to the resource
    • Verify your team has the necessary permissions for the operation

Common errors related to user account operations:

  • 400: Invalid email format, missing required fields
    • Ensure email addresses follow the standard format
    • Verify all required fields are provided in the request
    • Common missing fields: email, password, or both email and password
  • 404: User not found, email not registered
    • Verify the email address is correct
    • Sign up with the email address if it’s not registered
    • Common errors: user not found, failed to query users, failed to query user by email
  • 409: Email already registered
    • Sign in with your existing account or use a different email address
  • 500: User creation/update failures
    • Retry the operation. If the issue persists, contact support
    • Common errors: failed to create base user, failed to create auth user, failed to update user, failed to issue refresh token

Common errors related to team operations:

  • 400: Invalid team name, missing required fields
    • Ensure the team name meets the requirements
    • Verify all required fields are provided
  • 403: Team creation disabled, insufficient permissions
    • Contact support if team creation is needed
    • Request permissions from your team administrator
  • 404: Team not found
    • Verify the team ID is correct
    • Common errors: team not found, failed to query teams, failed to query user teams, user team relation not found, default team not found
  • 409: Team name already exists
    • Choose a different team name
  • 500: Team operation failures
    • Retry the operation. If the issue persists, contact support
    • Common errors: Error when creating user team relation, failed to delete member, failed to count team members
  • 400: Team member removal restrictions
    • Cannot remove a default team member or the last team member
    • Common errors: can not remove a default team member, can not remove the last team member

Common errors related to template operations:

  • 400: Invalid template ID format
    • Verify the template ID is correctly formatted (UUID or alias)
  • 403: Team doesn’t have access to template
    • Request access from the template owner or use a public template
  • 404: Template not found
    • Verify the template ID is correct or check if the template has been deleted
  • 500: Template retrieval/build failures
    • Retry the operation. If the issue persists, contact support

Common errors related to sandbox operations:

  • 400: Invalid sandbox configuration, timeout exceeds limit
    • Verify sandbox configuration parameters
    • Ensure timeout is within your team tier limit
  • 404: Sandbox not found
    • Verify the sandbox ID is correct or check if the sandbox has been deleted
  • 409: Sandbox already being started
    • Wait for the current creation to complete or use a different sandbox ID
  • 429: Maximum concurrent sandboxes reached
    • Stop some running sandboxes or upgrade your tier
  • 500: Sandbox creation failures, node unavailable
    • Retry creating the sandbox after a few minutes
    • If the issue persists, contact support
  • 503: Service unavailable (nodes not ready)
    • Wait a few minutes and retry the request

Common errors related to verification code operations:

  • 400: Invalid code format, code mismatch
    • Ensure the verification code is exactly 6 characters
    • Request a new code if the current one doesn’t match
  • 404: Code not found or expired
    • Request a new verification code
  • 429: Too many verification requests
    • Wait for the specified cooldown period before requesting another code
    • Common errors: too high frequency, please try again in <seconds> seconds
  • 500: Code generation/saving failures
    • Retry requesting a verification code

Common errors related to API keys and access tokens:

  • 400: Invalid ID format
    • Ensure IDs are in valid UUID format
    • Common errors: invalid user ID format, invalid team ID format, failed to parse team id
  • 404: Key/token not found
    • Verify the ID is correct or check if it has been deleted
    • Common errors: access token not found, id not found
  • 401: Access token masking failures
    • Failed to mask access token for secure display
    • Common errors: failed to mask access token
  • 500: Key/token operation failures
    • Retry the operation. If the issue persists, contact support
    • Common errors: error generating sandbox access token, Error when masking access token