Response codes

Appwrite uses conventional HTTP response codes to indicate the success or failure of an API request.

  • Codes in the 2xx range indicate success.

  • Codes in the 4xx range indicate an error caused by invalid request, usually caused by user error.

  • Codes in the 5xx range indicate an error with Appwrite, please check Docker container logs.

Response codes

CodeTextDescription
200OKSuccess!
201CreatedThe requested resource has been created successfully.
202AcceptedThe requested change has been accepted for processing but has not been completed.
204No ContentThe server has successfully fulfilled the request and that there is no additional content to send in the response payload body. This status will usually return on successful delete operations.
301Moved PermanentlyThe URL of the requested resource has been changed permanently. The new URL is given in the response.
304Not ModifiedThere was no new data to return.
400Bad RequestThe request was invalid or cannot be otherwise served. An accompanying error message will explain further. Requests with wrong or invalid input will yield this response.
401UnauthorizedMissing or incorrect authentication credentials can happen when the API key or user permission is not sufficient.
403ForbiddenThe request is understood, but it has been refused, or access is not allowed. An accompanying error message will explain why. Make sure to register your app in your project's dashboard platform list.
404Not FoundThe URI requested is invalid or the resource requested, such as a user, does not exist.
409ConflictThis response is sent when a request conflicts with the current state of the server. This status code will usually appear when you're trying to create an already existing resource.
413Payload Too LargeThis indicates that the request entity is larger than limits defined by server. This status code will usually appear happen when uploading a file or function that is too large
416Invalid RangeInvalid value in the range or content-range headers. Usually returned while uploading or downloading files using the range header but the provided range value is not valid.
429Too Many RequestsReturned in when a request cannot be served due to the application's rate limit having been exhausted for the resource. See Rate Limits.
500Internal Server ErrorSomething is broken. Contact our team, or raise a GitHub issue.
501Not ImplementedThe feature is not implemented. Usually returned when the project owner has disabled an auth method or an entire service.
503Service UnavailableThe Appwrite servers are up but overloaded with requests. Try again later.
504Gateway timeoutThe Appwrite servers are up, but the request couldn't be serviced due to some failure within the stack. Try again later.

Error messages

When the Appwrite APIs return error messages, it does so in JSON format. For example, an error might look like this:

JSON
{
    "message": "Invalid id: Parameter must be a valid number",
    "type": "argument_invalid",
    "code": 400
}

Error types

Appwrite also passes convenient error types in addition to the HTTP response codes to help you get more fine-grained control over what went wrong and allowing you to display relevant error messages in your applications. Error types are convenient to identify the type of error that occurred.

For example, a 400 HTTP response code could indicate a Bad Request due to a variety of reasons, and error types can help you pinpoint the exact 400 error. Appwrite currently supports the following error types:

Platform errors

Platform errors are not related to an individual product, but can occur across the Appwrite platform.

CodeTypeDescription
400general_mockGeneral errors thrown by the mock controller used for testing.
400general_argument_invalidThe request contains one or more invalid arguments. Please refer to the endpoint documentation.
400general_query_limit_exceededQuery limit exceeded for the current attribute. Usage of more than 100 query values on a single attribute is prohibited.
400general_query_invalidThe query's syntax is invalid. Please check the query and try again.
400general_cursor_not_foundThe cursor is invalid. This can happen if the item represented by the cursor has been deleted.
400general_provider_failureVCS (Version Control System) provider failed to process the request. We believe this is an error with the VCS provider. Try again, or contact support for more information.
400project_unknownThe project ID is either missing or not valid. Please check the value of the X-Appwrite-Project header to ensure the correct project ID is being used.
400project_invalid_success_urlInvalid redirect URL for OAuth success.
400project_invalid_failure_urlInvalid redirect URL for OAuth failure.
400project_reserved_projectThe project ID is reserved. Please choose another project ID.
400project_smtp_config_invalidProvided SMTP config is invalid. Please check the configured values and try again.
401project_key_expiredThe project key has expired. Please generate a new key using the Appwrite console.
401rule_verification_failedDomain verification failed. Please check if your DNS records are correct and try again.
401project_template_default_deletionYou can't delete default template. If you are trying to reset your template changes, you can ignore this error as it's already been reset.
403general_unknown_originThe request originated from an unknown origin. If you trust this domain, please list it as a trusted platform in the Appwrite console.
401general_access_forbiddenAccess to this API is forbidden.
401general_unauthorized_scopeThe current user or API key does not have the required scopes to access the requested resource.
404general_route_not_foundThe requested route was not found. Please refer to the API docs and try again.
404webhook_not_foundWebhook with the requested ID could not be found.
404rule_resource_not_foundResource could not be found. Please check if the resourceId and resourceType are correct, or if the resource actually exists.
404rule_not_foundRule with the requested ID could not be found. Please check if the ID provided is correct or if the rule actually exists.
404key_not_foundKey with the requested ID could not be found.
404platform_not_foundPlatform with the requested ID could not be found.
404project_not_foundProject with the requested ID could not be found. Please check the value of the X-Appwrite-Project header to ensure the correct project ID is being used.
404router_host_not_foundHost is not trusted. This could occur because you have not configured a custom domain. Add a custom domain to your project first and try again.
405general_not_implementedThis method was not fully implemented yet. If you believe this is a mistake, please upgrade your Appwrite server version.
409project_already_existsProject with the requested ID already exists. Try again with a different ID or use unique() to generate a unique ID.
409rule_already_existsDomain is already used. Please try again with a different domain.
412project_provider_disabledThe chosen OAuth provider is disabled. You can enable the OAuth provider using the Appwrite console.
429general_rate_limit_exceededRate limit for the current endpoint has been exceeded. Please try again after some time.
500general_unknownAn unknown error has occurred. Please check the logs for more information.
500general_server_errorAn internal server error occurred.
500general_protocol_unsupportedThe request cannot be fulfilled with the current protocol. Please check the value of the _APP_OPTIONS_FORCE_HTTPS environment variable.
500general_codes_disabledInvitation codes are disabled on this server. Please contact the server administrator.
500router_domain_not_configured_APP_DOMAIN, _APP_DOMAIN_TARGET, and _APP_DOMAIN_FUNCTIONS environment variables have not been configured. Please configure the domain environment variables before accessing the Appwrite Console via any IP address or hostname other than localhost. This value could be an IP like 203.0.113.0 or a hostname like example.com.
501general_usage_disabledUsage stats is not configured. Please check the value of the _APP_USAGE_STATS environment variable of your Appwrite server.
501project_provider_unsupportedThe chosen OAuth provider is unsupported. Please check the Create OAuth2 Session docs for the complete list of supported OAuth providers.
503general_service_disabledThe requested service is disabled. You can enable the service from the Appwrite console.
503general_smtp_disabledSMTP is disabled on your Appwrite instance. You can learn more about setting up SMTP in our docs.
503general_phone_disabledPhone provider is not configured. Please check the _APP_SMS_PROVIDER environment variable of your Appwrite server.

