Query structured spec data via REST or MCP. Get exactly what your agent needs.
https://cloud.appwrite.io/v1
/account
Get the currently logged in user.
User
GET /account
/account/identities
Get the list of identities for the currently logged in user.
| 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 |
Identities List
GET /account/identities
/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.
| 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 |
Logs List
GET /account/logs
/account/mfa/factors
List the factors available on the account to be used as a MFA challange.
MFAFactors
GET /account/mfa/factors
/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.
MFA Recovery Codes
GET /account/mfa/recovery-codes
/account/prefs
Get the preferences as a key-value object for the currently logged in user.
Preferences
GET /account/prefs
/account/sessions
Get the list of active sessions across different devices for the currently logged in user.
Sessions List
GET /account/sessions
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sessionId | path | required | string | Session ID. Use the string ‘current’ to get the current device session. |
Session
GET /account/sessions/{sessionId}
/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.
| 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. |
File
GET /account/tokens/oauth2/{provider}
/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.
| 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. |
Image
GET /avatars/browsers/{code}
/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.
| 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. |
Image
GET /avatars/credit-cards/{code}
/avatars/favicon
Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| url | query | required | string | Website URL which you want to fetch the favicon from. |
Image
GET /avatars/favicon
/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.
| 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. |
Image
GET /avatars/flags/{code}
/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.
| 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. |
Image
GET /avatars/image
/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.
| 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. |
Image
GET /avatars/initials
/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.
| 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. |
Image
GET /avatars/qr
/databases
Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
| 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. |
Databases List
GET /databases
/databases/{databaseId}
Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| databaseId | path | required | string | Database ID. |
Database
GET /databases/{databaseId}
/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.
| 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. |
Collections List
GET /databases/{databaseId}/collections
/databases/{databaseId}/collections/{collectionId}
Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| databaseId | path | required | string | Database ID. |
| collectionId | path | required | string | Collection ID. |
Collection
GET /databases/{databaseId}/collections/{collectionId}
/databases/{databaseId}/collections/{collectionId}/attributes
List attributes in the collection.
| 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 |
Attributes List
GET /databases/{databaseId}/collections/{collectionId}/attributes
/databases/{databaseId}/collections/{collectionId}/attributes/{key}
Get attribute by ID.
| 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. |
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}
/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.
| 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. |
Documents List
GET /databases/{databaseId}/collections/{collectionId}/documents
/databases/{databaseId}/collections/{collectionId}/documents/{documentId}
Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
| 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. |
Document
GET /databases/{databaseId}/collections/{collectionId}/documents/{documentId}
/databases/{databaseId}/collections/{collectionId}/indexes
List indexes in the collection.
| 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 |
Indexes List
GET /databases/{databaseId}/collections/{collectionId}/indexes
/databases/{databaseId}/collections/{collectionId}/indexes/{key}
Get index by ID.
| 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. |
Index
GET /databases/{databaseId}/collections/{collectionId}/indexes/{key}
/functions
Get a list of all the project’s functions. You can use the query params to filter your results.
| 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. |
Functions List
GET /functions
/functions/runtimes
Get a list of all runtimes that are currently active on your instance.
Runtimes List
GET /functions/runtimes
/functions/{functionId}
Get a function by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| functionId | path | required | string | Function ID. |
Function
GET /functions/{functionId}
/functions/{functionId}/deployments
Get a list of all the project’s code deployments. You can use the query params to filter your results.
| 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. |
Deployments List
GET /functions/{functionId}/deployments
/functions/{functionId}/deployments/{deploymentId}
Get a code deployment by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| functionId | path | required | string | Function ID. |
| deploymentId | path | required | string | Deployment ID. |
Deployment
GET /functions/{functionId}/deployments/{deploymentId}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| functionId | path | required | string | Function ID. |
| deploymentId | path | required | string | Deployment ID. |
File
GET /functions/{functionId}/deployments/{deploymentId}/download
/functions/{functionId}/executions
Get a list of all the current user function execution logs. You can use the query params to filter your results.
| 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. |
Executions List
GET /functions/{functionId}/executions
/functions/{functionId}/executions/{executionId}
Get a function execution log by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| functionId | path | required | string | Function ID. |
| executionId | path | required | string | Execution ID. |
Execution
GET /functions/{functionId}/executions/{executionId}
/functions/{functionId}/variables
Get a list of all variables of a specific function.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| functionId | path | required | string | Function unique ID. |
Variables List
GET /functions/{functionId}/variables
/functions/{functionId}/variables/{variableId}
Get a variable by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| functionId | path | required | string | Function unique ID. |
| variableId | path | required | string | Variable unique ID. |
Variable
GET /functions/{functionId}/variables/{variableId}
/health
Check the Appwrite HTTP server is up and responsive.
Health Status
GET /health
/health/anti-virus
Check the Appwrite Antivirus server is up and connection is successful.
Health Antivirus
GET /health/anti-virus
/health/cache
Check the Appwrite in-memory cache servers are up and connection is successful.
Health Status
GET /health/cache
/health/certificate
Get the SSL certificate for a domain
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| domain | query | optional | string | string |
Health Certificate
GET /health/certificate
/health/db
Check the Appwrite database servers are up and connection is successful.
Health Status
GET /health/db
/health/pubsub
Check the Appwrite pub-sub servers are up and connection is successful.
Health Status
GET /health/pubsub
/health/queue
Check the Appwrite queue messaging servers are up and connection is successful.
Health Status
GET /health/queue
/health/queue/builds
Get the number of builds that are waiting to be processed in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/builds
/health/queue/certificates
Get the number of certificates that are waiting to be issued against Letsencrypt in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/certificates
/health/queue/databases
Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/databases
/health/queue/deletes
Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/deletes
/health/queue/failed/{name}
Returns the amount of failed jobs in a given queue.
| 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. |
Health Queue
GET /health/queue/failed/{name}
/health/queue/functions
Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/functions
/health/queue/logs
Get the number of logs that are waiting to be processed in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/logs
/health/queue/mails
Get the number of mails that are waiting to be processed in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/mails
/health/queue/messaging
Get the number of messages that are waiting to be processed in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/messaging
/health/queue/migrations
Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/migrations
/health/queue/usage
Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/usage
/health/queue/usage-dump
Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/usage-dump
/health/queue/webhooks
Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.
| 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. |
Health Queue
GET /health/queue/webhooks
/health/storage
Check the Appwrite storage device is up and connection is successful.
Health Status
GET /health/storage
/health/storage/local
Check the Appwrite local storage device is up and connection is successful.
Health Status
GET /health/storage/local
/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.
Health Time
GET /health/time
/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.
Locale
GET /locale
/locale/codes
List of all locale codes in ISO 639-1.
Locale codes list
GET /locale/codes
/locale/continents
List of all continents. You can use the locale header to get the data in a supported language.
Continents List
GET /locale/continents
/locale/countries
List of all countries. You can use the locale header to get the data in a supported language.
Countries List
GET /locale/countries
/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.
Countries List
GET /locale/countries/eu
/locale/countries/phones
List of all countries phone codes. You can use the locale header to get the data in a supported language.
Phones List
GET /locale/countries/phones
/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.
Currencies List
GET /locale/currencies
/locale/languages
List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
Languages List
GET /locale/languages
/messaging/messages
Get a list of all messages from the current Appwrite project.
| 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. |
Message list
GET /messaging/messages
/messaging/messages/{messageId}
Get a message by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| messageId | path | required | string | Message ID. |
Message
GET /messaging/messages/{messageId}
/messaging/messages/{messageId}/logs
Get the message activity logs listed by its unique ID.
| 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 |
Logs List
GET /messaging/messages/{messageId}/logs
/messaging/messages/{messageId}/targets
Get a list of the targets associated with a message.
| 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 |
Target list
GET /messaging/messages/{messageId}/targets
/messaging/providers
Get a list of all providers from the current Appwrite project.
| 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. |
Provider list
GET /messaging/providers
/messaging/providers/{providerId}
Get a provider by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| providerId | path | required | string | Provider ID. |
Provider
GET /messaging/providers/{providerId}
/messaging/providers/{providerId}/logs
Get the provider activity logs listed by its unique ID.
| 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 |
Logs List
GET /messaging/providers/{providerId}/logs
/messaging/subscribers/{subscriberId}/logs
Get the subscriber activity logs listed by its unique ID.
| 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 |
Logs List
GET /messaging/subscribers/{subscriberId}/logs
/messaging/topics
Get a list of all topics from the current Appwrite project.
| 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. |
Topic list
GET /messaging/topics
/messaging/topics/{topicId}
Get a topic by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| topicId | path | required | string | Topic ID. |
Topic
GET /messaging/topics/{topicId}
/messaging/topics/{topicId}/logs
Get the topic activity logs listed by its unique ID.
| 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 |
Logs List
GET /messaging/topics/{topicId}/logs
/messaging/topics/{topicId}/subscribers
Get a list of all subscribers from the current Appwrite project.
| 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. |
Subscriber list
GET /messaging/topics/{topicId}/subscribers
/messaging/topics/{topicId}/subscribers/{subscriberId}
Get a subscriber by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| topicId | path | required | string | Topic ID. The topic ID subscribed to. |
| subscriberId | path | required | string | Subscriber ID. |
Subscriber
GET /messaging/topics/{topicId}/subscribers/{subscriberId}
/storage/buckets
Get a list of all the storage buckets. You can use the query params to filter your results.
| 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. |
Buckets List
GET /storage/buckets
/storage/buckets/{bucketId}
Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| bucketId | path | required | string | Bucket unique ID. |
Bucket
GET /storage/buckets/{bucketId}
/storage/buckets/{bucketId}/files
Get a list of all the user files. You can use the query params to filter your results.
| 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. |
Files List
GET /storage/buckets/{bucketId}/files
/storage/buckets/{bucketId}/files/{fileId}
Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
| 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. |
File
GET /storage/buckets/{bucketId}/files/{fileId}
/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.
| 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. |
File
GET /storage/buckets/{bucketId}/files/{fileId}/download
/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.
| 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). |
Image
GET /storage/buckets/{bucketId}/files/{fileId}/preview
/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.
| 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. |
File
GET /storage/buckets/{bucketId}/files/{fileId}/view
/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.
| 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. |
Teams List
GET /teams
/teams/{teamId}
Get a team by its ID. All team members have read access for this resource.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
Team
GET /teams/{teamId}
/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.
| 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. |
Memberships List
GET /teams/{teamId}/memberships
/teams/{teamId}/memberships/{membershipId}
Get a team member by the membership unique id. All team members have read access for this resource.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
| membershipId | path | required | string | Membership ID. |
Membership
GET /teams/{teamId}/memberships/{membershipId}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
Preferences
GET /teams/{teamId}/prefs
/users
Get a list of all the project’s users. You can use the query params to filter your results.
| 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. |
Users List
GET /users
/users/identities
Get identities for all users.
| 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. |
Identities List
GET /users/identities
/users/{userId}
Get a user by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
User
GET /users/{userId}
/users/{userId}/logs
Get the user activity logs list by its unique ID.
| 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 |
Logs List
GET /users/{userId}/logs
/users/{userId}/memberships
Get the user membership list by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
Memberships List
GET /users/{userId}/memberships
/users/{userId}/mfa/factors
List the factors available on the account to be used as a MFA challange.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
MFAFactors
GET /users/{userId}/mfa/factors
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
MFA Recovery Codes
GET /users/{userId}/mfa/recovery-codes
/users/{userId}/prefs
Get the user preferences by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
Preferences
GET /users/{userId}/prefs
/users/{userId}/sessions
Get the user sessions list by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
Sessions List
GET /users/{userId}/sessions
/users/{userId}/targets
List the messaging targets that are associated with a user.
| 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 |
Target list
GET /users/{userId}/targets
/users/{userId}/targets/{targetId}
Get a user’s push notification target by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
| targetId | path | required | string | Target ID. |
Target
GET /users/{userId}/targets/{targetId}
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"
}
}
}
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."
}
}
}
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."
}
}
}
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."
}
}
}
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."
}
}
}
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."
}
}
}
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."
}
}
}
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."
}
}
}
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."
}
}
}
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."
}
}
}
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."
}
}
}
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."
}
}
}
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."
}
}
}
AccountDeleteAuthenticatorByIdRequest
{
"type": "object",
"required": [
"otp"
],
"properties": {
"otp": {
"type": "string",
"x-example": "<OTP>",
"description": "Valid verification token."
}
}
}
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."
}
}
}
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."
}
}
}
AccountUpdateMfaStatusRequest
{
"type": "object",
"required": [
"mfa"
],
"properties": {
"mfa": {
"type": "boolean",
"x-example": false,
"description": "Enable or disable MFA."
}
}
}
AccountUpdateNameOperationRequest
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"x-example": "<NAME>",
"description": "User name. Max length: 128 chars."
}
}
}
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."
}
}
}
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."
}
}
}
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."
}
}
}
AccountUpdatePreferencesRequest
{
"type": "object",
"required": [
"prefs"
],
"properties": {
"prefs": {
"type": "object",
"x-example": "{}",
"description": "Prefs key-value JSON object."
}
}
}
AccountVerifyAuthenticatorRequest
{
"type": "object",
"required": [
"otp"
],
"properties": {
"otp": {
"type": "string",
"x-example": "<OTP>",
"description": "Valid verification token."
}
}
}
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?"
}
}
}
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)."
}
}
}
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."
}
}
}
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?"
}
}
}
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)."
}
}
}
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?"
}
}
}
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?"
}
}
}
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?"
}
}
}
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."
}
}
}
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?"
}
}
}
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?"
}
}
}
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)."
}
}
}
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?"
}
}
}
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?"
}
}
}
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"
}
]
}
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?"
}
}
}
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."
}
}
}
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)."
}
}
}
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?"
}
}
}
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)."
}
}
}
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?"
}
}
}
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?"
}
}
}
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?"
}
}
}
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?"
}
}
}
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?"
}
}
}
DatabasesUpdateRelationshipAttributeRequest
{
"type": "object",
"properties": {
"onDelete": {
"enum": [
"cascade",
"restrict",
"setNull"
],
"type": "string",
"x-example": "cascade",
"description": "Constraints option",
"x-enum-keys": [],
"x-enum-name": "RelationMutate"
}
}
}
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?"
}
}
}