Appwrite Server

Open source backend-as-a-service

appwrite.io/docs/references ↗
Version
1.5.0
OpenAPI
3.0.0
Endpoints
259
Schemas
207
92
Quality
Updated
3 days ago
Backend backend database authentication open-source
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

https://cloud.appwrite.io/v1

Endpoints

Clear filters

Account 9 endpoints

GET /account

Get the currently logged in user.

operationId: Account_getCurrentUser

Responses

200

User

GET /account
GET /account/identities

Get the list of identities for the currently logged in user.

operationId: Account_listIdentities

Parameters

Name In Required Type Description
queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry

Responses

200

Identities List

GET /account/identities
GET /account/logs

Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.

operationId: Account_listLogs

Parameters

Name In Required Type Description
queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Only supported methods are limit and offset

Responses

200

Logs List

GET /account/logs
GET /account/mfa/factors

List the factors available on the account to be used as a MFA challange.

operationId: Account_listMfaFactors

Responses

200

MFAFactors

GET /account/mfa/factors
GET /account/mfa/recovery-codes

Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using createMfaRecoveryCodes method. An OTP challenge is required to read recovery codes.

operationId: Account_getMfaRecoveryCodes

Responses

200

MFA Recovery Codes

GET /account/mfa/recovery-codes
GET /account/prefs

Get the preferences as a key-value object for the currently logged in user.

operationId: Account_getPrefs

Responses

200

Preferences

GET /account/prefs
GET /account/sessions

Get the list of active sessions across different devices for the currently logged in user.

operationId: Account_listSessions

Responses

200

Sessions List

GET /account/sessions
GET /account/sessions/{sessionId}

Use this endpoint to get a logged in user’s session using a Session ID. Inputting ‘current’ will return the current session being used.

operationId: Account_getSessionById

Parameters

Name In Required Type Description
sessionId path required string

Session ID. Use the string ‘current’ to get the current device session.

Responses

200

Session

GET /account/sessions/{sessionId}
GET /account/tokens/oauth2/{provider}

Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL’s back to your app when login is completed.

If authentication succeeds, userId and secret of a token will be appended to the success URL as query parameters. These can be used to create a new session using the Create session endpoint.

A user is limited to 10 active sessions at a time by default. Learn more about session limits.

operationId: Account_createOAuth2Token

Parameters

Name In Required Type Description
provider path required string

OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.

success query optional string

URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project’s platform list are allowed. This requirement helps to prevent an open redirect attack against your project API.

failure query optional string

URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project’s platform list are allowed. This requirement helps to prevent an open redirect attack against your project API.

scopes query optional array

A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.

Responses

default

File

GET /account/tokens/oauth2/{provider}

Avatars 7 endpoints

GET /avatars/browsers/{code}

You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user GET /account/sessions endpoint. Use width, height and quality arguments to change the output settings.

When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.

operationId: Avatars_getBrowserIcon

Parameters

Name In Required Type Description
code path required string

Browser Code.

width query optional integer

Image width. Pass an integer between 0 to 2000. Defaults to 100.

height query optional integer

Image height. Pass an integer between 0 to 2000. Defaults to 100.

quality query optional integer

Image quality. Pass an integer between 0 to 100. Defaults to 100.

Responses

200

Image

GET /avatars/browsers/{code}
GET /avatars/credit-cards/{code}

The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.

When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.

operationId: Avatars_getCreditCardIcon

Parameters

Name In Required Type Description
code path required string

Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.

width query optional integer

Image width. Pass an integer between 0 to 2000. Defaults to 100.

height query optional integer

Image height. Pass an integer between 0 to 2000. Defaults to 100.

quality query optional integer

Image quality. Pass an integer between 0 to 100. Defaults to 100.

Responses

200

Image

GET /avatars/credit-cards/{code}
GET /avatars/favicon

Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.

operationId: Avatars_getFavicon

Parameters

Name In Required Type Description
url query required string

Website URL which you want to fetch the favicon from.

Responses

200

Image

GET /avatars/favicon
GET /avatars/flags/{code}

You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the ISO 3166-1 standard.

When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.

operationId: Avatars_getCountryFlag

Parameters

Name In Required Type Description
code path required string

Country Code. ISO Alpha-2 country code format.

width query optional integer

Image width. Pass an integer between 0 to 2000. Defaults to 100.

height query optional integer

Image height. Pass an integer between 0 to 2000. Defaults to 100.

quality query optional integer

Image quality. Pass an integer between 0 to 100. Defaults to 100.

Responses

200

Image

GET /avatars/flags/{code}
GET /avatars/image

Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.

When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.

operationId: Avatars_getRemoteImage

Parameters

Name In Required Type Description
url query required string

Image URL which you want to crop.

width query optional integer

Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.

height query optional integer

Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.

Responses

200

Image

GET /avatars/image
GET /avatars/initials

Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the ‘name’ parameter. If no name is given and no user is logged, an empty avatar will be returned.

You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user’s initials when reloading the same theme will always return for the same initials.

When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.

operationId: Avatars_getUserInitials

Parameters

Name In Required Type Description
name query optional string

Full Name. When empty, current user name or email will be used. Max length: 128 chars.

width query optional integer

Image width. Pass an integer between 0 to 2000. Defaults to 100.

height query optional integer

Image height. Pass an integer between 0 to 2000. Defaults to 100.

background query optional string

Changes background color. By default a random color will be picked and stay will persistent to the given name.