Authentication errors

Errors found when using Appwrite Authentication.

CodeTypeDescription
400user_password_mismatchPasswords do not match. Please check the password and confirm password.
400password_recently_usedThe password you are trying to use is similar to your previous password. For your security, please choose a different password and try again.
400password_personal_dataThe password you are trying to use contains references to your name, email, phone or userID. For your security, please choose a different password and try again.
400user_phone_not_foundThe current user does not have a phone number associated with their account.
400user_missing_idMissing ID from OAuth2 provider.
400user_oauth2_bad_requestOAuth2 provider rejected the bad request.
401user_jwt_invalidThe JWT token is invalid. Please check the value of the X-Appwrite-JWT header to ensure the correct token is being used.
401user_blockedThe current user has been blocked. You can unblock the user by making a request to the User API's "Update User Status" endpoint or in the Appwrite Console's Auth section.
401user_invalid_tokenInvalid token passed in the request.
401user_email_not_whitelistedConsole registration is restricted to specific emails. Contact your administrator for more information.
401user_invalid_codeThe specified code is not valid. Contact your administrator for more information.
401user_ip_not_whitelistedConsole registration is restricted to specific IPs. Contact your administrator for more information.
401user_invalid_credentialsInvalid credentials. Please check the email and password.
401user_anonymous_console_prohibitedAnonymous users cannot be created for the console project.
401user_session_already_existsCreation of anonymous users is prohibited when a session is active.
401user_unauthorizedThe current user is not authorized to perform the requested action.
401user_oauth2_unauthorizedOAuth2 provider rejected the unauthorized request.
401team_invalid_secretThe team invitation secret is invalid. Please request a new invitation and try again.
401team_invite_mismatchThe invite does not belong to the current user.
404user_not_foundUser with the requested ID could not be found.
404user_session_not_foundThe current user session could not be found.
404user_identity_not_foundThe identity could not be found. Please sign in with OAuth provider to create identity first.
404team_not_foundTeam with the requested ID could not be found.
404team_invite_not_foundThe requested team invitation could not be found.
404team_membership_mismatchThe membership ID does not belong to the team ID.
404membership_not_foundMembership with the requested ID could not be found.
409user_already_existsA user with the same id, email, or phone already exists in this project.
409user_email_already_existsA user with the same email already exists in the current project.
409user_phone_already_existsA user with the same phone number already exists in the current project.
409team_invite_already_existsUser has already been invited or is already a member of this team
409team_already_existsTeam with requested ID already exists. Please choose a different ID and try again.
409membership_already_confirmedMembership is already confirmed.
412user_password_reset_requiredThe current user requires a password reset.
424user_oauth2_provider_errorOAuth2 provider returned some error.
501user_count_exceededThe current project has exceeded the maximum number of users. Please check your user limit in the Appwrite console.
501user_auth_method_unsupportedThe requested authentication method is either disabled or unsupported. Please check the supported authentication methods in the Appwrite console.

Databases errors

Errors found when using Appwrite Databases.