Responses

200

Image

GET /avatars/initials
GET /avatars/qr

Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.

operationId: Avatars_generateQrCode

Parameters

Name In Required Type Description
text query required string

Plain text to be converted to QR code image.

size query optional integer

QR code size. Pass an integer between 1 to 1000. Defaults to 400.

margin query optional integer

Margin from edge. Pass an integer between 0 to 10. Defaults to 1.

download query optional boolean

Return resulting image with ‘Content-Disposition: attachment ‘ headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.

Responses

200

Image

GET /avatars/qr

Databases 10 endpoints

GET /databases

Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.

operationId: Databases_listAll

Parameters

Name In Required Type Description
queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Databases List

GET /databases
GET /databases/{databaseId}

Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.

operationId: Databases_getById

Parameters

Name In Required Type Description
databaseId path required string

Database ID.

Responses

200

Database

GET /databases/{databaseId}
GET /databases/{databaseId}/collections

Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.

operationId: Databases_listCollections

Parameters

Name In Required Type Description
databaseId path required string

Database ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Collections List

GET /databases/{databaseId}/collections
GET /databases/{databaseId}/collections/{collectionId}

Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.

operationId: Databases_getCollectionById

Parameters

Name In Required Type Description
databaseId path required string

Database ID.

collectionId path required string

Collection ID.

Responses

200

Collection

GET /databases/{databaseId}/collections/{collectionId}
GET /databases/{databaseId}/collections/{collectionId}/attributes

List attributes in the collection.

operationId: Databases_listCollectionAttributes

Parameters

Name In Required Type Description
databaseId path required string

Database ID.

collectionId path required string

Collection ID. You can create a new collection using the Database service server integration.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error

Responses

200

Attributes List

GET /databases/{databaseId}/collections/{collectionId}/attributes
GET /databases/{databaseId}/collections/{collectionId}/attributes/{key}

Get attribute by ID.

operationId: Databases_getAttributeById

Parameters

Name In Required Type Description
databaseId path required string

Database ID.

collectionId path required string

Collection ID. You can create a new collection using the Database service server integration.

key path required string

Attribute Key.

Responses

200

AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString

GET /databases/{databaseId}/collections/{collectionId}/attributes/{key}
GET /databases/{databaseId}/collections/{collectionId}/documents

Get a list of all the user’s documents in a given collection. You can use the query params to filter your results.

operationId: Databases_listCollectionDocuments

Parameters

Name In Required Type Description
databaseId path required string

Database ID.

collectionId path required string

Collection ID. You can create a new collection using the Database service server integration.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.

Responses

200

Documents List

GET /databases/{databaseId}/collections/{collectionId}/documents
GET /databases/{databaseId}/collections/{collectionId}/documents/{documentId}

Get a document by its unique ID. This endpoint response returns a JSON object with the document data.

operationId: Databases_getDocumentById

Parameters

Name In Required Type Description
databaseId path required string

Database ID.

collectionId path required string

Collection ID. You can create a new collection using the Database service server integration.

documentId path required string

Document ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.

Responses

200

Document

GET /databases/{databaseId}/collections/{collectionId}/documents/{documentId}
GET /databases/{databaseId}/collections/{collectionId}/indexes

List indexes in the collection.

operationId: Databases_listIndexes

Parameters

Name In Required Type Description
databaseId path required string

Database ID.

collectionId path required string

Collection ID. You can create a new collection using the Database service server integration.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error

Responses

200

Indexes List

GET /databases/{databaseId}/collections/{collectionId}/indexes
GET /databases/{databaseId}/collections/{collectionId}/indexes/{key}

Get index by ID.

operationId: Databases_getIndexById

Parameters

Name In Required Type Description
databaseId path required string

Database ID.

collectionId path required string

Collection ID. You can create a new collection using the Database service server integration.

key path required string

Index Key.

Responses

200

Index

GET /databases/{databaseId}/collections/{collectionId}/indexes/{key}

Functions 10 endpoints

GET /functions

Get a list of all the project’s functions. You can use the query params to filter your results.

operationId: Functions_listAllFunctions

Parameters

Name In Required Type Description
queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Functions List

GET /functions
GET /functions/runtimes

Get a list of all runtimes that are currently active on your instance.

operationId: Functions_listRuntimes

Responses

200

Runtimes List

GET /functions/runtimes
GET /functions/{functionId}

Get a function by its unique ID.

operationId: Functions_getById

Parameters

Name In Required Type Description
functionId path required string

Function ID.

Responses

200

Function

GET /functions/{functionId}
GET /functions/{functionId}/deployments

Get a list of all the project’s code deployments. You can use the query params to filter your results.

operationId: Functions_listDeployments

Parameters

Name In Required Type Description
functionId path required string

Function ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Deployments List

GET /functions/{functionId}/deployments
GET /functions/{functionId}/deployments/{deploymentId}

Get a code deployment by its unique ID.

operationId: Functions_getDeploymentById

Parameters

Name In Required Type Description
functionId path required string

Function ID.

deploymentId path required string

Deployment ID.

Responses

200

Deployment

GET /functions/{functionId}/deployments/{deploymentId}
GET /functions/{functionId}/deployments/{deploymentId}/download

Get a Deployment’s contents by its unique ID. This endpoint supports range requests for partial or streaming file download.

operationId: Functions_getDeploymentContents

Parameters

Name In Required Type Description
functionId path required string

Function ID.

deploymentId path required string

Deployment ID.

Responses

200

File

GET /functions/{functionId}/deployments/{deploymentId}/download
GET /functions/{functionId}/executions

Get a list of all the current user function execution logs. You can use the query params to filter your results.

operationId: Functions_listExecutions

Parameters

Name In Required Type Description
functionId path required string

Function ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Executions List

GET /functions/{functionId}/executions
GET /functions/{functionId}/executions/{executionId}

Get a function execution log by its unique ID.

operationId: Functions_getExecutionLog

Parameters

Name In Required Type Description
functionId path required string

Function ID.

executionId path required string

Execution ID.

Responses

200

Execution

GET /functions/{functionId}/executions/{executionId}
GET /functions/{functionId}/variables

Get a list of all variables of a specific function.

operationId: Functions_listVariables

Parameters

Name In Required Type Description
functionId path required string

Function unique ID.

Responses

200

Variables List

GET /functions/{functionId}/variables
GET /functions/{functionId}/variables/{variableId}

Get a variable by its unique ID.

operationId: Functions_getVariableById

Parameters

Name In Required Type Description
functionId path required string

Function unique ID.

variableId path required string

Variable unique ID.

Responses

200

Variable

GET /functions/{functionId}/variables/{variableId}

Health 23 endpoints

GET /health

Check the Appwrite HTTP server is up and responsive.

operationId: Health_checkServerStatus

Responses

200

Health Status

GET /health
GET /health/anti-virus

Check the Appwrite Antivirus server is up and connection is successful.

operationId: Health_checkAntivirusStatus

Responses

200

Health Antivirus

GET /health/anti-virus
GET /health/cache

Check the Appwrite in-memory cache servers are up and connection is successful.

operationId: Health_checkCacheStatus

Responses

200

Health Status

GET /health/cache
GET /health/certificate

Get the SSL certificate for a domain

operationId: Health_getSslCert

Parameters

Name In Required Type Description
domain query optional string

string

Responses

200

Health Certificate

GET /health/certificate
GET /health/db

Check the Appwrite database servers are up and connection is successful.

operationId: Health_checkDbStatus

Responses

200

Health Status

GET /health/db
GET /health/pubsub

Check the Appwrite pub-sub servers are up and connection is successful.

operationId: Health_checkPubsubServerStatus

Responses

200

Health Status

GET /health/pubsub
GET /health/queue

Check the Appwrite queue messaging servers are up and connection is successful.

operationId: Health_getQueueStatus

Responses

200

Health Status

GET /health/queue
GET /health/queue/builds

Get the number of builds that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getBuildsQueue

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/builds
GET /health/queue/certificates

Get the number of certificates that are waiting to be issued against Letsencrypt in the Appwrite internal queue server.

operationId: Health_queueCertificatesGet

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/certificates
GET /health/queue/databases

Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getDatabasesQueue

Parameters

Name In Required Type Description
name query optional string

Queue name for which to check the queue size

threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/databases
GET /health/queue/deletes

Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getDeletesQueue

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/deletes
GET /health/queue/failed/{name}

Returns the amount of failed jobs in a given queue.

operationId: Health_getFailedJobs

Parameters

Name In Required Type Description
name path required string

The name of the queue

threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/failed/{name}
GET /health/queue/functions

Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_functionsQueueCount

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/functions
GET /health/queue/logs

Get the number of logs that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getQueueLogs

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/logs
GET /health/queue/mails

Get the number of mails that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getMailQueueSize

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/mails
GET /health/queue/messaging

Get the number of messages that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getQueueMessaging

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/messaging
GET /health/queue/migrations

Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getMigrationsQueue

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/migrations
GET /health/queue/usage

Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getQueueUsage

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/usage
GET /health/queue/usage-dump

Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getQueueUsageDump

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/usage-dump
GET /health/queue/webhooks

Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getWebhooksQueue

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/webhooks
GET /health/storage

Check the Appwrite storage device is up and connection is successful.

operationId: Health_checkStorageStatus

Responses

200

Health Status

GET /health/storage
GET /health/storage/local

Check the Appwrite local storage device is up and connection is successful.

operationId: Health_checkLocalStorageStatus

Responses

200

Health Status