CodeTypeDescription
400collection_limit_exceededThe maximum number of collections has been reached.
400document_invalid_structureThe document structure is invalid. Please ensure the attributes match the collection definition.
400document_missing_dataThe document data is missing. Try again with document data populated.
400document_missing_payloadThe document data and permissions are missing. You must provide either document data or permissions to be updated.
400attribute_unknownThe attribute required for the index could not be found. Please confirm all your attributes are in the available state.
400attribute_not_availableThe requested attribute is not yet available. Please try again later.
400attribute_format_unsupportedThe requested attribute format is not supported.
400attribute_default_unsupportedDefault values cannot be set for array or required attributes.
400attribute_limit_exceededThe maximum number of attributes has been reached.
400attribute_value_invalidThe attribute value is invalid. Please check the type, range and value of the attribute.
400attribute_type_invalidThe attribute type is invalid.
400index_limit_exceededThe maximum number of indexes has been reached.
400index_invalidIndex invalid.
403document_delete_restrictedDocument cannot be deleted because it is referenced by another document.
404execution_not_foundExecution with the requested ID could not be found.
404database_not_foundDatabase not found
404collection_not_foundCollection with the requested ID could not be found.
404document_not_foundDocument with the requested ID could not be found.
404attribute_not_foundAttribute with the requested ID could not be found.
404index_not_foundIndex with the requested ID could not be found.
409database_already_existsDatabase already exists
409collection_already_existsA collection with the requested ID already exists. Try again with a different ID or use unique() to generate a unique ID.
409document_already_existsDocument with the requested ID already exists. Try again with a different ID or use unique() to generate a unique ID.
409document_update_conflictRemote document is newer than local.
409attribute_already_existsAttribute with the requested ID already exists. Try again with a different ID or use unique() to generate a unique ID.
409index_already_existsIndex with the requested ID already exists. Try again with a different ID or use unique() to generate a unique ID.

Storage errors

Errors found when using Appwrite Storage.

CodeTypeDescription
400storage_device_not_foundThe requested storage device could not be found.
400storage_file_emptyEmpty file passed to the endpoint.
400storage_file_type_unsupportedThe given file extension is not supported.
400storage_invalid_file_sizeThe file size is either not valid or exceeds the maximum allowed size. Please check the file or the value of the _APP_STORAGE_LIMIT environment variable.
400storage_invalid_content_rangeThe content range is invalid. Please check the value of the Content-Range header.
400storage_invalid_appwrite_idThe value for x-appwrite-id header is invalid. Please check the value of the x-appwrite-id header is a valid id and not unique().
403storage_invalid_fileThe uploaded file is invalid. Please check the file and try again.
404storage_file_not_foundThe requested file could not be found.
404storage_bucket_not_foundStorage bucket with the requested ID could not be found.
409storage_file_already_existsA storage file with the requested ID already exists.
409storage_bucket_already_existsA storage bucket with the requested ID already exists. Try again with a different ID or use unique() to generate a unique ID.
416storage_invalid_rangeThe requested range is not satisfiable. Please check the value of the Range header.

Functions errors

Errors found when using Appwrite Functions.

CodeTypeDescription
400build_not_readyBuild with the requested ID is building and not ready for execution.
400build_in_progressBuild with the requested ID is already in progress. Please wait before you can retry.
404installation_not_foundInstallation with the requested ID could not be found. Check to see if the ID is correct, or create the installation.
404provider_repository_not_foundVCS (Version Control System) repository with the requested ID could not be found. Check to see if the ID is correct, and if it belongs to installationId you provided.
404repository_not_foundRepository with the requested ID could not be found. Check to see if the ID is correct, or create the repository.
404function_not_foundFunction with the requested ID could not be found.
404function_runtime_unsupportedThe requested runtime is either inactive or unsupported. Please check the value of the _APP_FUNCTIONS_RUNTIMES environment variable.
404function_runtime_unsupportedEntrypoint for your Appwrite Function is missing. Please specify it when making deployment or update the entrypoint under your function's "Settings" > "Configuration" > "Entrypoint".
404build_not_foundBuild with the requested ID could not be found.
404deployment_not_foundDeployment with the requested ID could not be found.
404variable_not_foundVariable with the requested ID could not be found.
409provider_contribution_conflictExternal contribution is already authorized.
409variable_already_existsVariable with the same ID already exists in this project. Try again with a different ID.

Migrations errors

Errors when using Appwrite Migrations.

CodeTypeDescription
404migration_not_foundMigration with the requested ID could not be found. Please verify that the provided ID is correct and try again.
409migration_already_existsMigration with the requested ID already exists. Try again with a different ID.
409migration_in_progressMigration is already in progress. You can check the status of the migration in your Appwrite Console's "Settings" > "Migrations".

Avatars errors

Errors from the Appwrite Avatars API.

CodeTypeDescription
404avatar_set_not_foundThe requested avatar set could not be found.
404avatar_not_foundThe request avatar could not be found.
404avatar_image_not_foundThe requested image was not found at the URL.
404avatar_remote_url_failedFailed to fetch favicon from the requested URL.
404avatar_icon_not_foundThe requested favicon could not be found.

GraphQL errors

Errors from the Appwrite GraphQL API.

CodeTypeDescription
400graphql_no_queryParam "query" is not optional.
400graphql_too_many_queriesToo many queries.