GET /health/storage/local
GET /health/time

Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The Network Time Protocol (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.

operationId: Health_getTimeInformation

Responses

200

Health Time

GET /health/time

Locale 8 endpoints

GET /locale

Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.

(IP Geolocation by DB-IP)

operationId: Locale_getUserLocaleData

Responses

200

Locale

GET /locale
GET /locale/codes

List of all locale codes in ISO 639-1.

operationId: Locale_listCodes

Responses

200

Locale codes list

GET /locale/codes
GET /locale/continents

List of all continents. You can use the locale header to get the data in a supported language.

operationId: Locale_listContinents

Responses

200

Continents List

GET /locale/continents
GET /locale/countries

List of all countries. You can use the locale header to get the data in a supported language.

operationId: Locale_listCountries

Responses

200

Countries List

GET /locale/countries
GET /locale/countries/eu

List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.

operationId: Locale_listEuCountries

Responses

200

Countries List

GET /locale/countries/eu
GET /locale/countries/phones

List of all countries phone codes. You can use the locale header to get the data in a supported language.

operationId: Locale_listPhoneCodes

Responses

200

Phones List

GET /locale/countries/phones
GET /locale/currencies

List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.

operationId: Locale_listCurrenciesData

Responses

200

Currencies List

GET /locale/currencies
GET /locale/languages

List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.

operationId: Locale_getLanguageList

Responses

200

Languages List

GET /locale/languages

Messaging 13 endpoints

GET /messaging/messages

Get a list of all messages from the current Appwrite project.

operationId: Messaging_listMessages

Parameters

Name In Required Type Description
queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Message list

GET /messaging/messages
GET /messaging/messages/{messageId}

Get a message by its unique ID.

operationId: Messaging_getMessageById

Parameters

Name In Required Type Description
messageId path required string

Message ID.

Responses

200

Message

GET /messaging/messages/{messageId}
GET /messaging/messages/{messageId}/logs

Get the message activity logs listed by its unique ID.

operationId: Messaging_getMessageLogs

Parameters

Name In Required Type Description
messageId path required string

Message ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Only supported methods are limit and offset

Responses

200

Logs List

GET /messaging/messages/{messageId}/logs
GET /messaging/messages/{messageId}/targets

Get a list of the targets associated with a message.

operationId: Messaging_listMessageTargets

Parameters

Name In Required Type Description
messageId path required string

Message ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType

Responses

200

Target list

GET /messaging/messages/{messageId}/targets
GET /messaging/providers

Get a list of all providers from the current Appwrite project.

operationId: Messaging_listProviders

Parameters

Name In Required Type Description
queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Provider list

GET /messaging/providers
GET /messaging/providers/{providerId}

Get a provider by its unique ID.

operationId: Messaging_getProviderById

Parameters

Name In Required Type Description
providerId path required string

Provider ID.

Responses

200

Provider

GET /messaging/providers/{providerId}
GET /messaging/providers/{providerId}/logs

Get the provider activity logs listed by its unique ID.

operationId: Messaging_listProviderLogs

Parameters

Name In Required Type Description
providerId path required string

Provider ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Only supported methods are limit and offset

Responses

200

Logs List

GET /messaging/providers/{providerId}/logs
GET /messaging/subscribers/{subscriberId}/logs

Get the subscriber activity logs listed by its unique ID.

operationId: Messaging_listSubscriberLogs

Parameters

Name In Required Type Description
subscriberId path required string

Subscriber ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Only supported methods are limit and offset

Responses

200

Logs List

GET /messaging/subscribers/{subscriberId}/logs
GET /messaging/topics

Get a list of all topics from the current Appwrite project.

operationId: Messaging_listTopics

Parameters

Name In Required Type Description
queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Topic list

GET /messaging/topics
GET /messaging/topics/{topicId}

Get a topic by its unique ID.

operationId: Messaging_getTopicById

Parameters

Name In Required Type Description
topicId path required string

Topic ID.

Responses

200

Topic

GET /messaging/topics/{topicId}
GET /messaging/topics/{topicId}/logs

Get the topic activity logs listed by its unique ID.

operationId: Messaging_listTopicLogs

Parameters

Name In Required Type Description
topicId path required string

Topic ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Only supported methods are limit and offset

Responses

200

Logs List

GET /messaging/topics/{topicId}/logs
GET /messaging/topics/{topicId}/subscribers

Get a list of all subscribers from the current Appwrite project.

operationId: Messaging_listSubscribers

Parameters

Name In Required Type Description
topicId path required string

Topic ID. The topic ID subscribed to.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Subscriber list

GET /messaging/topics/{topicId}/subscribers
GET /messaging/topics/{topicId}/subscribers/{subscriberId}

Get a subscriber by its unique ID.

operationId: Messaging_getSubscriberById

Parameters

Name In Required Type Description
topicId path required string

Topic ID. The topic ID subscribed to.

subscriberId path required string

Subscriber ID.

Responses

200

Subscriber

GET /messaging/topics/{topicId}/subscribers/{subscriberId}

Storage 7 endpoints

GET /storage/buckets

Get a list of all the storage buckets. You can use the query params to filter your results.

operationId: Storage_listBuckets

Parameters

Name In Required Type Description
queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Buckets List

GET /storage/buckets
GET /storage/buckets/{bucketId}

Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.

operationId: Storage_getBucketById

Parameters

Name In Required Type Description
bucketId path required string

Bucket unique ID.

Responses

200

Bucket

GET /storage/buckets/{bucketId}
GET /storage/buckets/{bucketId}/files

Get a list of all the user files. You can use the query params to filter your results.

operationId: Storage_listFiles

Parameters

Name In Required Type Description
bucketId path required string

Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Files List

GET /storage/buckets/{bucketId}/files
GET /storage/buckets/{bucketId}/files/{fileId}

Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.

operationId: Storage_getFileById

Parameters

Name In Required Type Description
bucketId path required string

Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration.

fileId path required string

File ID.

Responses

200

File

GET /storage/buckets/{bucketId}/files/{fileId}
GET /storage/buckets/{bucketId}/files/{fileId}/download

Get a file content by its unique ID. The endpoint response return with a ‘Content-Disposition: attachment’ header that tells the browser to start downloading the file to user downloads directory.

operationId: Storage_getFileDownload

Parameters

Name In Required Type Description
bucketId path required string

Storage bucket ID. You can create a new storage bucket using the Storage service server integration.

fileId path required string

File ID.

Responses

200

File

GET /storage/buckets/{bucketId}/files/{fileId}/download
GET /storage/buckets/{bucketId}/files/{fileId}/preview

Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.

operationId: Storage_getFilePreviewImage

Parameters

Name In Required Type Description
bucketId path required string

Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration.

fileId path required string

File ID

width query optional integer

Resize preview image width, Pass an integer between 0 to 4000.

height query optional integer

Resize preview image height, Pass an integer between 0 to 4000.

gravity query optional string

Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right

quality query optional integer

Preview image quality. Pass an integer between 0 to 100. Defaults to 100.

borderWidth query optional integer

Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.

borderColor query optional string

Preview image border color. Use a valid HEX color, no # is needed for prefix.

borderRadius query optional integer

Preview image border radius in pixels. Pass an integer between 0 to 4000.

opacity query optional number

Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.

rotation query optional integer

Preview image rotation in degrees. Pass an integer between -360 and 360.

background query optional string

Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.

output query optional string

Output format type (jpeg, jpg, png, gif and webp).

Responses

200

Image

GET /storage/buckets/{bucketId}/files/{fileId}/preview
GET /storage/buckets/{bucketId}/files/{fileId}/view

Get a file content by its unique ID. This endpoint is similar to the download method but returns with no ‘Content-Disposition: attachment’ header.

operationId: Storage_getFileView

Parameters

Name In Required Type Description
bucketId path required string

Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration.

fileId path required string

File ID.

Responses

200

File

GET /storage/buckets/{bucketId}/files/{fileId}/view

Teams 5 endpoints

GET /teams

Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.

operationId: Teams_getUserTeams

Parameters

Name In Required Type Description
queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Teams List

GET /teams
GET /teams/{teamId}

Get a team by its ID. All team members have read access for this resource.

operationId: Teams_getById

Parameters

Name In Required Type Description
teamId path required string

Team ID.

Responses

200

Team

GET /teams/{teamId}
GET /teams/{teamId}/memberships

Use this endpoint to list a team’s members using the team’s ID. All team members have read access to this endpoint.

operationId: Teams_listMemberships

Parameters

Name In Required Type Description
teamId path required string

Team ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Memberships List

GET /teams/{teamId}/memberships
GET /teams/{teamId}/memberships/{membershipId}

Get a team member by the membership unique id. All team members have read access for this resource.

operationId: Teams_getMembership

Parameters

Name In Required Type Description
teamId path required string

Team ID.

membershipId path required string

Membership ID.

Responses

200

Membership

GET /teams/{teamId}/memberships/{membershipId}
GET /teams/{teamId}/prefs

Get the team’s shared preferences by its unique ID. If a preference doesn’t need to be shared by all team members, prefer storing them in user preferences.

operationId: Teams_getPrefsById

Parameters

Name In Required Type Description
teamId path required string

Team ID.

Responses

200

Preferences

GET /teams/{teamId}/prefs

Users 11 endpoints

GET /users

Get a list of all the project’s users. You can use the query params to filter your results.

operationId: Users_listAll

Parameters

Name In Required Type Description
queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Users List

GET /users
GET /users/identities

Get identities for all users.

operationId: Users_listIdentities

Parameters

Name In Required Type Description
queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Identities List

GET /users/identities
GET /users/{userId}

Get a user by its unique ID.

operationId: Users_getById

Parameters

Name In Required Type Description
userId path required string

User ID.

Responses

200

User

GET /users/{userId}
GET /users/{userId}/logs

Get the user activity logs list by its unique ID.

operationId: Users_listUserLogs

Parameters

Name In Required Type Description
userId path required string

User ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Only supported methods are limit and offset

Responses

200

Logs List

GET /users/{userId}/logs
GET /users/{userId}/memberships

Get the user membership list by its unique ID.

operationId: Users_listMemberships

Parameters

Name In Required Type Description
userId path required string

User ID.

Responses

200

Memberships List

GET /users/{userId}/memberships
GET /users/{userId}/mfa/factors

List the factors available on the account to be used as a MFA challange.

operationId: Users_listFactors

Parameters

Name In Required Type Description
userId path required string

User ID.

Responses

200

MFAFactors

GET /users/{userId}/mfa/factors
GET /users/{userId}/mfa/recovery-codes

Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using createMfaRecoveryCodes method.

operationId: Users_getMfaRecoveryCodes

Parameters

Name In Required Type Description
userId path required string

User ID.

Responses

200

MFA Recovery Codes

GET /users/{userId}/mfa/recovery-codes
GET /users/{userId}/prefs

Get the user preferences by its unique ID.

operationId: Users_getUserPrefs

Parameters

Name In Required Type Description
userId path required string

User ID.

Responses

200

Preferences

GET /users/{userId}/prefs
GET /users/{userId}/sessions

Get the user sessions list by its unique ID.

operationId: Users_listSessions

Parameters

Name In Required Type Description
userId path required string

User ID.

Responses

200

Sessions List

GET /users/{userId}/sessions
GET /users/{userId}/targets

List the messaging targets that are associated with a user.

operationId: Users_listTargets

Parameters

Name In Required Type Description
userId path required string

User ID.

queries query optional array

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels

Responses

200

Target list

GET /users/{userId}/targets
GET /users/{userId}/targets/{targetId}

Get a user’s push notification target by ID.

operationId: Users_getUserTargetById

Parameters

Name In Required Type Description
userId path required string

User ID.

targetId path required string

Target ID.

Responses

200

Target

GET /users/{userId}/targets/{targetId}

Schemas

object AccountBeginMfaVerificationRequest
{
  "type": "object",
  "required": [
    "factor"
  ],
  "properties": {
    "factor": {
      "enum": [
        "email",
        "phone",
        "totp",
        "recoverycode"
      ],
      "type": "string",
      "x-example": "email",
      "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.",
      "x-enum-keys": [],
      "x-enum-name": "AuthenticationFactor"
    }
  }
}
object AccountCompleteEmailVerificationRequest
{
  "type": "object",
  "required": [
    "userId",
    "secret"
  ],
  "properties": {
    "secret": {
      "type": "string",
      "x-example": "<SECRET>",
      "description": "Valid verification token."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "User ID."
    }
  }
}
object AccountCompleteMfaChallengeRequest
{
  "type": "object",
  "required": [
    "challengeId",
    "otp"
  ],
  "properties": {
    "otp": {
      "type": "string",
      "x-example": "<OTP>",
      "description": "Valid verification token."
    },
    "challengeId": {
      "type": "string",
      "x-example": "<CHALLENGE_ID>",
      "description": "ID of the challenge."
    }
  }
}
object AccountCompletePasswordRecoveryRequest
{
  "type": "object",
  "required": [
    "userId",
    "secret",
    "password"
  ],
  "properties": {
    "secret": {
      "type": "string",
      "x-example": "<SECRET>",
      "description": "Valid reset token."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "User ID."
    },
    "password": {
      "type": "string",
      "x-example": null,
      "description": "New user password. Must be between 8 and 256 chars."
    }
  }
}
object AccountConfirmPhoneVerificationRequest
{
  "type": "object",
  "required": [
    "userId",
    "secret"
  ],
  "properties": {
    "secret": {
      "type": "string",
      "x-example": "<SECRET>",
      "description": "Valid verification token."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "User ID."
    }
  }
}
object AccountCreateEmailPasswordSessionRequest
{
  "type": "object",
  "required": [
    "email",
    "password"
  ],
  "properties": {
    "email": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "User email."
    },
    "password": {
      "type": "string",
      "x-example": "password",
      "description": "User password. Must be at least 8 chars."
    }
  }
}
object AccountCreateEmailTokenRequest
{
  "type": "object",
  "required": [
    "userId",
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "User email."
    },
    "phrase": {
      "type": "boolean",
      "x-example": false,
      "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
    }
  }
}
object AccountCreateEmailVerificationRequest
{
  "type": "object",
  "required": [
    "url"
  ],
  "properties": {
    "url": {
      "type": "string",
      "x-example": "https://example.com",
      "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API."
    }
  }
}
object AccountCreateMagicUrlTokenRequest
{
  "type": "object",
  "required": [
    "userId",
    "email"
  ],
  "properties": {
    "url": {
      "type": "string",
      "x-example": "https://example.com",
      "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API."
    },
    "email": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "User email."
    },
    "phrase": {
      "type": "boolean",
      "x-example": false,
      "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
    }
  }
}
object AccountCreateNewUserRequest
{
  "type": "object",
  "required": [
    "userId",
    "email",
    "password"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "User name. Max length: 128 chars."
    },
    "email": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "User email."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
    },
    "password": {
      "type": "string",
      "x-example": null,
      "description": "New user password. Must be between 8 and 256 chars."
    }
  }
}
object AccountCreatePasswordRecoveryRequest
{
  "type": "object",
  "required": [
    "email",
    "url"
  ],
  "properties": {
    "url": {
      "type": "string",
      "x-example": "https://example.com",
      "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API."
    },
    "email": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "User email."
    }
  }
}
object AccountCreatePhoneTokenRequest
{
  "type": "object",
  "required": [
    "userId",
    "phone"
  ],
  "properties": {
    "phone": {
      "type": "string",
      "x-example": "+12065550100",
      "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
    }
  }
}
object AccountCreateTokenSessionRequest
{
  "type": "object",
  "required": [
    "userId",
    "secret"
  ],
  "properties": {
    "secret": {
      "type": "string",
      "x-example": "<SECRET>",
      "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
    }
  }
}
object AccountDeleteAuthenticatorByIdRequest
{
  "type": "object",
  "required": [
    "otp"
  ],
  "properties": {
    "otp": {
      "type": "string",
      "x-example": "<OTP>",
      "description": "Valid verification token."
    }
  }
}
object AccountUpdateEmailAddressRequest
{
  "type": "object",
  "required": [
    "email",
    "password"
  ],
  "properties": {
    "email": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "User email."
    },
    "password": {
      "type": "string",
      "x-example": "password",
      "description": "User password. Must be at least 8 chars."
    }
  }
}
object AccountUpdateMagicUrlSessionRequest
{
  "type": "object",
  "required": [
    "userId",
    "secret"
  ],
  "properties": {
    "secret": {
      "type": "string",
      "x-example": "<SECRET>",
      "description": "Valid verification token."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
    }
  }
}
object AccountUpdateMfaStatusRequest
{
  "type": "object",
  "required": [
    "mfa"
  ],
  "properties": {
    "mfa": {
      "type": "boolean",
      "x-example": false,
      "description": "Enable or disable MFA."
    }
  }
}
object AccountUpdateNameOperationRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "User name. Max length: 128 chars."
    }
  }
}
object AccountUpdatePasswordOperationRequest
{
  "type": "object",
  "required": [
    "password"
  ],
  "properties": {
    "password": {
      "type": "string",
      "x-example": null,
      "description": "New user password. Must be at least 8 chars."
    },
    "oldPassword": {
      "type": "string",
      "x-example": "password",
      "description": "Current user password. Must be at least 8 chars."
    }
  }
}
object AccountUpdatePhoneRequest
{
  "type": "object",
  "required": [
    "phone",
    "password"
  ],
  "properties": {
    "phone": {
      "type": "string",
      "x-example": "+12065550100",
      "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212."
    },
    "password": {
      "type": "string",
      "x-example": "password",
      "description": "User password. Must be at least 8 chars."
    }
  }
}
object AccountUpdatePhoneSessionRequest
{
  "type": "object",
  "required": [
    "userId",
    "secret"
  ],
  "properties": {
    "secret": {
      "type": "string",
      "x-example": "<SECRET>",
      "description": "Valid verification token."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
    }
  }
}
object AccountUpdatePreferencesRequest
{
  "type": "object",
  "required": [
    "prefs"
  ],
  "properties": {
    "prefs": {
      "type": "object",
      "x-example": "{}",
      "description": "Prefs key-value JSON object."
    }
  }
}
object AccountVerifyAuthenticatorRequest
{
  "type": "object",
  "required": [
    "otp"
  ],
  "properties": {
    "otp": {
      "type": "string",
      "x-example": "<OTP>",
      "description": "Valid verification token."
    }
  }
}
object DatabasesCreateBooleanAttributeRequest
{
  "type": "object",
  "required": [
    "key",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": null,
      "description": "Attribute Key."
    },
    "array": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "default": {
      "type": "boolean",
      "x-example": false,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesCreateCollectionRequest
{
  "type": "object",
  "required": [
    "collectionId",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Collection name. Max length: 128 chars."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled."
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "[\"read(\"any\")\"]",
      "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    },
    "collectionId": {
      "type": "string",
      "x-example": "<COLLECTION_ID>",
      "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
    },
    "documentSecurity": {
      "type": "boolean",
      "x-example": false,
      "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    }
  }
}
object DatabasesCreateDatabaseRequest
{
  "type": "object",
  "required": [
    "databaseId",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Database name. Max length: 128 chars."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled."
    },
    "databaseId": {
      "type": "string",
      "x-example": "<DATABASE_ID>",
      "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
    }
  }
}
object DatabasesCreateDatetimeAttributeRequest
{
  "type": "object",
  "required": [
    "key",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": null,
      "description": "Attribute Key."
    },
    "array": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "default": {
      "type": "string",
      "x-example": null,
      "description": "Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesCreateDocumentRequest
{
  "type": "object",
  "required": [
    "documentId",
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "x-example": "{}",
      "description": "Document data as JSON object."
    },
    "documentId": {
      "type": "string",
      "x-example": "<DOCUMENT_ID>",
      "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "[\"read(\"any\")\"]",
      "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    }
  }
}
object DatabasesCreateEmailAttributeRequest
{
  "type": "object",
  "required": [
    "key",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": null,
      "description": "Attribute Key."
    },
    "array": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "default": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesCreateEnumAttributeRequest
{
  "type": "object",
  "required": [
    "key",
    "elements",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": null,
      "description": "Attribute Key."
    },
    "array": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "default": {
      "type": "string",
      "x-example": "<DEFAULT>",
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "elements": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesCreateFloatAttributeRequest
{
  "type": "object",
  "required": [
    "key",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": null,
      "description": "Attribute Key."
    },
    "max": {
      "type": "number",
      "x-example": null,
      "description": "Maximum value to enforce on new documents"
    },
    "min": {
      "type": "number",
      "x-example": null,
      "description": "Minimum value to enforce on new documents"
    },
    "array": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "default": {
      "type": "number",
      "x-example": null,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesCreateIndexRequest
{
  "type": "object",
  "required": [
    "key",
    "type",
    "attributes"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": null,
      "description": "Index Key."
    },
    "type": {
      "enum": [
        "key",
        "fulltext",
        "unique"
      ],
      "type": "string",
      "x-example": "key",
      "description": "Index type.",
      "x-enum-keys": [],
      "x-enum-name": "IndexType"
    },
    "orders": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of index orders. Maximum of 100 orders are allowed."
    },
    "attributes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long."
    }
  }
}
object DatabasesCreateIntegerAttributeRequest
{
  "type": "object",
  "required": [
    "key",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": null,
      "description": "Attribute Key."
    },
    "max": {
      "type": "integer",
      "x-example": null,
      "description": "Maximum value to enforce on new documents"
    },
    "min": {
      "type": "integer",
      "x-example": null,
      "description": "Minimum value to enforce on new documents"
    },
    "array": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "default": {
      "type": "integer",
      "x-example": null,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesCreateIpAttributeRequest
{
  "type": "object",
  "required": [
    "key",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": null,
      "description": "Attribute Key."
    },
    "array": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "default": {
      "type": "string",
      "x-example": null,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesCreateRelationshipAttributeRequest
{
  "type": "object",
  "required": [
    "relatedCollectionId",
    "type"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": null,
      "description": "Attribute Key."
    },
    "type": {
      "enum": [
        "oneToOne",
        "manyToOne",
        "manyToMany",
        "oneToMany"
      ],
      "type": "string",
      "x-example": "oneToOne",
      "description": "Relation type",
      "x-enum-keys": [],
      "x-enum-name": "RelationshipType"
    },
    "twoWay": {
      "type": "boolean",
      "x-example": false,
      "description": "Is Two Way?"
    },
    "onDelete": {
      "enum": [
        "cascade",
        "restrict",
        "setNull"
      ],
      "type": "string",
      "x-example": "cascade",
      "description": "Constraints option",
      "x-enum-keys": [],
      "x-enum-name": "RelationMutate"
    },
    "twoWayKey": {
      "type": "string",
      "x-example": null,
      "description": "Two Way Attribute Key."
    },
    "relatedCollectionId": {
      "type": "string",
      "x-example": "<RELATED_COLLECTION_ID>",
      "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)."
    }
  }
}
object DatabasesCreateStringAttributeRequest
{
  "type": "object",
  "required": [
    "key",
    "size",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": null,
      "description": "Attribute Key."
    },
    "size": {
      "type": "integer",
      "x-example": 1,
      "description": "Attribute size for text attributes, in number of characters."
    },
    "array": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "default": {
      "type": "string",
      "x-example": "<DEFAULT>",
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "encrypt": {
      "type": "boolean",
      "x-example": false,
      "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesCreateUrlAttributeRequest
{
  "type": "object",
  "required": [
    "key",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": null,
      "description": "Attribute Key."
    },
    "array": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "default": {
      "type": "string",
      "x-example": "https://example.com",
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesGetAttributeByIdResponse
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/attributeBoolean"
    },
    {
      "$ref": "#/components/schemas/attributeInteger"
    },
    {
      "$ref": "#/components/schemas/attributeFloat"
    },
    {
      "$ref": "#/components/schemas/attributeEmail"
    },
    {
      "$ref": "#/components/schemas/attributeEnum"
    },
    {
      "$ref": "#/components/schemas/attributeUrl"
    },
    {
      "$ref": "#/components/schemas/attributeIp"
    },
    {
      "$ref": "#/components/schemas/attributeDatetime"
    },
    {
      "$ref": "#/components/schemas/attributeRelationship"
    },
    {
      "$ref": "#/components/schemas/attributeString"
    }
  ]
}
object DatabasesUpdateBooleanAttributeRequest
{
  "type": "object",
  "required": [
    "required",
    "default"
  ],
  "properties": {
    "default": {
      "type": "boolean",
      "x-example": false,
      "x-nullable": true,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesUpdateByIdRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Database name. Max length: 128 chars."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled."
    }
  }
}
object DatabasesUpdateCollectionByIdRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Collection name. Max length: 128 chars."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled."
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "[\"read(\"any\")\"]",
      "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    },
    "documentSecurity": {
      "type": "boolean",
      "x-example": false,
      "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    }
  }
}
object DatabasesUpdateDatetimeAttributeRequest
{
  "type": "object",
  "required": [
    "required",
    "default"
  ],
  "properties": {
    "default": {
      "type": "string",
      "x-example": null,
      "x-nullable": true,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesUpdateDocumentByIdRequest
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "x-example": "{}",
      "description": "Document data as JSON object. Include only attribute and value pairs to be updated."
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "[\"read(\"any\")\"]",
      "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    }
  }
}
object DatabasesUpdateEmailAttributeRequest
{
  "type": "object",
  "required": [
    "required",
    "default"
  ],
  "properties": {
    "default": {
      "type": "string",
      "x-example": "email@example.com",
      "x-nullable": true,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesUpdateEnumAttributeRequest
{
  "type": "object",
  "required": [
    "elements",
    "required",
    "default"
  ],
  "properties": {
    "default": {
      "type": "string",
      "x-example": "<DEFAULT>",
      "x-nullable": true,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "elements": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesUpdateFloatAttributeRequest
{
  "type": "object",
  "required": [
    "required",
    "min",
    "max",
    "default"
  ],
  "properties": {
    "max": {
      "type": "number",
      "x-example": null,
      "description": "Maximum value to enforce on new documents"
    },
    "min": {
      "type": "number",
      "x-example": null,
      "description": "Minimum value to enforce on new documents"
    },
    "default": {
      "type": "number",
      "x-example": null,
      "x-nullable": true,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesUpdateIntegerAttributeRequest
{
  "type": "object",
  "required": [
    "required",
    "min",
    "max",
    "default"
  ],
  "properties": {
    "max": {
      "type": "integer",
      "x-example": null,
      "description": "Maximum value to enforce on new documents"
    },
    "min": {
      "type": "integer",
      "x-example": null,
      "description": "Minimum value to enforce on new documents"
    },
    "default": {
      "type": "integer",
      "x-example": null,
      "x-nullable": true,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesUpdateIpAttributeRequest
{
  "type": "object",
  "required": [
    "required",
    "default"
  ],
  "properties": {
    "default": {
      "type": "string",
      "x-example": null,
      "x-nullable": true,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}
object DatabasesUpdateRelationshipAttributeRequest
{
  "type": "object",
  "properties": {
    "onDelete": {
      "enum": [
        "cascade",
        "restrict",
        "setNull"
      ],
      "type": "string",
      "x-example": "cascade",
      "description": "Constraints option",
      "x-enum-keys": [],
      "x-enum-name": "RelationMutate"
    }
  }
}
object DatabasesUpdateStringAttributeRequest
{
  "type": "object",
  "required": [
    "required",
    "default"
  ],
  "properties": {
    "default": {
      "type": "string",
      "x-example": "<DEFAULT>",
      "x-nullable": true,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": false,
      "description": "Is attribute required?"
    }
  }
}