Appwrite Server

Open source backend-as-a-service

appwrite.io/docs/references ↗
Version
1.5.0
OpenAPI
3.0.0
Endpoints
259
Schemas
207
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

Authentication

apiKey apiKey apiKey apiKey apiKey apiKey

Endpoints

Account 43 endpoints

GET /account

Get the currently logged in user.

operationId: Account_getCurrentUser

Responses

200 User
GET /account
POST /account

Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).

operationId: Account_createNewUser

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountCreateNewUserRequest"
      }
    }
  }
}

Responses

201 User
POST /account
PATCH /account/email

Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request. This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.

operationId: Account_updateEmailAddress

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountUpdateEmailAddressRequest"
      }
    }
  }
}

Responses

200 User
PATCH /account/email
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](https://appwrite.io/docs/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
DELETE /account/identities/{identityId}

Delete an identity by its unique ID.

operationId: Account_deleteIdentityById

Parameters

Name In Required Type Description
identityId path required string Identity ID.

Responses

204 No content
DELETE /account/identities/{identityId}
POST /account/jwt

Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.

operationId: Account_createJwt

Responses

201 JWT
POST /account/jwt
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](https://appwrite.io/docs/queries). Only supported methods are limit and offset

Responses

200 Logs List
GET /account/logs
PATCH /account/mfa

Enable or disable MFA on an account.

operationId: Account_updateMfaStatus

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountUpdateMfaStatusRequest"
      }
    }
  }
}

Responses

200 User
PATCH /account/mfa
DELETE /account/mfa/authenticators/{type}

Delete an authenticator for a user by ID.

operationId: Account_deleteAuthenticatorById

Parameters

Name In Required Type Description
type path required string Type of authenticator.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountDeleteAuthenticatorByIdRequest"
      }
    }
  }
}

Responses

200 User
DELETE /account/mfa/authenticators/{type}
POST /account/mfa/authenticators/{type}

Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator) method.

operationId: Account_addAuthenticatorApp

Parameters

Name In Required Type Description
type path required string Type of authenticator. Must be `totp`

Responses

200 MFAType
POST /account/mfa/authenticators/{type}
PUT /account/mfa/authenticators/{type}

Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#addAuthenticator) method.

operationId: Account_verifyAuthenticator

Parameters

Name In Required Type Description
type path required string Type of authenticator.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountVerifyAuthenticatorRequest"
      }
    }
  }
}

Responses

200 User
PUT /account/mfa/authenticators/{type}
POST /account/mfa/challenge

Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.

operationId: Account_beginMfaVerification

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountBeginMfaVerificationRequest"
      }
    }
  }
}

Responses

201 MFA Challenge
POST /account/mfa/challenge
PUT /account/mfa/challenge

Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.

operationId: Account_completeMfaChallenge

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountCompleteMfaChallengeRequest"
      }
    }
  }
}

Responses

204 No content
PUT /account/mfa/challenge
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](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.

operationId: Account_getMfaRecoveryCodes

Responses

200 MFA Recovery Codes
GET /account/mfa/recovery-codes
PATCH /account/mfa/recovery-codes

Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.

operationId: Account_regenerateMfaRecoveryCodes

Responses

200 MFA Recovery Codes
PATCH /account/mfa/recovery-codes
POST /account/mfa/recovery-codes

Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.

operationId: Account_generateRecoveryCodes

Responses

201 MFA Recovery Codes
POST /account/mfa/recovery-codes
PATCH /account/name

Update currently logged in user account name.

operationId: Account_updateNameOperation

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountUpdateNameOperationRequest"
      }
    }
  }
}

Responses

200 User
PATCH /account/name
PATCH /account/password

Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.

operationId: Account_updatePasswordOperation

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountUpdatePasswordOperationRequest"
      }
    }
  }
}

Responses

200 User
PATCH /account/password
PATCH /account/phone

Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.

operationId: Account_updatePhone

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountUpdatePhoneRequest"
      }
    }
  }
}

Responses

200 User
PATCH /account/phone
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
PATCH /account/prefs

Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.

operationId: Account_updatePreferences

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountUpdatePreferencesRequest"
      }
    }
  }
}

Responses

200 User
PATCH /account/prefs
POST /account/recovery

Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.

operationId: Account_createPasswordRecovery

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountCreatePasswordRecoveryRequest"
      }
    }
  }
}

Responses

201 Token
POST /account/recovery
PUT /account/recovery

Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.

operationId: Account_completePasswordRecovery

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountCompletePasswordRecoveryRequest"
      }
    }
  }
}

Responses

200 Token
PUT /account/recovery
DELETE /account/sessions

Delete all sessions from the user account and remove any sessions cookies from the end client.

operationId: Account_deleteUserSessions

Responses

204 No content
DELETE /account/sessions
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
POST /account/sessions/anonymous

Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).

operationId: Account_createAnonymousSession

Responses

201 Session
POST /account/sessions/anonymous
POST /account/sessions/email

Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).

operationId: Account_createEmailPasswordSession

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountCreateEmailPasswordSessionRequest"
      }
    }
  }
}

Responses

201 Session
POST /account/sessions/email
PUT /account/sessions/magic-url

Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.

operationId: Account_updateMagicUrlSession

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountUpdateMagicUrlSessionRequest"
      }
    }
  }
}

Responses

201 Session
PUT /account/sessions/magic-url
PUT /account/sessions/phone

Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.

operationId: Account_updatePhoneSession

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountUpdatePhoneSessionRequest"
      }
    }
  }
}

Responses

201 Session
PUT /account/sessions/phone
POST /account/sessions/token

Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.

operationId: Account_createTokenSession

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountCreateTokenSessionRequest"
      }
    }
  }
}

Responses

201 Session
POST /account/sessions/token
DELETE /account/sessions/{sessionId}

Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.

operationId: Account_logoutSessionById

Parameters

Name In Required Type Description
sessionId path required string Session ID. Use the string 'current' to delete the current device session.

Responses

204 No content
DELETE /account/sessions/{sessionId}
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}
PATCH /account/sessions/{sessionId}

Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.

operationId: Account_extendSessionLength

Parameters

Name In Required Type Description
sessionId path required string Session ID. Use the string 'current' to update the current device session.

Responses

200 Session
PATCH /account/sessions/{sessionId}
PATCH /account/status

Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.

operationId: Account_blockCurrentUserStatus

Responses

200 User
PATCH /account/status
POST /account/tokens/email

Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).

operationId: Account_createEmailToken

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountCreateEmailTokenRequest"
      }
    }
  }
}

Responses

201 Token
POST /account/tokens/email
POST /account/tokens/magic-url

Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).

operationId: Account_createMagicUrlToken

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountCreateMagicUrlTokenRequest"
      }
    }
  }
}

Responses

201 Token
POST /account/tokens/magic-url
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](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#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](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) 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](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) 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}
POST /account/tokens/phone

Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).

operationId: Account_createPhoneToken

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountCreatePhoneTokenRequest"
      }
    }
  }
}

Responses

201 Token
POST /account/tokens/phone
POST /account/verification

Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.

operationId: Account_createEmailVerification

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountCreateEmailVerificationRequest"
      }
    }
  }
}

Responses

201 Token
POST /account/verification
PUT /account/verification

Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.

operationId: Account_completeEmailVerification

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountCompleteEmailVerificationRequest"
      }
    }
  }
}

Responses

200 Token
PUT /account/verification
POST /account/verification/phone

Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.

operationId: Account_createPhoneVerification

Responses

201 Token
POST /account/verification/phone
PUT /account/verification/phone

Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.

operationId: Account_confirmPhoneVerification

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AccountConfirmPhoneVerificationRequest"
      }
    }
  }
}

Responses

200 Token
PUT /account/verification/phone

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](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) 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](https://en.wikipedia.org/wiki/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 42 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](https://appwrite.io/docs/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
POST /databases

Create a new Database.

operationId: Databases_createDatabase

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateDatabaseRequest"
      }
    }
  }
}

Responses

201 Database
POST /databases
DELETE /databases/{databaseId}

Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.

operationId: Databases_deleteById

Parameters

Name In Required Type Description
databaseId path required string Database ID.

Responses

204 No content
DELETE /databases/{databaseId}
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}
PUT /databases/{databaseId}

Update a database by its unique ID.

operationId: Databases_updateById

Parameters

Name In Required Type Description
databaseId path required string Database ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateByIdRequest"
      }
    }
  }
}

Responses

200 Database
PUT /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](https://appwrite.io/docs/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
POST /databases/{databaseId}/collections

Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.

operationId: Databases_createCollection

Parameters

Name In Required Type Description
databaseId path required string Database ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateCollectionRequest"
      }
    }
  }
}

Responses

201 Collection
POST /databases/{databaseId}/collections
DELETE /databases/{databaseId}/collections/{collectionId}

Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.

operationId: Databases_deleteCollectionById

Parameters

Name In Required Type Description
databaseId path required string Database ID.
collectionId path required string Collection ID.

Responses

204 No content
DELETE /databases/{databaseId}/collections/{collectionId}
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}
PUT /databases/{databaseId}/collections/{collectionId}

Update a collection by its unique ID.

operationId: Databases_updateCollectionById

Parameters

Name In Required Type Description
databaseId path required string Database ID.
collectionId path required string Collection ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateCollectionByIdRequest"
      }
    }
  }
}

Responses

200 Collection
PUT /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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
queries query optional array Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/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
POST /databases/{databaseId}/collections/{collectionId}/attributes/boolean

Create a boolean attribute.

operationId: Databases_createBooleanAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateBooleanAttributeRequest"
      }
    }
  }
}

Responses

202 AttributeBoolean
POST /databases/{databaseId}/collections/{collectionId}/attributes/boolean
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}

Update a boolean attribute. Changing the `default` value will not update already existing documents.

operationId: Databases_updateBooleanAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Attribute Key.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateBooleanAttributeRequest"
      }
    }
  }
}

Responses

200 AttributeBoolean
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}
POST /databases/{databaseId}/collections/{collectionId}/attributes/datetime

Create a date time attribute according to the ISO 8601 standard.

operationId: Databases_createDatetimeAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateDatetimeAttributeRequest"
      }
    }
  }
}

Responses

202 AttributeDatetime
POST /databases/{databaseId}/collections/{collectionId}/attributes/datetime
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}

Update a date time attribute. Changing the `default` value will not update already existing documents.

operationId: Databases_updateDatetimeAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Attribute Key.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateDatetimeAttributeRequest"
      }
    }
  }
}

Responses

200 AttributeDatetime
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}
POST /databases/{databaseId}/collections/{collectionId}/attributes/email

Create an email attribute.

operationId: Databases_createEmailAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateEmailAttributeRequest"
      }
    }
  }
}

Responses

202 AttributeEmail
POST /databases/{databaseId}/collections/{collectionId}/attributes/email
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/email/{key}

Update an email attribute. Changing the `default` value will not update already existing documents.

operationId: Databases_updateEmailAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Attribute Key.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateEmailAttributeRequest"
      }
    }
  }
}

Responses

200 AttributeEmail
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/email/{key}
POST /databases/{databaseId}/collections/{collectionId}/attributes/enum

Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute.

operationId: Databases_createEnumAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateEnumAttributeRequest"
      }
    }
  }
}

Responses

202 AttributeEnum
POST /databases/{databaseId}/collections/{collectionId}/attributes/enum
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}

Update an enum attribute. Changing the `default` value will not update already existing documents.

operationId: Databases_updateEnumAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Attribute Key.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateEnumAttributeRequest"
      }
    }
  }
}

Responses

200 AttributeEnum
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}
POST /databases/{databaseId}/collections/{collectionId}/attributes/float

Create a float attribute. Optionally, minimum and maximum values can be provided.

operationId: Databases_createFloatAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateFloatAttributeRequest"
      }
    }
  }
}

Responses

202 AttributeFloat
POST /databases/{databaseId}/collections/{collectionId}/attributes/float
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/float/{key}

Update a float attribute. Changing the `default` value will not update already existing documents.

operationId: Databases_updateFloatAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Attribute Key.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateFloatAttributeRequest"
      }
    }
  }
}

Responses

200 AttributeFloat
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/float/{key}
POST /databases/{databaseId}/collections/{collectionId}/attributes/integer

Create an integer attribute. Optionally, minimum and maximum values can be provided.

operationId: Databases_createIntegerAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateIntegerAttributeRequest"
      }
    }
  }
}

Responses

202 AttributeInteger
POST /databases/{databaseId}/collections/{collectionId}/attributes/integer
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}

Update an integer attribute. Changing the `default` value will not update already existing documents.

operationId: Databases_updateIntegerAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Attribute Key.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateIntegerAttributeRequest"
      }
    }
  }
}

Responses

200 AttributeInteger
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}
POST /databases/{databaseId}/collections/{collectionId}/attributes/ip

Create IP address attribute.

operationId: Databases_createIpAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateIpAttributeRequest"
      }
    }
  }
}

Responses

202 AttributeIP
POST /databases/{databaseId}/collections/{collectionId}/attributes/ip
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}

Update an ip attribute. Changing the `default` value will not update already existing documents.

operationId: Databases_updateIpAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Attribute Key.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateIpAttributeRequest"
      }
    }
  }
}

Responses

200 AttributeIP
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}
POST /databases/{databaseId}/collections/{collectionId}/attributes/relationship

Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).

operationId: Databases_createRelationshipAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateRelationshipAttributeRequest"
      }
    }
  }
}

Responses

202 AttributeRelationship
POST /databases/{databaseId}/collections/{collectionId}/attributes/relationship
POST /databases/{databaseId}/collections/{collectionId}/attributes/string

Create a string attribute.

operationId: Databases_createStringAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateStringAttributeRequest"
      }
    }
  }
}

Responses

202 AttributeString
POST /databases/{databaseId}/collections/{collectionId}/attributes/string
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/string/{key}

Update a string attribute. Changing the `default` value will not update already existing documents.

operationId: Databases_updateStringAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Attribute Key.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateStringAttributeRequest"
      }
    }
  }
}

Responses

200 AttributeString
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/string/{key}
POST /databases/{databaseId}/collections/{collectionId}/attributes/url

Create a URL attribute.

operationId: Databases_createUrlAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateUrlAttributeRequest"
      }
    }
  }
}

Responses

202 AttributeURL
POST /databases/{databaseId}/collections/{collectionId}/attributes/url
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/url/{key}

Update an url attribute. Changing the `default` value will not update already existing documents.

operationId: Databases_updateUrlAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Attribute Key.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateUrlAttributeRequest"
      }
    }
  }
}

Responses

200 AttributeURL
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/url/{key}
DELETE /databases/{databaseId}/collections/{collectionId}/attributes/{key}

Deletes an attribute.

operationId: Databases_deleteAttributeById

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Attribute Key.

Responses

204 No content
DELETE /databases/{databaseId}/collections/{collectionId}/attributes/{key}
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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
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}
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship

Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).

operationId: Databases_updateRelationshipAttribute

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Attribute Key.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateRelationshipAttributeRequest"
      }
    }
  }
}

Responses

200 AttributeRelationship
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship
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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
queries query optional array Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.

Responses

200 Documents List
GET /databases/{databaseId}/collections/{collectionId}/documents
POST /databases/{databaseId}/collections/{collectionId}/documents

Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.

operationId: Databases_createDocument

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](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateDocumentRequest"
      }
    }
  }
}

Responses

201 Document
POST /databases/{databaseId}/collections/{collectionId}/documents
DELETE /databases/{databaseId}/collections/{collectionId}/documents/{documentId}

Delete a document by its unique ID.

operationId: Databases_deleteDocumentById

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
documentId path required string Document ID.

Responses

204 No content
DELETE /databases/{databaseId}/collections/{collectionId}/documents/{documentId}
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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
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](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.

Responses

200 Document
GET /databases/{databaseId}/collections/{collectionId}/documents/{documentId}
PATCH /databases/{databaseId}/collections/{collectionId}/documents/{documentId}

Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.

operationId: Databases_updateDocumentById

Parameters

Name In Required Type Description
databaseId path required string Database ID.
collectionId path required string Collection ID.
documentId path required string Document ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesUpdateDocumentByIdRequest"
      }
    }
  }
}

Responses

200 Document
PATCH /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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
queries query optional array Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/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
POST /databases/{databaseId}/collections/{collectionId}/indexes

Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be `key`, `fulltext`, and `unique`.

operationId: Databases_createIndex

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DatabasesCreateIndexRequest"
      }
    }
  }
}

Responses

202 Index
POST /databases/{databaseId}/collections/{collectionId}/indexes
DELETE /databases/{databaseId}/collections/{collectionId}/indexes/{key}

Delete an index.

operationId: Databases_deleteIndex

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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Index Key.

Responses

204 No content
DELETE /databases/{databaseId}/collections/{collectionId}/indexes/{key}
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](https://appwrite.io/docs/server/databases#databasesCreateCollection).
key path required string Index Key.

Responses

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

Functions 21 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](https://appwrite.io/docs/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
POST /functions

Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.

operationId: Functions_createNewFunction

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/FunctionsCreateNewFunctionRequest"
      }
    }
  }
}

Responses

201 Function
POST /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
DELETE /functions/{functionId}

Delete a function by its unique ID.

operationId: Functions_deleteById

Parameters

Name In Required Type Description
functionId path required string Function ID.

Responses

204 No content
DELETE /functions/{functionId}
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}
PUT /functions/{functionId}

Update function by its unique ID.

operationId: Functions_updateById

Parameters

Name In Required Type Description
functionId path required string Function ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/FunctionsUpdateByIdRequest"
      }
    }
  }
}

Responses

200 Function
PUT /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](https://appwrite.io/docs/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
POST /functions/{functionId}/deployments

Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID. This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions). Use the "command" param to set the entrypoint used to execute your code.

operationId: Functions_createDeploymentFunctionCode

Parameters

Name In Required Type Description
functionId path required string Function ID.

Request Body

{
  "content": {
    "multipart/form-data": {
      "schema": {
        "$ref": "#/components/schemas/FunctionsCreateDeploymentFunctionCodeRequest"
      }
    }
  }
}

Responses

202 Deployment
POST /functions/{functionId}/deployments
DELETE /functions/{functionId}/deployments/{deploymentId}

Delete a code deployment by its unique ID.

operationId: Functions_deleteDeployment

Parameters

Name In Required Type Description
functionId path required string Function ID.
deploymentId path required string Deployment ID.

Responses

204 No content
DELETE /functions/{functionId}/deployments/{deploymentId}
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}
PATCH /functions/{functionId}/deployments/{deploymentId}

Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.

operationId: Functions_updateDeploymentFunctionCode

Parameters

Name In Required Type Description
functionId path required string Function ID.
deploymentId path required string Deployment ID.

Responses

200 Function
PATCH /functions/{functionId}/deployments/{deploymentId}
POST /functions/{functionId}/deployments/{deploymentId}/builds/{buildId}

Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.

operationId: Functions_createBuild

Parameters

Name In Required Type Description
functionId path required string Function ID.
deploymentId path required string Deployment ID.
buildId path required string Build unique ID.

Responses

204 No content
POST /functions/{functionId}/deployments/{deploymentId}/builds/{buildId}
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](https://appwrite.io/docs/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
POST /functions/{functionId}/executions

Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.

operationId: Functions_triggerExecution

Parameters

Name In Required Type Description
functionId path required string Function ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/FunctionsTriggerExecutionRequest"
      }
    }
  }
}

Responses

201 Execution
POST /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
POST /functions/{functionId}/variables

Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.

operationId: Functions_createVariable

Parameters

Name In Required Type Description
functionId path required string Function unique ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/FunctionsCreateVariableRequest"
      }
    }
  }
}

Responses

201 Variable
POST /functions/{functionId}/variables
DELETE /functions/{functionId}/variables/{variableId}

Delete a variable by its unique ID.

operationId: Functions_deleteVariableById

Parameters

Name In Required Type Description
functionId path required string Function unique ID.
variableId path required string Variable unique ID.

Responses

204 No content
DELETE /functions/{functionId}/variables/{variableId}
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}
PUT /functions/{functionId}/variables/{variableId}

Update variable by its unique ID.

operationId: Functions_updateVariableById

Parameters

Name In Required Type Description
functionId path required string Function unique ID.
variableId path required string Variable unique ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/FunctionsUpdateVariableByIdRequest"
      }
    }
  }
}

Responses

200 Variable
PUT /functions/{functionId}/variables/{variableId}

Graphql 2 endpoints

POST /graphql

Execute a GraphQL mutation.

operationId: Graphql_executeMutation

Responses

200 Any
POST /graphql
POST /graphql/mutation

Execute a GraphQL mutation.

operationId: Graphql_executeMutation

Responses

200 Any
POST /graphql/mutation

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](https://letsencrypt.org/) 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](https://en.wikipedia.org/wiki/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](https://db-ip.com))

operationId: Locale_getUserLocaleData

Responses

200 Locale
GET /locale
GET /locale/codes

List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).

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 46 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](https://appwrite.io/docs/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
POST /messaging/messages/email

Create a new email message.

operationId: Messaging_createEmailMessage

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateEmailMessageRequest"
      }
    }
  }
}

Responses

201 Message
POST /messaging/messages/email
PATCH /messaging/messages/email/{messageId}

Update an email message by its unique ID.

operationId: Messaging_updateEmailById

Parameters

Name In Required Type Description
messageId path required string Message ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateEmailByIdRequest"
      }
    }
  }
}

Responses

200 Message
PATCH /messaging/messages/email/{messageId}
POST /messaging/messages/push

Create a new push notification.

operationId: Messaging_createPushNotification

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreatePushNotificationRequest"
      }
    }
  }
}

Responses

201 Message
POST /messaging/messages/push
PATCH /messaging/messages/push/{messageId}

Update a push notification by its unique ID.

operationId: Messaging_updatePushNotification

Parameters

Name In Required Type Description
messageId path required string Message ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdatePushNotificationRequest"
      }
    }
  }
}

Responses

200 Message
PATCH /messaging/messages/push/{messageId}
POST /messaging/messages/sms

Create a new SMS message.

operationId: Messaging_createSmsMessage

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateSmsMessageRequest"
      }
    }
  }
}

Responses

201 Message
POST /messaging/messages/sms
PATCH /messaging/messages/sms/{messageId}

Update an email message by its unique ID.

operationId: Messaging_updateSmsMessage

Parameters

Name In Required Type Description
messageId path required string Message ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateSmsMessageRequest"
      }
    }
  }
}

Responses

200 Message
PATCH /messaging/messages/sms/{messageId}
DELETE /messaging/messages/{messageId}

Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.

operationId: Messaging_deleteMessageById

Parameters

Name In Required Type Description
messageId path required string Message ID.

Responses

204 No content
DELETE /messaging/messages/{messageId}
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](https://appwrite.io/docs/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](https://appwrite.io/docs/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](https://appwrite.io/docs/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
POST /messaging/providers/apns

Create a new Apple Push Notification service provider.

operationId: Messaging_createApnsProvider

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateApnsProviderRequest"
      }
    }
  }
}

Responses

201 Provider
POST /messaging/providers/apns
PATCH /messaging/providers/apns/{providerId}

Update a Apple Push Notification service provider by its unique ID.

operationId: Messaging_updateApnsProvider

Parameters

Name In Required Type Description
providerId path required string Provider ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateApnsProviderRequest"
      }
    }
  }
}

Responses

200 Provider
PATCH /messaging/providers/apns/{providerId}
POST /messaging/providers/fcm

Create a new Firebase Cloud Messaging provider.

operationId: Messaging_createFcmProvider

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateFcmProviderRequest"
      }
    }
  }
}

Responses

201 Provider
POST /messaging/providers/fcm
PATCH /messaging/providers/fcm/{providerId}

Update a Firebase Cloud Messaging provider by its unique ID.

operationId: Messaging_updateFcmProviderById

Parameters

Name In Required Type Description
providerId path required string Provider ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateFcmProviderByIdRequest"
      }
    }
  }
}

Responses

200 Provider
PATCH /messaging/providers/fcm/{providerId}
POST /messaging/providers/mailgun

Create a new Mailgun provider.

operationId: Messaging_createProvider

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateProviderRequest"
      }
    }
  }
}

Responses

201 Provider
POST /messaging/providers/mailgun
PATCH /messaging/providers/mailgun/{providerId}

Update a Mailgun provider by its unique ID.

operationId: Messaging_updateMailgunProvider

Parameters

Name In Required Type Description
providerId path required string Provider ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateMailgunProviderRequest"
      }
    }
  }
}

Responses

200 Provider
PATCH /messaging/providers/mailgun/{providerId}
POST /messaging/providers/msg91

Create a new MSG91 provider.

operationId: Messaging_createMsg91Provider

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateMsg91ProviderRequest"
      }
    }
  }
}

Responses

201 Provider
POST /messaging/providers/msg91
PATCH /messaging/providers/msg91/{providerId}

Update a MSG91 provider by its unique ID.

operationId: Messaging_updateMsg91Provider

Parameters

Name In Required Type Description
providerId path required string Provider ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateMsg91ProviderRequest"
      }
    }
  }
}

Responses

200 Provider
PATCH /messaging/providers/msg91/{providerId}
POST /messaging/providers/sendgrid

Create a new Sendgrid provider.

operationId: Messaging_createSendgridProvider

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateSendgridProviderRequest"
      }
    }
  }
}

Responses

201 Provider
POST /messaging/providers/sendgrid
PATCH /messaging/providers/sendgrid/{providerId}

Update a Sendgrid provider by its unique ID.

operationId: Messaging_updateProvider

Parameters

Name In Required Type Description
providerId path required string Provider ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateProviderRequest"
      }
    }
  }
}

Responses

200 Provider
PATCH /messaging/providers/sendgrid/{providerId}
POST /messaging/providers/smtp

Create a new SMTP provider.

operationId: Messaging_createSmtpProvider

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateSmtpProviderRequest"
      }
    }
  }
}

Responses

201 Provider
POST /messaging/providers/smtp
PATCH /messaging/providers/smtp/{providerId}

Update a SMTP provider by its unique ID.

operationId: Messaging_updateProviderById

Parameters

Name In Required Type Description
providerId path required string Provider ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateProviderByIdRequest"
      }
    }
  }
}

Responses

200 Provider
PATCH /messaging/providers/smtp/{providerId}
POST /messaging/providers/telesign

Create a new Telesign provider.

operationId: Messaging_createTelesignProvider

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateTelesignProviderRequest"
      }
    }
  }
}

Responses

201 Provider
POST /messaging/providers/telesign
PATCH /messaging/providers/telesign/{providerId}

Update a Telesign provider by its unique ID.

operationId: Messaging_updateTelesignProvider

Parameters

Name In Required Type Description
providerId path required string Provider ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateTelesignProviderRequest"
      }
    }
  }
}

Responses

200 Provider
PATCH /messaging/providers/telesign/{providerId}
POST /messaging/providers/textmagic

Create a new Textmagic provider.

operationId: Messaging_createTextmagicProvider

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateTextmagicProviderRequest"
      }
    }
  }
}

Responses

201 Provider
POST /messaging/providers/textmagic
PATCH /messaging/providers/textmagic/{providerId}

Update a Textmagic provider by its unique ID.

operationId: Messaging_updateTextmagicProvider

Parameters

Name In Required Type Description
providerId path required string Provider ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateTextmagicProviderRequest"
      }
    }
  }
}

Responses

200 Provider
PATCH /messaging/providers/textmagic/{providerId}
POST /messaging/providers/twilio

Create a new Twilio provider.

operationId: Messaging_createTwilioProvider

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateTwilioProviderRequest"
      }
    }
  }
}

Responses

201 Provider
POST /messaging/providers/twilio
PATCH /messaging/providers/twilio/{providerId}

Update a Twilio provider by its unique ID.

operationId: Messaging_updateTwilioProvider

Parameters

Name In Required Type Description
providerId path required string Provider ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateTwilioProviderRequest"
      }
    }
  }
}

Responses

200 Provider
PATCH /messaging/providers/twilio/{providerId}
POST /messaging/providers/vonage

Create a new Vonage provider.

operationId: Messaging_createVonageProvider

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateVonageProviderRequest"
      }
    }
  }
}

Responses

201 Provider
POST /messaging/providers/vonage
PATCH /messaging/providers/vonage/{providerId}

Update a Vonage provider by its unique ID.

operationId: Messaging_updateVonageProvider

Parameters

Name In Required Type Description
providerId path required string Provider ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateVonageProviderRequest"
      }
    }
  }
}

Responses

200 Provider
PATCH /messaging/providers/vonage/{providerId}
DELETE /messaging/providers/{providerId}

Delete a provider by its unique ID.

operationId: Messaging_deleteProviderById

Parameters

Name In Required Type Description
providerId path required string Provider ID.

Responses

204 No content
DELETE /messaging/providers/{providerId}
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](https://appwrite.io/docs/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](https://appwrite.io/docs/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](https://appwrite.io/docs/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
POST /messaging/topics

Create a new topic.

operationId: Messaging_createTopic

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateTopicRequest"
      }
    }
  }
}

Responses

201 Topic
POST /messaging/topics
DELETE /messaging/topics/{topicId}

Delete a topic by its unique ID.

operationId: Messaging_deleteTopicById

Parameters

Name In Required Type Description
topicId path required string Topic ID.

Responses

204 No content
DELETE /messaging/topics/{topicId}
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}
PATCH /messaging/topics/{topicId}

Update a topic by its unique ID.

operationId: Messaging_updateTopicById

Parameters

Name In Required Type Description
topicId path required string Topic ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingUpdateTopicByIdRequest"
      }
    }
  }
}

Responses

200 Topic
PATCH /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](https://appwrite.io/docs/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](https://appwrite.io/docs/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
POST /messaging/topics/{topicId}/subscribers

Create a new subscriber.

operationId: Messaging_createSubscriber

Parameters

Name In Required Type Description
topicId path required string Topic ID. The topic ID to subscribe to.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MessagingCreateSubscriberRequest"
      }
    }
  }
}

Responses

201 Subscriber
POST /messaging/topics/{topicId}/subscribers
DELETE /messaging/topics/{topicId}/subscribers/{subscriberId}

Delete a subscriber by its unique ID.

operationId: Messaging_deleteSubscriberById

Parameters

Name In Required Type Description
topicId path required string Topic ID. The topic ID subscribed to.
subscriberId path required string Subscriber ID.

Responses

204 No content
DELETE /messaging/topics/{topicId}/subscribers/{subscriberId}
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 13 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](https://appwrite.io/docs/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
POST /storage/buckets

Create a new storage bucket.

operationId: Storage_createNewBucket

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StorageCreateNewBucketRequest"
      }
    }
  }
}

Responses

201 Bucket
POST /storage/buckets
DELETE /storage/buckets/{bucketId}

Delete a storage bucket by its unique ID.

operationId: Storage_deleteBucketById

Parameters

Name In Required Type Description
bucketId path required string Bucket unique ID.

Responses

204 No content
DELETE /storage/buckets/{bucketId}
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}
PUT /storage/buckets/{bucketId}

Update a storage bucket by its unique ID.

operationId: Storage_updateBucketById

Parameters

Name In Required Type Description
bucketId path required string Bucket unique ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StorageUpdateBucketByIdRequest"
      }
    }
  }
}

Responses

200 Bucket
PUT /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](https://appwrite.io/docs/server/storage#createBucket).
queries query optional array Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/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
POST /storage/buckets/{bucketId}/files

Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console. Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes. When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one. If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.

operationId: Storage_createFile

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](https://appwrite.io/docs/server/storage#createBucket).

Request Body

{
  "content": {
    "multipart/form-data": {
      "schema": {
        "$ref": "#/components/schemas/StorageCreateFileRequest"
      }
    }
  }
}

Responses

201 File
POST /storage/buckets/{bucketId}/files
DELETE /storage/buckets/{bucketId}/files/{fileId}

Delete a file by its unique ID. Only users with write permissions have access to delete this resource.

operationId: Storage_deleteFileById

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](https://appwrite.io/docs/server/storage#createBucket).
fileId path required string File ID.

Responses

204 No content
DELETE /storage/buckets/{bucketId}/files/{fileId}
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](https://appwrite.io/docs/server/storage#createBucket).
fileId path required string File ID.

Responses

200 File
GET /storage/buckets/{bucketId}/files/{fileId}
PUT /storage/buckets/{bucketId}/files/{fileId}

Update a file by its unique ID. Only users with write permissions have access to update this resource.

operationId: Storage_updateFileById

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](https://appwrite.io/docs/server/storage#createBucket).
fileId path required string File unique ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StorageUpdateFileByIdRequest"
      }
    }
  }
}

Responses

200 File
PUT /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](https://appwrite.io/docs/server/storage#createBucket).
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](https://appwrite.io/docs/server/storage#createBucket).
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](https://appwrite.io/docs/server/storage#createBucket).
fileId path required string File ID.

Responses

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

Teams 13 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](https://appwrite.io/docs/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
POST /teams

Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.

operationId: Teams_createNewTeam

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TeamsCreateNewTeamRequest"
      }
    }
  }
}

Responses

201 Team
POST /teams
DELETE /teams/{teamId}

Delete a team using its ID. Only team members with the owner role can delete the team.

operationId: Teams_removeTeamById

Parameters

Name In Required Type Description
teamId path required string Team ID.

Responses

204 No content
DELETE /teams/{teamId}
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}
PUT /teams/{teamId}

Update the team's name by its unique ID.

operationId: Teams_updateNameById

Parameters

Name In Required Type Description
teamId path required string Team ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TeamsUpdateNameByIdRequest"
      }
    }
  }
}

Responses

200 Team
PUT /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](https://appwrite.io/docs/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
POST /teams/{teamId}/memberships

Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.

operationId: Teams_createMembershipRequest

Parameters

Name In Required Type Description
teamId path required string Team ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TeamsCreateMembershipRequestRequest"
      }
    }
  }
}

Responses

201 Membership
POST /teams/{teamId}/memberships
DELETE /teams/{teamId}/memberships/{membershipId}

This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.

operationId: Teams_deleteMembership

Parameters

Name In Required Type Description
teamId path required string Team ID.
membershipId path required string Membership ID.

Responses

204 No content
DELETE /teams/{teamId}/memberships/{membershipId}
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}
PATCH /teams/{teamId}/memberships/{membershipId}

Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions).

operationId: Teams_updateMembershipRoles

Parameters

Name In Required Type Description
teamId path required string Team ID.
membershipId path required string Membership ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TeamsUpdateMembershipRolesRequest"
      }
    }
  }
}

Responses

200 Membership
PATCH /teams/{teamId}/memberships/{membershipId}
PATCH /teams/{teamId}/memberships/{membershipId}/status

Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. If the request is successful, a session for the user is automatically created.

operationId: Teams_updateMembershipStatus

Parameters

Name In Required Type Description
teamId path required string Team ID.
membershipId path required string Membership ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TeamsUpdateMembershipStatusRequest"
      }
    }
  }
}

Responses

200 Membership
PATCH /teams/{teamId}/memberships/{membershipId}/status
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](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).

operationId: Teams_getPrefsById

Parameters

Name In Required Type Description
teamId path required string Team ID.

Responses

200 Preferences
GET /teams/{teamId}/prefs
PUT /teams/{teamId}/prefs

Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.

operationId: Teams_updatePrefsById

Parameters

Name In Required Type Description
teamId path required string Team ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TeamsUpdatePrefsByIdRequest"
      }
    }
  }
}

Responses

200 Preferences
PUT /teams/{teamId}/prefs

Users 41 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](https://appwrite.io/docs/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
POST /users

Create a new user.

operationId: Users_createNewUser

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersCreateNewUserRequest"
      }
    }
  }
}

Responses

201 User
POST /users
POST /users/argon2

Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.

operationId: Users_createArgon2User

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersCreateArgon2UserRequest"
      }
    }
  }
}

Responses

201 User
POST /users/argon2
POST /users/bcrypt

Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.

operationId: Users_createBcryptUser

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersCreateBcryptUserRequest"
      }
    }
  }
}

Responses

201 User
POST /users/bcrypt
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](https://appwrite.io/docs/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
DELETE /users/identities/{identityId}

Delete an identity by its unique ID.

operationId: Users_deleteIdentityById

Parameters

Name In Required Type Description
identityId path required string Identity ID.

Responses

204 No content
DELETE /users/identities/{identityId}
POST /users/md5

Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.

operationId: Users_createMd5User

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersCreateMd5UserRequest"
      }
    }
  }
}

Responses

201 User
POST /users/md5
POST /users/phpass

Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.

operationId: Users_createPhpassUser

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersCreatePhpassUserRequest"
      }
    }
  }
}

Responses

201 User
POST /users/phpass
POST /users/scrypt

Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.

operationId: Users_createScryptUser

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersCreateScryptUserRequest"
      }
    }
  }
}

Responses

201 User
POST /users/scrypt
POST /users/scrypt-modified

Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.

operationId: Users_createScryptModifiedUser

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersCreateScryptModifiedUserRequest"
      }
    }
  }
}

Responses

201 User
POST /users/scrypt-modified
POST /users/sha

Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.

operationId: Users_createShaUser

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersCreateShaUserRequest"
      }
    }
  }
}

Responses

201 User
POST /users/sha
DELETE /users/{userId}

Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.

operationId: Users_deleteUserById

Parameters

Name In Required Type Description
userId path required string User ID.

Responses

204 No content
DELETE /users/{userId}
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}
PATCH /users/{userId}/email

Update the user email by its unique ID.

operationId: Users_updateEmailById

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersUpdateEmailByIdRequest"
      }
    }
  }
}

Responses

200 User
PATCH /users/{userId}/email
PUT /users/{userId}/labels

Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info.

operationId: Users_updateLabelsById

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersUpdateLabelsByIdRequest"
      }
    }
  }
}

Responses

200 User
PUT /users/{userId}/labels
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](https://appwrite.io/docs/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
PATCH /users/{userId}/mfa

Enable or disable MFA on a user account.

operationId: Users_updateMfaStatus

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersUpdateMfaStatusRequest"
      }
    }
  }
}

Responses

200 User
PATCH /users/{userId}/mfa
DELETE /users/{userId}/mfa/authenticators/{type}

Delete an authenticator app.

operationId: Users_deleteAuthenticator

Parameters

Name In Required Type Description
userId path required string User ID.
type path required string Type of authenticator.

Responses

200 User
DELETE /users/{userId}/mfa/authenticators/{type}
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](/docs/references/cloud/client-web/account#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
PATCH /users/{userId}/mfa/recovery-codes

Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.

operationId: Users_createMfaRecoveryCodes

Parameters

Name In Required Type Description
userId path required string User ID.

Responses

201 MFA Recovery Codes
PATCH /users/{userId}/mfa/recovery-codes
PUT /users/{userId}/mfa/recovery-codes

Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.

operationId: Users_regenerateMfaRecoveryCodes

Parameters

Name In Required Type Description
userId path required string User ID.

Responses

200 MFA Recovery Codes
PUT /users/{userId}/mfa/recovery-codes
PATCH /users/{userId}/name

Update the user name by its unique ID.

operationId: Users_updateUserByName

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersUpdateUserByNameRequest"
      }
    }
  }
}

Responses

200 User
PATCH /users/{userId}/name
PATCH /users/{userId}/password

Update the user password by its unique ID.

operationId: Users_updatePasswordById

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersUpdatePasswordByIdRequest"
      }
    }
  }
}

Responses

200 User
PATCH /users/{userId}/password
PATCH /users/{userId}/phone

Update the user phone by its unique ID.

operationId: Users_updatePhoneById

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersUpdatePhoneByIdRequest"
      }
    }
  }
}

Responses

200 User
PATCH /users/{userId}/phone
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
PATCH /users/{userId}/prefs

Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.

operationId: Users_updatePreferencesById

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersUpdatePreferencesByIdRequest"
      }
    }
  }
}

Responses

200 Preferences
PATCH /users/{userId}/prefs
DELETE /users/{userId}/sessions

Delete all user's sessions by using the user's unique ID.

operationId: Users_deleteUserSessions

Parameters

Name In Required Type Description
userId path required string User ID.

Responses

204 No content
DELETE /users/{userId}/sessions
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
POST /users/{userId}/sessions

Creates a session for a user. Returns an immediately usable session object. If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint.

operationId: Users_createSession

Parameters

Name In Required Type Description
userId path required string 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.

Responses

201 Session
POST /users/{userId}/sessions
DELETE /users/{userId}/sessions/{sessionId}

Delete a user sessions by its unique ID.

operationId: Users_deleteSessionById

Parameters

Name In Required Type Description
userId path required string User ID.
sessionId path required string Session ID.

Responses

204 No content
DELETE /users/{userId}/sessions/{sessionId}
PATCH /users/{userId}/status

Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.

operationId: Users_updateStatus

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersUpdateStatusRequest"
      }
    }
  }
}

Responses

200 User
PATCH /users/{userId}/status
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](https://appwrite.io/docs/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
POST /users/{userId}/targets

Create a messaging target.

operationId: Users_createTargetMessaging

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersCreateTargetMessagingRequest"
      }
    }
  }
}

Responses

201 Target
POST /users/{userId}/targets
DELETE /users/{userId}/targets/{targetId}

Delete a messaging target.

operationId: Users_deleteTargetMessaging

Parameters

Name In Required Type Description
userId path required string User ID.
targetId path required string Target ID.

Responses

204 No content
DELETE /users/{userId}/targets/{targetId}
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}
PATCH /users/{userId}/targets/{targetId}

Update a messaging target.

operationId: Users_updateTargetMessaging

Parameters

Name In Required Type Description
userId path required string User ID.
targetId path required string Target ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersUpdateTargetMessagingRequest"
      }
    }
  }
}

Responses

200 Target
PATCH /users/{userId}/targets/{targetId}
POST /users/{userId}/tokens

Returns a token with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession) endpoint to complete the login process.

operationId: Users_createTokenSession

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersCreateTokenSessionRequest"
      }
    }
  }
}

Responses

201 Token
POST /users/{userId}/tokens
PATCH /users/{userId}/verification

Update the user email verification status by its unique ID.

operationId: Users_updateEmailVerification

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersUpdateEmailVerificationRequest"
      }
    }
  }
}

Responses

200 User
PATCH /users/{userId}/verification
PATCH /users/{userId}/verification/phone

Update the user phone verification status by its unique ID.

operationId: Users_updatePhoneVerification

Parameters

Name In Required Type Description
userId path required string User ID.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersUpdatePhoneVerificationRequest"
      }
    }
  }
}

Responses

200 User
PATCH /users/{userId}/verification/phone

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?"
    }
  }
}
object DatabasesUpdateUrlAttributeRequest
{
  "type": "object",
  "required": [
    "required",
    "default"
  ],
  "properties": {
    "default": {
      "type": "string",
      "x-example": "https://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 FunctionsCreateDeploymentFunctionCodeRequest
{
  "type": "object",
  "required": [
    "code",
    "activate"
  ],
  "properties": {
    "code": {
      "type": "string",
      "x-example": null,
      "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory."
    },
    "activate": {
      "type": "boolean",
      "x-example": false,
      "description": "Automatically activate the deployment when it is finished building."
    },
    "commands": {
      "type": "string",
      "x-example": "<COMMANDS>",
      "description": "Build Commands."
    },
    "entrypoint": {
      "type": "string",
      "x-example": "<ENTRYPOINT>",
      "description": "Entrypoint File."
    }
  }
}
object FunctionsCreateNewFunctionRequest
{
  "type": "object",
  "required": [
    "functionId",
    "name",
    "runtime"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Function name. Max length: 128 chars."
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Events list. Maximum of 100 events are allowed."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled."
    },
    "execute": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "[\"any\"]",
      "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long."
    },
    "logging": {
      "type": "boolean",
      "x-example": false,
      "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project."
    },
    "runtime": {
      "enum": [
        "node-14.5",
        "node-16.0",
        "node-18.0",
        "node-19.0",
        "node-20.0",
        "node-21.0",
        "php-8.0",
        "php-8.1",
        "php-8.2",
        "php-8.3",
        "ruby-3.0",
        "ruby-3.1",
        "ruby-3.2",
        "ruby-3.3",
        "python-3.8",
        "python-3.9",
        "python-3.10",
        "python-3.11",
        "python-3.12",
        "deno-1.40",
        "dart-2.15",
        "dart-2.16",
        "dart-2.17",
        "dart-2.18",
        "dart-3.0",
        "dart-3.1",
        "dart-3.3",
        "dotnet-3.1",
        "dotnet-6.0",
        "dotnet-7.0",
        "java-8.0",
        "java-11.0",
        "java-17.0",
        "java-18.0",
        "java-21.0",
        "swift-5.5",
        "swift-5.8",
        "swift-5.9",
        "kotlin-1.6",
        "kotlin-1.8",
        "kotlin-1.9",
        "cpp-17",
        "cpp-20",
        "bun-1.0"
      ],
      "type": "string",
      "x-example": "node-14.5",
      "description": "Execution runtime.",
      "x-enum-keys": [],
      "x-enum-name": null
    },
    "timeout": {
      "type": "integer",
      "x-example": 1,
      "description": "Function maximum execution time in seconds."
    },
    "commands": {
      "type": "string",
      "x-example": "<COMMANDS>",
      "description": "Build Commands."
    },
    "schedule": {
      "type": "string",
      "x-example": null,
      "description": "Schedule CRON syntax."
    },
    "entrypoint": {
      "type": "string",
      "x-example": "<ENTRYPOINT>",
      "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\"."
    },
    "functionId": {
      "type": "string",
      "x-example": "<FUNCTION_ID>",
      "description": "Function 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."
    },
    "templateOwner": {
      "type": "string",
      "x-example": "<TEMPLATE_OWNER>",
      "description": "The name of the owner of the template."
    },
    "installationId": {
      "type": "string",
      "x-example": "<INSTALLATION_ID>",
      "description": "Appwrite Installation ID for VCS (Version Control System) deployment."
    },
    "providerBranch": {
      "type": "string",
      "x-example": "<PROVIDER_BRANCH>",
      "description": "Production branch for the repo linked to the function."
    },
    "templateBranch": {
      "type": "string",
      "x-example": "<TEMPLATE_BRANCH>",
      "description": "Production branch for the repo linked to the function template."
    },
    "providerSilentMode": {
      "type": "boolean",
      "x-example": false,
      "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests."
    },
    "templateRepository": {
      "type": "string",
      "x-example": "<TEMPLATE_REPOSITORY>",
      "description": "Repository name of the template."
    },
    "providerRepositoryId": {
      "type": "string",
      "x-example": "<PROVIDER_REPOSITORY_ID>",
      "description": "Repository ID of the repo linked to the function."
    },
    "providerRootDirectory": {
      "type": "string",
      "x-example": "<PROVIDER_ROOT_DIRECTORY>",
      "description": "Path to function code in the linked repo."
    },
    "templateRootDirectory": {
      "type": "string",
      "x-example": "<TEMPLATE_ROOT_DIRECTORY>",
      "description": "Path to function code in the template repo."
    }
  }
}
object FunctionsCreateVariableRequest
{
  "type": "object",
  "required": [
    "key",
    "value"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "<KEY>",
      "description": "Variable key. Max length: 255 chars."
    },
    "value": {
      "type": "string",
      "x-example": "<VALUE>",
      "description": "Variable value. Max length: 8192 chars."
    }
  }
}
object FunctionsTriggerExecutionRequest
{
  "type": "object",
  "properties": {
    "body": {
      "type": "string",
      "x-example": "<BODY>",
      "description": "HTTP body of execution. Default value is empty string."
    },
    "path": {
      "type": "string",
      "x-example": "<PATH>",
      "description": "HTTP path of execution. Path can include query params. Default value is /"
    },
    "async": {
      "type": "boolean",
      "x-example": false,
      "description": "Execute code in the background. Default value is false."
    },
    "method": {
      "enum": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE",
        "OPTIONS"
      ],
      "type": "string",
      "x-example": "GET",
      "description": "HTTP method of execution. Default value is GET.",
      "x-enum-keys": [],
      "x-enum-name": "ExecutionMethod"
    },
    "headers": {
      "type": "object",
      "x-example": "{}",
      "description": "HTTP headers of execution. Defaults to empty."
    }
  }
}
object FunctionsUpdateByIdRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Function name. Max length: 128 chars."
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Events list. Maximum of 100 events are allowed."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled."
    },
    "execute": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "[\"any\"]",
      "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long."
    },
    "logging": {
      "type": "boolean",
      "x-example": false,
      "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project."
    },
    "runtime": {
      "enum": [
        "node-14.5",
        "node-16.0",
        "node-18.0",
        "node-19.0",
        "node-20.0",
        "node-21.0",
        "php-8.0",
        "php-8.1",
        "php-8.2",
        "php-8.3",
        "ruby-3.0",
        "ruby-3.1",
        "ruby-3.2",
        "ruby-3.3",
        "python-3.8",
        "python-3.9",
        "python-3.10",
        "python-3.11",
        "python-3.12",
        "deno-1.40",
        "dart-2.15",
        "dart-2.16",
        "dart-2.17",
        "dart-2.18",
        "dart-3.0",
        "dart-3.1",
        "dart-3.3",
        "dotnet-3.1",
        "dotnet-6.0",
        "dotnet-7.0",
        "java-8.0",
        "java-11.0",
        "java-17.0",
        "java-18.0",
        "java-21.0",
        "swift-5.5",
        "swift-5.8",
        "swift-5.9",
        "kotlin-1.6",
        "kotlin-1.8",
        "kotlin-1.9",
        "cpp-17",
        "cpp-20",
        "bun-1.0"
      ],
      "type": "string",
      "x-example": "node-14.5",
      "description": "Execution runtime.",
      "x-enum-keys": [],
      "x-enum-name": null
    },
    "timeout": {
      "type": "integer",
      "x-example": 1,
      "description": "Maximum execution time in seconds."
    },
    "commands": {
      "type": "string",
      "x-example": "<COMMANDS>",
      "description": "Build Commands."
    },
    "schedule": {
      "type": "string",
      "x-example": null,
      "description": "Schedule CRON syntax."
    },
    "entrypoint": {
      "type": "string",
      "x-example": "<ENTRYPOINT>",
      "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\"."
    },
    "installationId": {
      "type": "string",
      "x-example": "<INSTALLATION_ID>",
      "description": "Appwrite Installation ID for VCS (Version Controle System) deployment."
    },
    "providerBranch": {
      "type": "string",
      "x-example": "<PROVIDER_BRANCH>",
      "description": "Production branch for the repo linked to the function"
    },
    "providerSilentMode": {
      "type": "boolean",
      "x-example": false,
      "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests."
    },
    "providerRepositoryId": {
      "type": "string",
      "x-example": "<PROVIDER_REPOSITORY_ID>",
      "description": "Repository ID of the repo linked to the function"
    },
    "providerRootDirectory": {
      "type": "string",
      "x-example": "<PROVIDER_ROOT_DIRECTORY>",
      "description": "Path to function code in the linked repo."
    }
  }
}
object FunctionsUpdateVariableByIdRequest
{
  "type": "object",
  "required": [
    "key"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "<KEY>",
      "description": "Variable key. Max length: 255 chars."
    },
    "value": {
      "type": "string",
      "x-example": "<VALUE>",
      "description": "Variable value. Max length: 8192 chars."
    }
  }
}
object MessagingCreateApnsProviderRequest
{
  "type": "object",
  "required": [
    "providerId",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "teamId": {
      "type": "string",
      "x-example": "<TEAM_ID>",
      "description": "APNS team ID."
    },
    "authKey": {
      "type": "string",
      "x-example": "<AUTH_KEY>",
      "description": "APNS authentication key."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "sandbox": {
      "type": "boolean",
      "x-example": false,
      "description": "Use APNS sandbox environment."
    },
    "bundleId": {
      "type": "string",
      "x-example": "<BUNDLE_ID>",
      "description": "APNS bundle ID."
    },
    "authKeyId": {
      "type": "string",
      "x-example": "<AUTH_KEY_ID>",
      "description": "APNS authentication key ID."
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider 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 MessagingCreateEmailMessageRequest
{
  "type": "object",
  "required": [
    "messageId",
    "subject",
    "content"
  ],
  "properties": {
    "cc": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of target IDs to be added as CC."
    },
    "bcc": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of target IDs to be added as BCC."
    },
    "html": {
      "type": "boolean",
      "x-example": false,
      "description": "Is content of type HTML"
    },
    "draft": {
      "type": "boolean",
      "x-example": false,
      "description": "Is message a draft"
    },
    "users": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of User IDs."
    },
    "topics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Topic IDs."
    },
    "content": {
      "type": "string",
      "x-example": "<CONTENT>",
      "description": "Email Content."
    },
    "subject": {
      "type": "string",
      "x-example": "<SUBJECT>",
      "description": "Email Subject."
    },
    "targets": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Targets IDs."
    },
    "messageId": {
      "type": "string",
      "x-example": "<MESSAGE_ID>",
      "description": "Message 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."
    },
    "attachments": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of compound bucket IDs to file IDs to be attached to the email."
    },
    "scheduledAt": {
      "type": "string",
      "x-example": null,
      "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future."
    }
  }
}
object MessagingCreateFcmProviderRequest
{
  "type": "object",
  "required": [
    "providerId",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider 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."
    },
    "serviceAccountJSON": {
      "type": "object",
      "x-example": "{}",
      "description": "FCM service account JSON."
    }
  }
}
object MessagingCreateMsg91ProviderRequest
{
  "type": "object",
  "required": [
    "providerId",
    "name"
  ],
  "properties": {
    "from": {
      "type": "string",
      "x-example": "+12065550100",
      "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "authKey": {
      "type": "string",
      "x-example": "<AUTH_KEY>",
      "description": "Msg91 Auth Key."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "senderId": {
      "type": "string",
      "x-example": "<SENDER_ID>",
      "description": "Msg91 Sender ID."
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider 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 MessagingCreateProviderRequest
{
  "type": "object",
  "required": [
    "providerId",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "apiKey": {
      "type": "string",
      "x-example": "<API_KEY>",
      "description": "Mailgun API Key."
    },
    "domain": {
      "type": "string",
      "x-example": "<DOMAIN>",
      "description": "Mailgun Domain."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "fromName": {
      "type": "string",
      "x-example": "<FROM_NAME>",
      "description": "Sender Name."
    },
    "fromEmail": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "Sender email address."
    },
    "isEuRegion": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as EU region."
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider 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."
    },
    "replyToName": {
      "type": "string",
      "x-example": "<REPLY_TO_NAME>",
      "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well."
    },
    "replyToEmail": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well."
    }
  }
}
object MessagingCreatePushNotificationRequest
{
  "type": "object",
  "required": [
    "messageId",
    "title",
    "body"
  ],
  "properties": {
    "tag": {
      "type": "string",
      "x-example": "<TAG>",
      "description": "Tag for push notification. Available only for Android Platform."
    },
    "body": {
      "type": "string",
      "x-example": "<BODY>",
      "description": "Body for push notification."
    },
    "data": {
      "type": "object",
      "x-example": "{}",
      "description": "Additional Data for push notification."
    },
    "icon": {
      "type": "string",
      "x-example": "<ICON>",
      "description": "Icon for push notification. Available only for Android and Web Platform."
    },
    "badge": {
      "type": "string",
      "x-example": "<BADGE>",
      "description": "Badge for push notification. Available only for IOS Platform."
    },
    "color": {
      "type": "string",
      "x-example": "<COLOR>",
      "description": "Color for push notification. Available only for Android Platform."
    },
    "draft": {
      "type": "boolean",
      "x-example": false,
      "description": "Is message a draft"
    },
    "image": {
      "type": "string",
      "x-example": "[ID1:ID2]",
      "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage."
    },
    "sound": {
      "type": "string",
      "x-example": "<SOUND>",
      "description": "Sound for push notification. Available only for Android and IOS Platform."
    },
    "title": {
      "type": "string",
      "x-example": "<TITLE>",
      "description": "Title for push notification."
    },
    "users": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of User IDs."
    },
    "action": {
      "type": "string",
      "x-example": "<ACTION>",
      "description": "Action for push notification."
    },
    "topics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Topic IDs."
    },
    "targets": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Targets IDs."
    },
    "messageId": {
      "type": "string",
      "x-example": "<MESSAGE_ID>",
      "description": "Message 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."
    },
    "scheduledAt": {
      "type": "string",
      "x-example": null,
      "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future."
    }
  }
}
object MessagingCreateSendgridProviderRequest
{
  "type": "object",
  "required": [
    "providerId",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "apiKey": {
      "type": "string",
      "x-example": "<API_KEY>",
      "description": "Sendgrid API key."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "fromName": {
      "type": "string",
      "x-example": "<FROM_NAME>",
      "description": "Sender Name."
    },
    "fromEmail": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "Sender email address."
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider 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."
    },
    "replyToName": {
      "type": "string",
      "x-example": "<REPLY_TO_NAME>",
      "description": "Name set in the reply to field for the mail. Default value is sender name."
    },
    "replyToEmail": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "Email set in the reply to field for the mail. Default value is sender email."
    }
  }
}
object MessagingCreateSmsMessageRequest
{
  "type": "object",
  "required": [
    "messageId",
    "content"
  ],
  "properties": {
    "draft": {
      "type": "boolean",
      "x-example": false,
      "description": "Is message a draft"
    },
    "users": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of User IDs."
    },
    "topics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Topic IDs."
    },
    "content": {
      "type": "string",
      "x-example": "<CONTENT>",
      "description": "SMS Content."
    },
    "targets": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Targets IDs."
    },
    "messageId": {
      "type": "string",
      "x-example": "<MESSAGE_ID>",
      "description": "Message 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."
    },
    "scheduledAt": {
      "type": "string",
      "x-example": null,
      "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future."
    }
  }
}
object MessagingCreateSmtpProviderRequest
{
  "type": "object",
  "required": [
    "providerId",
    "name",
    "host"
  ],
  "properties": {
    "host": {
      "type": "string",
      "x-example": "<HOST>",
      "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465\"`. Hosts will be tried in order."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "port": {
      "type": "integer",
      "x-example": 1,
      "description": "The default SMTP server port."
    },
    "mailer": {
      "type": "string",
      "x-example": "<MAILER>",
      "description": "The value to use for the X-Mailer header."
    },
    "autoTLS": {
      "type": "boolean",
      "x-example": false,
      "description": "Enable SMTP AutoTLS feature."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "fromName": {
      "type": "string",
      "x-example": "<FROM_NAME>",
      "description": "Sender Name."
    },
    "password": {
      "type": "string",
      "x-example": "<PASSWORD>",
      "description": "Authentication password."
    },
    "username": {
      "type": "string",
      "x-example": "<USERNAME>",
      "description": "Authentication username."
    },
    "fromEmail": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "Sender email address."
    },
    "encryption": {
      "enum": [
        "none",
        "ssl",
        "tls"
      ],
      "type": "string",
      "x-example": "none",
      "description": "Encryption type. Can be omitted, 'ssl', or 'tls'",
      "x-enum-keys": [],
      "x-enum-name": "SmtpEncryption"
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider 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."
    },
    "replyToName": {
      "type": "string",
      "x-example": "<REPLY_TO_NAME>",
      "description": "Name set in the reply to field for the mail. Default value is sender name."
    },
    "replyToEmail": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "Email set in the reply to field for the mail. Default value is sender email."
    }
  }
}
object MessagingCreateSubscriberRequest
{
  "type": "object",
  "required": [
    "subscriberId",
    "targetId"
  ],
  "properties": {
    "targetId": {
      "type": "string",
      "x-example": "<TARGET_ID>",
      "description": "Target ID. The target ID to link to the specified Topic ID."
    },
    "subscriberId": {
      "type": "string",
      "x-example": "<SUBSCRIBER_ID>",
      "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID."
    }
  }
}
object MessagingCreateTelesignProviderRequest
{
  "type": "object",
  "required": [
    "providerId",
    "name"
  ],
  "properties": {
    "from": {
      "type": "string",
      "x-example": "+12065550100",
      "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "apiKey": {
      "type": "string",
      "x-example": "<API_KEY>",
      "description": "Telesign API key."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "customerId": {
      "type": "string",
      "x-example": "<CUSTOMER_ID>",
      "description": "Telesign customer ID."
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider 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 MessagingCreateTextmagicProviderRequest
{
  "type": "object",
  "required": [
    "providerId",
    "name"
  ],
  "properties": {
    "from": {
      "type": "string",
      "x-example": "+12065550100",
      "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "apiKey": {
      "type": "string",
      "x-example": "<API_KEY>",
      "description": "Textmagic apiKey."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "username": {
      "type": "string",
      "x-example": "<USERNAME>",
      "description": "Textmagic username."
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider 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 MessagingCreateTopicRequest
{
  "type": "object",
  "required": [
    "topicId",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Topic Name."
    },
    "topicId": {
      "type": "string",
      "x-example": "<TOPIC_ID>",
      "description": "Topic ID. Choose a custom Topic ID or a new Topic ID."
    },
    "subscribe": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "[\"any\"]",
      "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long."
    }
  }
}
object MessagingCreateTwilioProviderRequest
{
  "type": "object",
  "required": [
    "providerId",
    "name"
  ],
  "properties": {
    "from": {
      "type": "string",
      "x-example": "+12065550100",
      "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "authToken": {
      "type": "string",
      "x-example": "<AUTH_TOKEN>",
      "description": "Twilio authentication token."
    },
    "accountSid": {
      "type": "string",
      "x-example": "<ACCOUNT_SID>",
      "description": "Twilio account secret ID."
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider 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 MessagingCreateVonageProviderRequest
{
  "type": "object",
  "required": [
    "providerId",
    "name"
  ],
  "properties": {
    "from": {
      "type": "string",
      "x-example": "+12065550100",
      "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "apiKey": {
      "type": "string",
      "x-example": "<API_KEY>",
      "description": "Vonage API key."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "apiSecret": {
      "type": "string",
      "x-example": "<API_SECRET>",
      "description": "Vonage API secret."
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider 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 MessagingUpdateApnsProviderRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "teamId": {
      "type": "string",
      "x-example": "<TEAM_ID>",
      "description": "APNS team ID."
    },
    "authKey": {
      "type": "string",
      "x-example": "<AUTH_KEY>",
      "description": "APNS authentication key."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "sandbox": {
      "type": "boolean",
      "x-example": false,
      "description": "Use APNS sandbox environment."
    },
    "bundleId": {
      "type": "string",
      "x-example": "<BUNDLE_ID>",
      "description": "APNS bundle ID."
    },
    "authKeyId": {
      "type": "string",
      "x-example": "<AUTH_KEY_ID>",
      "description": "APNS authentication key ID."
    }
  }
}
object MessagingUpdateEmailByIdRequest
{
  "type": "object",
  "properties": {
    "cc": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of target IDs to be added as CC."
    },
    "bcc": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of target IDs to be added as BCC."
    },
    "html": {
      "type": "boolean",
      "x-example": false,
      "description": "Is content of type HTML"
    },
    "draft": {
      "type": "boolean",
      "x-example": false,
      "description": "Is message a draft"
    },
    "users": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of User IDs."
    },
    "topics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Topic IDs."
    },
    "content": {
      "type": "string",
      "x-example": "<CONTENT>",
      "description": "Email Content."
    },
    "subject": {
      "type": "string",
      "x-example": "<SUBJECT>",
      "description": "Email Subject."
    },
    "targets": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Targets IDs."
    },
    "scheduledAt": {
      "type": "string",
      "x-example": null,
      "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future."
    }
  }
}
object MessagingUpdateFcmProviderByIdRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "serviceAccountJSON": {
      "type": "object",
      "x-example": "{}",
      "description": "FCM service account JSON."
    }
  }
}
object MessagingUpdateMailgunProviderRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "apiKey": {
      "type": "string",
      "x-example": "<API_KEY>",
      "description": "Mailgun API Key."
    },
    "domain": {
      "type": "string",
      "x-example": "<DOMAIN>",
      "description": "Mailgun Domain."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "fromName": {
      "type": "string",
      "x-example": "<FROM_NAME>",
      "description": "Sender Name."
    },
    "fromEmail": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "Sender email address."
    },
    "isEuRegion": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as EU region."
    },
    "replyToName": {
      "type": "string",
      "x-example": "<REPLY_TO_NAME>",
      "description": "Name set in the reply to field for the mail. Default value is sender name."
    },
    "replyToEmail": {
      "type": "string",
      "x-example": "<REPLY_TO_EMAIL>",
      "description": "Email set in the reply to field for the mail. Default value is sender email."
    }
  }
}
object MessagingUpdateMsg91ProviderRequest
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "x-example": "<FROM>",
      "description": "Sender number."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "authKey": {
      "type": "string",
      "x-example": "<AUTH_KEY>",
      "description": "Msg91 Auth Key."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "senderId": {
      "type": "string",
      "x-example": "<SENDER_ID>",
      "description": "Msg91 Sender ID."
    }
  }
}
object MessagingUpdateProviderByIdRequest
{
  "type": "object",
  "properties": {
    "host": {
      "type": "string",
      "x-example": "<HOST>",
      "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465\"`. Hosts will be tried in order."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "port": {
      "type": "integer",
      "x-example": 1,
      "description": "SMTP port."
    },
    "mailer": {
      "type": "string",
      "x-example": "<MAILER>",
      "description": "The value to use for the X-Mailer header."
    },
    "autoTLS": {
      "type": "boolean",
      "x-example": false,
      "description": "Enable SMTP AutoTLS feature."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "fromName": {
      "type": "string",
      "x-example": "<FROM_NAME>",
      "description": "Sender Name."
    },
    "password": {
      "type": "string",
      "x-example": "<PASSWORD>",
      "description": "Authentication password."
    },
    "username": {
      "type": "string",
      "x-example": "<USERNAME>",
      "description": "Authentication username."
    },
    "fromEmail": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "Sender email address."
    },
    "encryption": {
      "enum": [
        "none",
        "ssl",
        "tls"
      ],
      "type": "string",
      "x-example": "none",
      "description": "Encryption type. Can be 'ssl' or 'tls'",
      "x-enum-keys": [],
      "x-enum-name": "SmtpEncryption"
    },
    "replyToName": {
      "type": "string",
      "x-example": "<REPLY_TO_NAME>",
      "description": "Name set in the Reply To field for the mail. Default value is Sender Name."
    },
    "replyToEmail": {
      "type": "string",
      "x-example": "<REPLY_TO_EMAIL>",
      "description": "Email set in the Reply To field for the mail. Default value is Sender Email."
    }
  }
}
object MessagingUpdateProviderRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "apiKey": {
      "type": "string",
      "x-example": "<API_KEY>",
      "description": "Sendgrid API key."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "fromName": {
      "type": "string",
      "x-example": "<FROM_NAME>",
      "description": "Sender Name."
    },
    "fromEmail": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "Sender email address."
    },
    "replyToName": {
      "type": "string",
      "x-example": "<REPLY_TO_NAME>",
      "description": "Name set in the Reply To field for the mail. Default value is Sender Name."
    },
    "replyToEmail": {
      "type": "string",
      "x-example": "<REPLY_TO_EMAIL>",
      "description": "Email set in the Reply To field for the mail. Default value is Sender Email."
    }
  }
}
object MessagingUpdatePushNotificationRequest
{
  "type": "object",
  "properties": {
    "tag": {
      "type": "string",
      "x-example": "<TAG>",
      "description": "Tag for push notification. Available only for Android platforms."
    },
    "body": {
      "type": "string",
      "x-example": "<BODY>",
      "description": "Body for push notification."
    },
    "data": {
      "type": "object",
      "x-example": "{}",
      "description": "Additional Data for push notification."
    },
    "icon": {
      "type": "string",
      "x-example": "<ICON>",
      "description": "Icon for push notification. Available only for Android and Web platforms."
    },
    "badge": {
      "type": "integer",
      "x-example": null,
      "description": "Badge for push notification. Available only for iOS platforms."
    },
    "color": {
      "type": "string",
      "x-example": "<COLOR>",
      "description": "Color for push notification. Available only for Android platforms."
    },
    "draft": {
      "type": "boolean",
      "x-example": false,
      "description": "Is message a draft"
    },
    "image": {
      "type": "string",
      "x-example": "[ID1:ID2]",
      "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage."
    },
    "sound": {
      "type": "string",
      "x-example": "<SOUND>",
      "description": "Sound for push notification. Available only for Android and iOS platforms."
    },
    "title": {
      "type": "string",
      "x-example": "<TITLE>",
      "description": "Title for push notification."
    },
    "users": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of User IDs."
    },
    "action": {
      "type": "string",
      "x-example": "<ACTION>",
      "description": "Action for push notification."
    },
    "topics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Topic IDs."
    },
    "targets": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Targets IDs."
    },
    "scheduledAt": {
      "type": "string",
      "x-example": null,
      "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future."
    }
  }
}
object MessagingUpdateSmsMessageRequest
{
  "type": "object",
  "properties": {
    "draft": {
      "type": "boolean",
      "x-example": false,
      "description": "Is message a draft"
    },
    "users": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of User IDs."
    },
    "topics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Topic IDs."
    },
    "content": {
      "type": "string",
      "x-example": "<CONTENT>",
      "description": "Email Content."
    },
    "targets": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "List of Targets IDs."
    },
    "scheduledAt": {
      "type": "string",
      "x-example": null,
      "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future."
    }
  }
}
object MessagingUpdateTelesignProviderRequest
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "x-example": "<FROM>",
      "description": "Sender number."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "apiKey": {
      "type": "string",
      "x-example": "<API_KEY>",
      "description": "Telesign API key."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "customerId": {
      "type": "string",
      "x-example": "<CUSTOMER_ID>",
      "description": "Telesign customer ID."
    }
  }
}
object MessagingUpdateTextmagicProviderRequest
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "x-example": "<FROM>",
      "description": "Sender number."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "apiKey": {
      "type": "string",
      "x-example": "<API_KEY>",
      "description": "Textmagic apiKey."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "username": {
      "type": "string",
      "x-example": "<USERNAME>",
      "description": "Textmagic username."
    }
  }
}
object MessagingUpdateTopicByIdRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Topic Name."
    },
    "subscribe": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "[\"any\"]",
      "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long."
    }
  }
}
object MessagingUpdateTwilioProviderRequest
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "x-example": "<FROM>",
      "description": "Sender number."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "authToken": {
      "type": "string",
      "x-example": "<AUTH_TOKEN>",
      "description": "Twilio authentication token."
    },
    "accountSid": {
      "type": "string",
      "x-example": "<ACCOUNT_SID>",
      "description": "Twilio account secret ID."
    }
  }
}
object MessagingUpdateVonageProviderRequest
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "x-example": "<FROM>",
      "description": "Sender number."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Provider name."
    },
    "apiKey": {
      "type": "string",
      "x-example": "<API_KEY>",
      "description": "Vonage API key."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Set as enabled."
    },
    "apiSecret": {
      "type": "string",
      "x-example": "<API_SECRET>",
      "description": "Vonage API secret."
    }
  }
}
object StorageCreateFileRequest
{
  "type": "object",
  "required": [
    "fileId",
    "file"
  ],
  "properties": {
    "file": {
      "type": "string",
      "x-example": null,
      "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/storage#file-input)."
    },
    "fileId": {
      "type": "string",
      "x-example": "<FILE_ID>",
      "description": "File 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.",
      "x-upload-id": true
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "[\"read(\"any\")\"]",
      "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    }
  }
}
object StorageCreateNewBucketRequest
{
  "type": "object",
  "required": [
    "bucketId",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Bucket name"
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled."
    },
    "bucketId": {
      "type": "string",
      "x-example": "<BUCKET_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."
    },
    "antivirus": {
      "type": "boolean",
      "x-example": false,
      "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled"
    },
    "encryption": {
      "type": "boolean",
      "x-example": false,
      "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled"
    },
    "compression": {
      "enum": [
        "none",
        "gzip",
        "zstd"
      ],
      "type": "string",
      "x-example": "none",
      "description": "Compression algorithm choosen for compression. Can be one of none,  [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled",
      "x-enum-keys": [],
      "x-enum-name": null
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "[\"read(\"any\")\"]",
      "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    },
    "fileSecurity": {
      "type": "boolean",
      "x-example": false,
      "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    },
    "maximumFileSize": {
      "type": "integer",
      "x-example": 1,
      "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB."
    },
    "allowedFileExtensions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long."
    }
  }
}
object StorageUpdateBucketByIdRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Bucket name"
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled."
    },
    "antivirus": {
      "type": "boolean",
      "x-example": false,
      "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled"
    },
    "encryption": {
      "type": "boolean",
      "x-example": false,
      "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled"
    },
    "compression": {
      "enum": [
        "none",
        "gzip",
        "zstd"
      ],
      "type": "string",
      "x-example": "none",
      "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled",
      "x-enum-keys": [],
      "x-enum-name": null
    },
    "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)."
    },
    "fileSecurity": {
      "type": "boolean",
      "x-example": false,
      "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    },
    "maximumFileSize": {
      "type": "integer",
      "x-example": 1,
      "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB."
    },
    "allowedFileExtensions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long."
    }
  }
}
object StorageUpdateFileByIdRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Name of the file"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "[\"read(\"any\")\"]",
      "description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    }
  }
}
object TeamsCreateMembershipRequestRequest
{
  "type": "object",
  "required": [
    "roles"
  ],
  "properties": {
    "url": {
      "type": "string",
      "x-example": "https://example.com",
      "description": "URL to redirect the user back to your app from the invitation 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."
    },
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Name of the new team member. Max length: 128 chars."
    },
    "email": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "Email of the new team member."
    },
    "phone": {
      "type": "string",
      "x-example": "+12065550100",
      "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212."
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "ID of the user to be added to a team."
    }
  }
}
object TeamsCreateNewTeamRequest
{
  "type": "object",
  "required": [
    "teamId",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Team name. Max length: 128 chars."
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long."
    },
    "teamId": {
      "type": "string",
      "x-example": "<TEAM_ID>",
      "description": "Team 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 TeamsUpdateMembershipRolesRequest
{
  "type": "object",
  "required": [
    "roles"
  ],
  "properties": {
    "roles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long."
    }
  }
}
object TeamsUpdateMembershipStatusRequest
{
  "type": "object",
  "required": [
    "userId",
    "secret"
  ],
  "properties": {
    "secret": {
      "type": "string",
      "x-example": "<SECRET>",
      "description": "Secret key."
    },
    "userId": {
      "type": "string",
      "x-example": "<USER_ID>",
      "description": "User ID."
    }
  }
}
object TeamsUpdateNameByIdRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "New team name. Max length: 128 chars."
    }
  }
}
object TeamsUpdatePrefsByIdRequest
{
  "type": "object",
  "required": [
    "prefs"
  ],
  "properties": {
    "prefs": {
      "type": "object",
      "x-example": "{}",
      "description": "Prefs key-value JSON object."
    }
  }
}
object UsersCreateArgon2UserRequest
{
  "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": "password",
      "description": "User password hashed using Argon2."
    }
  }
}
object UsersCreateBcryptUserRequest
{
  "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": "password",
      "description": "User password hashed using Bcrypt."
    }
  }
}
object UsersCreateMd5UserRequest
{
  "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": "password",
      "description": "User password hashed using MD5."
    }
  }
}
object UsersCreateNewUserRequest
{
  "type": "object",
  "required": [
    "userId"
  ],
  "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."
    },
    "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": "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": "Plain text user password. Must be at least 8 chars."
    }
  }
}
object UsersCreatePhpassUserRequest
{
  "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 pass the string `ID.unique()`to auto generate it. 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": "password",
      "description": "User password hashed using PHPass."
    }
  }
}
object UsersCreateScryptModifiedUserRequest
{
  "type": "object",
  "required": [
    "userId",
    "email",
    "password",
    "passwordSalt",
    "passwordSaltSeparator",
    "passwordSignerKey"
  ],
  "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": "password",
      "description": "User password hashed using Scrypt Modified."
    },
    "passwordSalt": {
      "type": "string",
      "x-example": "<PASSWORD_SALT>",
      "description": "Salt used to hash password."
    },
    "passwordSignerKey": {
      "type": "string",
      "x-example": "<PASSWORD_SIGNER_KEY>",
      "description": "Signer key used to hash password."
    },
    "passwordSaltSeparator": {
      "type": "string",
      "x-example": "<PASSWORD_SALT_SEPARATOR>",
      "description": "Salt separator used to hash password."
    }
  }
}
object UsersCreateScryptUserRequest
{
  "type": "object",
  "required": [
    "userId",
    "email",
    "password",
    "passwordSalt",
    "passwordCpu",
    "passwordMemory",
    "passwordParallel",
    "passwordLength"
  ],
  "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": "password",
      "description": "User password hashed using Scrypt."
    },
    "passwordCpu": {
      "type": "integer",
      "x-example": null,
      "description": "Optional CPU cost used to hash password."
    },
    "passwordSalt": {
      "type": "string",
      "x-example": "<PASSWORD_SALT>",
      "description": "Optional salt used to hash password."
    },
    "passwordLength": {
      "type": "integer",
      "x-example": null,
      "description": "Optional hash length used to hash password."
    },
    "passwordMemory": {
      "type": "integer",
      "x-example": null,
      "description": "Optional memory cost used to hash password."
    },
    "passwordParallel": {
      "type": "integer",
      "x-example": null,
      "description": "Optional parallelization cost used to hash password."
    }
  }
}
object UsersCreateShaUserRequest
{
  "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": "password",
      "description": "User password hashed using SHA."
    },
    "passwordVersion": {
      "enum": [
        "sha1",
        "sha224",
        "sha256",
        "sha384",
        "sha512/224",
        "sha512/256",
        "sha512",
        "sha3-224",
        "sha3-256",
        "sha3-384",
        "sha3-512"
      ],
      "type": "string",
      "x-example": "sha1",
      "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512/224', 'sha512/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'",
      "x-enum-keys": [],
      "x-enum-name": "PasswordHash"
    }
  }
}
object UsersCreateTargetMessagingRequest
{
  "type": "object",
  "required": [
    "targetId",
    "providerType",
    "identifier"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23."
    },
    "targetId": {
      "type": "string",
      "x-example": "<TARGET_ID>",
      "description": "Target 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."
    },
    "identifier": {
      "type": "string",
      "x-example": "<IDENTIFIER>",
      "description": "The target identifier (token, email, phone etc.)"
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used."
    },
    "providerType": {
      "enum": [
        "email",
        "sms",
        "push"
      ],
      "type": "string",
      "x-example": "email",
      "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.",
      "x-enum-keys": [],
      "x-enum-name": "MessagingProviderType"
    }
  }
}
object UsersCreateTokenSessionRequest
{
  "type": "object",
  "properties": {
    "expire": {
      "type": "integer",
      "x-example": 60,
      "description": "Token expiration period in seconds. The default expiration is 15 minutes."
    },
    "length": {
      "type": "integer",
      "x-example": 4,
      "description": "Token length in characters. The default length is 6 characters"
    }
  }
}
object UsersUpdateEmailByIdRequest
{
  "type": "object",
  "required": [
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "x-example": "email@example.com",
      "description": "User email."
    }
  }
}
object UsersUpdateEmailVerificationRequest
{
  "type": "object",
  "required": [
    "emailVerification"
  ],
  "properties": {
    "emailVerification": {
      "type": "boolean",
      "x-example": false,
      "description": "User email verification status."
    }
  }
}
object UsersUpdateLabelsByIdRequest
{
  "type": "object",
  "required": [
    "labels"
  ],
  "properties": {
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": null,
      "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long."
    }
  }
}
object UsersUpdateMfaStatusRequest
{
  "type": "object",
  "required": [
    "mfa"
  ],
  "properties": {
    "mfa": {
      "type": "boolean",
      "x-example": false,
      "description": "Enable or disable MFA."
    }
  }
}
object UsersUpdatePasswordByIdRequest
{
  "type": "object",
  "required": [
    "password"
  ],
  "properties": {
    "password": {
      "type": "string",
      "x-example": null,
      "description": "New user password. Must be at least 8 chars."
    }
  }
}
object UsersUpdatePhoneByIdRequest
{
  "type": "object",
  "required": [
    "number"
  ],
  "properties": {
    "number": {
      "type": "string",
      "x-example": "+12065550100",
      "description": "User phone number."
    }
  }
}
object UsersUpdatePhoneVerificationRequest
{
  "type": "object",
  "required": [
    "phoneVerification"
  ],
  "properties": {
    "phoneVerification": {
      "type": "boolean",
      "x-example": false,
      "description": "User phone verification status."
    }
  }
}
object UsersUpdatePreferencesByIdRequest
{
  "type": "object",
  "required": [
    "prefs"
  ],
  "properties": {
    "prefs": {
      "type": "object",
      "x-example": "{}",
      "description": "Prefs key-value JSON object."
    }
  }
}
object UsersUpdateStatusRequest
{
  "type": "object",
  "required": [
    "status"
  ],
  "properties": {
    "status": {
      "type": "boolean",
      "x-example": false,
      "description": "User Status. To activate the user pass `true` and to block the user pass `false`."
    }
  }
}
object UsersUpdateTargetMessagingRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23."
    },
    "identifier": {
      "type": "string",
      "x-example": "<IDENTIFIER>",
      "description": "The target identifier (token, email, phone etc.)"
    },
    "providerId": {
      "type": "string",
      "x-example": "<PROVIDER_ID>",
      "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used."
    }
  }
}
object UsersUpdateUserByNameRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "<NAME>",
      "description": "User name. Max length: 128 chars."
    }
  }
}
object algoArgon2
{
  "type": "object",
  "required": [
    "type",
    "memoryCost",
    "timeCost",
    "threads"
  ],
  "properties": {
    "type": {
      "type": "string",
      "x-example": "argon2",
      "description": "Algo type."
    },
    "threads": {
      "type": "integer",
      "format": "int32",
      "x-example": 3,
      "description": "Number of threads used to compute hash."
    },
    "timeCost": {
      "type": "integer",
      "format": "int32",
      "x-example": 4,
      "description": "Amount of time consumed to compute hash"
    },
    "memoryCost": {
      "type": "integer",
      "format": "int32",
      "x-example": 65536,
      "description": "Memory used to compute hash."
    }
  },
  "description": "AlgoArgon2"
}
object algoBcrypt
{
  "type": "object",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string",
      "x-example": "bcrypt",
      "description": "Algo type."
    }
  },
  "description": "AlgoBcrypt"
}
object algoMd5
{
  "type": "object",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string",
      "x-example": "md5",
      "description": "Algo type."
    }
  },
  "description": "AlgoMD5"
}
object algoPhpass
{
  "type": "object",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string",
      "x-example": "phpass",
      "description": "Algo type."
    }
  },
  "description": "AlgoPHPass"
}
object algoScrypt
{
  "type": "object",
  "required": [
    "type",
    "costCpu",
    "costMemory",
    "costParallel",
    "length"
  ],
  "properties": {
    "type": {
      "type": "string",
      "x-example": "scrypt",
      "description": "Algo type."
    },
    "length": {
      "type": "integer",
      "format": "int32",
      "x-example": 64,
      "description": "Length used to compute hash."
    },
    "costCpu": {
      "type": "integer",
      "format": "int32",
      "x-example": 8,
      "description": "CPU complexity of computed hash."
    },
    "costMemory": {
      "type": "integer",
      "format": "int32",
      "x-example": 14,
      "description": "Memory complexity of computed hash."
    },
    "costParallel": {
      "type": "integer",
      "format": "int32",
      "x-example": 1,
      "description": "Parallelization of computed hash."
    }
  },
  "description": "AlgoScrypt"
}
object algoScryptModified
{
  "type": "object",
  "required": [
    "type",
    "salt",
    "saltSeparator",
    "signerKey"
  ],
  "properties": {
    "salt": {
      "type": "string",
      "x-example": "UxLMreBr6tYyjQ==",
      "description": "Salt used to compute hash."
    },
    "type": {
      "type": "string",
      "x-example": "scryptMod",
      "description": "Algo type."
    },
    "signerKey": {
      "type": "string",
      "x-example": "XyEKE9RcTDeLEsL/RjwPDBv/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==",
      "description": "Key used to compute hash."
    },
    "saltSeparator": {
      "type": "string",
      "x-example": "Bw==",
      "description": "Separator used to compute hash."
    }
  },
  "description": "AlgoScryptModified"
}
object algoSha
{
  "type": "object",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string",
      "x-example": "sha",
      "description": "Algo type."
    }
  },
  "description": "AlgoSHA"
}
object any
{
  "type": "object",
  "description": "Any",
  "additionalProperties": true
}
object attributeBoolean
{
  "type": "object",
  "required": [
    "key",
    "type",
    "status",
    "error",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "isEnabled",
      "description": "Attribute Key."
    },
    "type": {
      "type": "string",
      "x-example": "boolean",
      "description": "Attribute type."
    },
    "array": {
      "type": "boolean",
      "nullable": true,
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "error": {
      "type": "string",
      "x-example": "string",
      "description": "Error message. Displays error generated on failure of creating or deleting an attribute."
    },
    "status": {
      "type": "string",
      "x-example": "available",
      "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`"
    },
    "default": {
      "type": "boolean",
      "nullable": true,
      "x-example": false,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": true,
      "description": "Is attribute required?"
    }
  },
  "description": "AttributeBoolean"
}
object attributeDatetime
{
  "type": "object",
  "required": [
    "key",
    "type",
    "status",
    "error",
    "required",
    "format"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "birthDay",
      "description": "Attribute Key."
    },
    "type": {
      "type": "string",
      "x-example": "datetime",
      "description": "Attribute type."
    },
    "array": {
      "type": "boolean",
      "nullable": true,
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "error": {
      "type": "string",
      "x-example": "string",
      "description": "Error message. Displays error generated on failure of creating or deleting an attribute."
    },
    "format": {
      "type": "string",
      "x-example": "datetime",
      "description": "ISO 8601 format."
    },
    "status": {
      "type": "string",
      "x-example": "available",
      "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`"
    },
    "default": {
      "type": "string",
      "nullable": true,
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Default value for attribute when not provided. Only null is optional"
    },
    "required": {
      "type": "boolean",
      "x-example": true,
      "description": "Is attribute required?"
    }
  },
  "description": "AttributeDatetime"
}
object attributeEmail
{
  "type": "object",
  "required": [
    "key",
    "type",
    "status",
    "error",
    "required",
    "format"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "userEmail",
      "description": "Attribute Key."
    },
    "type": {
      "type": "string",
      "x-example": "string",
      "description": "Attribute type."
    },
    "array": {
      "type": "boolean",
      "nullable": true,
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "error": {
      "type": "string",
      "x-example": "string",
      "description": "Error message. Displays error generated on failure of creating or deleting an attribute."
    },
    "format": {
      "type": "string",
      "x-example": "email",
      "description": "String format."
    },
    "status": {
      "type": "string",
      "x-example": "available",
      "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`"
    },
    "default": {
      "type": "string",
      "nullable": true,
      "x-example": "default@example.com",
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": true,
      "description": "Is attribute required?"
    }
  },
  "description": "AttributeEmail"
}
object attributeEnum
{
  "type": "object",
  "required": [
    "key",
    "type",
    "status",
    "error",
    "required",
    "elements",
    "format"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "status",
      "description": "Attribute Key."
    },
    "type": {
      "type": "string",
      "x-example": "string",
      "description": "Attribute type."
    },
    "array": {
      "type": "boolean",
      "nullable": true,
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "error": {
      "type": "string",
      "x-example": "string",
      "description": "Error message. Displays error generated on failure of creating or deleting an attribute."
    },
    "format": {
      "type": "string",
      "x-example": "enum",
      "description": "String format."
    },
    "status": {
      "type": "string",
      "x-example": "available",
      "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`"
    },
    "default": {
      "type": "string",
      "nullable": true,
      "x-example": "element",
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "elements": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "element",
      "description": "Array of elements in enumerated type."
    },
    "required": {
      "type": "boolean",
      "x-example": true,
      "description": "Is attribute required?"
    }
  },
  "description": "AttributeEnum"
}
object attributeFloat
{
  "type": "object",
  "required": [
    "key",
    "type",
    "status",
    "error",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "percentageCompleted",
      "description": "Attribute Key."
    },
    "max": {
      "type": "number",
      "format": "double",
      "nullable": true,
      "x-example": 10.5,
      "description": "Maximum value to enforce for new documents."
    },
    "min": {
      "type": "number",
      "format": "double",
      "nullable": true,
      "x-example": 1.5,
      "description": "Minimum value to enforce for new documents."
    },
    "type": {
      "type": "string",
      "x-example": "double",
      "description": "Attribute type."
    },
    "array": {
      "type": "boolean",
      "nullable": true,
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "error": {
      "type": "string",
      "x-example": "string",
      "description": "Error message. Displays error generated on failure of creating or deleting an attribute."
    },
    "status": {
      "type": "string",
      "x-example": "available",
      "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`"
    },
    "default": {
      "type": "number",
      "format": "double",
      "nullable": true,
      "x-example": 2.5,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": true,
      "description": "Is attribute required?"
    }
  },
  "description": "AttributeFloat"
}
object attributeInteger
{
  "type": "object",
  "required": [
    "key",
    "type",
    "status",
    "error",
    "required"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "count",
      "description": "Attribute Key."
    },
    "max": {
      "type": "integer",
      "format": "int32",
      "nullable": true,
      "x-example": 10,
      "description": "Maximum value to enforce for new documents."
    },
    "min": {
      "type": "integer",
      "format": "int32",
      "nullable": true,
      "x-example": 1,
      "description": "Minimum value to enforce for new documents."
    },
    "type": {
      "type": "string",
      "x-example": "integer",
      "description": "Attribute type."
    },
    "array": {
      "type": "boolean",
      "nullable": true,
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "error": {
      "type": "string",
      "x-example": "string",
      "description": "Error message. Displays error generated on failure of creating or deleting an attribute."
    },
    "status": {
      "type": "string",
      "x-example": "available",
      "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`"
    },
    "default": {
      "type": "integer",
      "format": "int32",
      "nullable": true,
      "x-example": 10,
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": true,
      "description": "Is attribute required?"
    }
  },
  "description": "AttributeInteger"
}
object attributeIp
{
  "type": "object",
  "required": [
    "key",
    "type",
    "status",
    "error",
    "required",
    "format"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "ipAddress",
      "description": "Attribute Key."
    },
    "type": {
      "type": "string",
      "x-example": "string",
      "description": "Attribute type."
    },
    "array": {
      "type": "boolean",
      "nullable": true,
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "error": {
      "type": "string",
      "x-example": "string",
      "description": "Error message. Displays error generated on failure of creating or deleting an attribute."
    },
    "format": {
      "type": "string",
      "x-example": "ip",
      "description": "String format."
    },
    "status": {
      "type": "string",
      "x-example": "available",
      "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`"
    },
    "default": {
      "type": "string",
      "nullable": true,
      "x-example": "192.0.2.0",
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": true,
      "description": "Is attribute required?"
    }
  },
  "description": "AttributeIP"
}
object attributeList
{
  "type": "object",
  "required": [
    "total",
    "attributes"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of attributes in the given collection."
    },
    "attributes": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$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"
          }
        ]
      },
      "x-example": "",
      "description": "List of attributes."
    }
  },
  "description": "Attributes List"
}
object attributeRelationship
{
  "type": "object",
  "required": [
    "key",
    "type",
    "status",
    "error",
    "required",
    "relatedCollection",
    "relationType",
    "twoWay",
    "twoWayKey",
    "onDelete",
    "side"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "fullName",
      "description": "Attribute Key."
    },
    "side": {
      "type": "string",
      "x-example": "parent|child",
      "description": "Whether this is the parent or child side of the relationship"
    },
    "type": {
      "type": "string",
      "x-example": "string",
      "description": "Attribute type."
    },
    "array": {
      "type": "boolean",
      "nullable": true,
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "error": {
      "type": "string",
      "x-example": "string",
      "description": "Error message. Displays error generated on failure of creating or deleting an attribute."
    },
    "status": {
      "type": "string",
      "x-example": "available",
      "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`"
    },
    "twoWay": {
      "type": "boolean",
      "x-example": false,
      "description": "Is the relationship two-way?"
    },
    "onDelete": {
      "type": "string",
      "x-example": "restrict|cascade|setNull",
      "description": "How deleting the parent document will propagate to child documents."
    },
    "required": {
      "type": "boolean",
      "x-example": true,
      "description": "Is attribute required?"
    },
    "twoWayKey": {
      "type": "string",
      "x-example": "string",
      "description": "The key of the two-way relationship."
    },
    "relationType": {
      "type": "string",
      "x-example": "oneToOne|oneToMany|manyToOne|manyToMany",
      "description": "The type of the relationship."
    },
    "relatedCollection": {
      "type": "string",
      "x-example": "collection",
      "description": "The ID of the related collection."
    }
  },
  "description": "AttributeRelationship"
}
object attributeString
{
  "type": "object",
  "required": [
    "key",
    "type",
    "status",
    "error",
    "required",
    "size"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "fullName",
      "description": "Attribute Key."
    },
    "size": {
      "type": "integer",
      "format": "int32",
      "x-example": 128,
      "description": "Attribute size."
    },
    "type": {
      "type": "string",
      "x-example": "string",
      "description": "Attribute type."
    },
    "array": {
      "type": "boolean",
      "nullable": true,
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "error": {
      "type": "string",
      "x-example": "string",
      "description": "Error message. Displays error generated on failure of creating or deleting an attribute."
    },
    "status": {
      "type": "string",
      "x-example": "available",
      "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`"
    },
    "default": {
      "type": "string",
      "nullable": true,
      "x-example": "default",
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": true,
      "description": "Is attribute required?"
    }
  },
  "description": "AttributeString"
}
object attributeUrl
{
  "type": "object",
  "required": [
    "key",
    "type",
    "status",
    "error",
    "required",
    "format"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "githubUrl",
      "description": "Attribute Key."
    },
    "type": {
      "type": "string",
      "x-example": "string",
      "description": "Attribute type."
    },
    "array": {
      "type": "boolean",
      "nullable": true,
      "x-example": false,
      "description": "Is attribute an array?"
    },
    "error": {
      "type": "string",
      "x-example": "string",
      "description": "Error message. Displays error generated on failure of creating or deleting an attribute."
    },
    "format": {
      "type": "string",
      "x-example": "url",
      "description": "String format."
    },
    "status": {
      "type": "string",
      "x-example": "available",
      "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`"
    },
    "default": {
      "type": "string",
      "nullable": true,
      "x-example": "http://example.com",
      "description": "Default value for attribute when not provided. Cannot be set when attribute is required."
    },
    "required": {
      "type": "boolean",
      "x-example": true,
      "description": "Is attribute required?"
    }
  },
  "description": "AttributeURL"
}
object bucket
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "$permissions",
    "fileSecurity",
    "name",
    "enabled",
    "maximumFileSize",
    "allowedFileExtensions",
    "compression",
    "encryption",
    "antivirus"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Bucket ID."
    },
    "name": {
      "type": "string",
      "x-example": "Documents",
      "description": "Bucket name."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Bucket enabled."
    },
    "antivirus": {
      "type": "boolean",
      "x-example": false,
      "description": "Virus scanning is enabled."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Bucket creation time in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Bucket update date in ISO 8601 format."
    },
    "encryption": {
      "type": "boolean",
      "x-example": false,
      "description": "Bucket is encrypted."
    },
    "compression": {
      "type": "string",
      "x-example": "gzip",
      "description": "Compression algorithm choosen for compression. Will be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd)."
    },
    "$permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "read(\"any\")"
      ],
      "description": "Bucket permissions. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    },
    "fileSecurity": {
      "type": "boolean",
      "x-example": true,
      "description": "Whether file-level security is enabled. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    },
    "maximumFileSize": {
      "type": "integer",
      "format": "int32",
      "x-example": 100,
      "description": "Maximum file size supported."
    },
    "allowedFileExtensions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "jpg",
        "png"
      ],
      "description": "Allowed file extensions."
    }
  },
  "description": "Bucket"
}
object bucketList
{
  "type": "object",
  "required": [
    "total",
    "buckets"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of buckets documents that matched your query."
    },
    "buckets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/bucket"
      },
      "x-example": "",
      "description": "List of buckets."
    }
  },
  "description": "Buckets List"
}
object collection
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "$permissions",
    "databaseId",
    "name",
    "enabled",
    "documentSecurity",
    "attributes",
    "indexes"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Collection ID."
    },
    "name": {
      "type": "string",
      "x-example": "My Collection",
      "description": "Collection name."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys."
    },
    "indexes": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/index"
      },
      "x-example": {},
      "description": "Collection indexes."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Collection creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Collection update date in ISO 8601 format."
    },
    "attributes": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$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"
          }
        ]
      },
      "x-example": {},
      "description": "Collection attributes."
    },
    "databaseId": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Database ID."
    },
    "$permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "read(\"any\")"
      ],
      "description": "Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    },
    "documentSecurity": {
      "type": "boolean",
      "x-example": true,
      "description": "Whether document-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    }
  },
  "description": "Collection"
}
object collectionList
{
  "type": "object",
  "required": [
    "total",
    "collections"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of collections documents that matched your query."
    },
    "collections": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/collection"
      },
      "x-example": "",
      "description": "List of collections."
    }
  },
  "description": "Collections List"
}
object continent
{
  "type": "object",
  "required": [
    "name",
    "code"
  ],
  "properties": {
    "code": {
      "type": "string",
      "x-example": "EU",
      "description": "Continent two letter code."
    },
    "name": {
      "type": "string",
      "x-example": "Europe",
      "description": "Continent name."
    }
  },
  "description": "Continent"
}
object continentList
{
  "type": "object",
  "required": [
    "total",
    "continents"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of continents documents that matched your query."
    },
    "continents": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/continent"
      },
      "x-example": "",
      "description": "List of continents."
    }
  },
  "description": "Continents List"
}
object country
{
  "type": "object",
  "required": [
    "name",
    "code"
  ],
  "properties": {
    "code": {
      "type": "string",
      "x-example": "US",
      "description": "Country two-character ISO 3166-1 alpha code."
    },
    "name": {
      "type": "string",
      "x-example": "United States",
      "description": "Country name."
    }
  },
  "description": "Country"
}
object countryList
{
  "type": "object",
  "required": [
    "total",
    "countries"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of countries documents that matched your query."
    },
    "countries": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/country"
      },
      "x-example": "",
      "description": "List of countries."
    }
  },
  "description": "Countries List"
}
object currency
{
  "type": "object",
  "required": [
    "symbol",
    "name",
    "symbolNative",
    "decimalDigits",
    "rounding",
    "code",
    "namePlural"
  ],
  "properties": {
    "code": {
      "type": "string",
      "x-example": "USD",
      "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format."
    },
    "name": {
      "type": "string",
      "x-example": "US dollar",
      "description": "Currency name."
    },
    "symbol": {
      "type": "string",
      "x-example": "$",
      "description": "Currency symbol."
    },
    "rounding": {
      "type": "number",
      "format": "double",
      "x-example": 0,
      "description": "Currency digit rounding."
    },
    "namePlural": {
      "type": "string",
      "x-example": "US dollars",
      "description": "Currency plural name"
    },
    "symbolNative": {
      "type": "string",
      "x-example": "$",
      "description": "Currency native symbol."
    },
    "decimalDigits": {
      "type": "integer",
      "format": "int32",
      "x-example": 2,
      "description": "Number of decimal digits."
    }
  },
  "description": "Currency"
}
object currencyList
{
  "type": "object",
  "required": [
    "total",
    "currencies"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of currencies documents that matched your query."
    },
    "currencies": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/currency"
      },
      "x-example": "",
      "description": "List of currencies."
    }
  },
  "description": "Currencies List"
}
object database
{
  "type": "object",
  "required": [
    "$id",
    "name",
    "$createdAt",
    "$updatedAt",
    "enabled"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Database ID."
    },
    "name": {
      "type": "string",
      "x-example": "My Database",
      "description": "Database name."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Database creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Database update date in ISO 8601 format."
    }
  },
  "description": "Database"
}
object databaseList
{
  "type": "object",
  "required": [
    "total",
    "databases"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of databases documents that matched your query."
    },
    "databases": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/database"
      },
      "x-example": "",
      "description": "List of databases."
    }
  },
  "description": "Databases List"
}
object deployment
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "type",
    "resourceId",
    "resourceType",
    "entrypoint",
    "size",
    "buildId",
    "activate",
    "status",
    "buildLogs",
    "buildTime",
    "providerRepositoryName",
    "providerRepositoryOwner",
    "providerRepositoryUrl",
    "providerBranch",
    "providerCommitHash",
    "providerCommitAuthorUrl",
    "providerCommitAuthor",
    "providerCommitMessage",
    "providerCommitUrl",
    "providerBranchUrl"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Deployment ID."
    },
    "size": {
      "type": "integer",
      "format": "int32",
      "x-example": 128,
      "description": "The code size in bytes."
    },
    "type": {
      "type": "string",
      "x-example": "vcs",
      "description": "Type of deployment."
    },
    "status": {
      "type": "string",
      "x-example": "ready",
      "description": "The deployment status. Possible values are \"processing\", \"building\", \"waiting\", \"ready\", and \"failed\"."
    },
    "buildId": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "The current build ID."
    },
    "activate": {
      "type": "boolean",
      "x-example": true,
      "description": "Whether the deployment should be automatically activated."
    },
    "buildLogs": {
      "type": "string",
      "x-example": "Compiling source files...",
      "description": "The build logs."
    },
    "buildTime": {
      "type": "integer",
      "format": "int32",
      "x-example": 128,
      "description": "The current build time in seconds."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Deployment creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Deployment update date in ISO 8601 format."
    },
    "entrypoint": {
      "type": "string",
      "x-example": "index.js",
      "description": "The entrypoint file to use to execute the deployment code."
    },
    "resourceId": {
      "type": "string",
      "x-example": "5e5ea6g16897e",
      "description": "Resource ID."
    },
    "resourceType": {
      "type": "string",
      "x-example": "functions",
      "description": "Resource type."
    },
    "providerBranch": {
      "type": "string",
      "x-example": "0.7.x",
      "description": "The branch of the vcs repository"
    },
    "providerBranchUrl": {
      "type": "string",
      "x-example": "https://github.com/vermakhushboo/appwrite/tree/0.7.x",
      "description": "The branch of the vcs repository"
    },
    "providerCommitUrl": {
      "type": "string",
      "x-example": "https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb",
      "description": "The url of the vcs commit"
    },
    "providerCommitHash": {
      "type": "string",
      "x-example": "7c3f25d",
      "description": "The commit hash of the vcs commit"
    },
    "providerCommitAuthor": {
      "type": "string",
      "x-example": "Khushboo Verma",
      "description": "The name of vcs commit author"
    },
    "providerCommitMessage": {
      "type": "string",
      "x-example": "Update index.js",
      "description": "The commit message"
    },
    "providerRepositoryUrl": {
      "type": "string",
      "x-example": "https://github.com/vermakhushboo/g4-node-function",
      "description": "The url of the vcs provider repository"
    },
    "providerRepositoryName": {
      "type": "string",
      "x-example": "database",
      "description": "The name of the vcs provider repository"
    },
    "providerCommitAuthorUrl": {
      "type": "string",
      "x-example": "https://github.com/vermakhushboo",
      "description": "The url of vcs commit author"
    },
    "providerRepositoryOwner": {
      "type": "string",
      "x-example": "utopia",
      "description": "The name of the vcs provider repository owner"
    }
  },
  "description": "Deployment"
}
object deploymentList
{
  "type": "object",
  "required": [
    "total",
    "deployments"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of deployments documents that matched your query."
    },
    "deployments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/deployment"
      },
      "x-example": "",
      "description": "List of deployments."
    }
  },
  "description": "Deployments List"
}
object document
{
  "type": "object",
  "required": [
    "$id",
    "$collectionId",
    "$databaseId",
    "$createdAt",
    "$updatedAt",
    "$permissions"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Document ID."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Document creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Document update date in ISO 8601 format."
    },
    "$databaseId": {
      "type": "string",
      "x-example": "5e5ea5c15117e",
      "description": "Database ID."
    },
    "$permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "read(\"any\")"
      ],
      "description": "Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    },
    "$collectionId": {
      "type": "string",
      "x-example": "5e5ea5c15117e",
      "description": "Collection ID."
    }
  },
  "description": "Document",
  "additionalProperties": true
}
object documentList
{
  "type": "object",
  "required": [
    "total",
    "documents"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of documents documents that matched your query."
    },
    "documents": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/document"
      },
      "x-example": "",
      "description": "List of documents."
    }
  },
  "description": "Documents List"
}
object error
{
  "type": "object",
  "required": [
    "message",
    "code",
    "type",
    "version"
  ],
  "properties": {
    "code": {
      "type": "string",
      "x-example": "404",
      "description": "Error code."
    },
    "type": {
      "type": "string",
      "x-example": "not_found",
      "description": "Error type. You can learn more about all the error types at https://appwrite.io/docs/error-codes#errorTypes"
    },
    "message": {
      "type": "string",
      "x-example": "Not found",
      "description": "Error message."
    },
    "version": {
      "type": "string",
      "x-example": "1.0",
      "description": "Server version number."
    }
  },
  "description": "Error"
}
object execution
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "$permissions",
    "functionId",
    "trigger",
    "status",
    "requestMethod",
    "requestPath",
    "requestHeaders",
    "responseStatusCode",
    "responseBody",
    "responseHeaders",
    "logs",
    "errors",
    "duration"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Execution ID."
    },
    "logs": {
      "type": "string",
      "x-example": "",
      "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload."
    },
    "errors": {
      "type": "string",
      "x-example": "",
      "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload."
    },
    "status": {
      "type": "string",
      "x-example": "processing",
      "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`."
    },
    "trigger": {
      "type": "string",
      "x-example": "http",
      "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`."
    },
    "duration": {
      "type": "number",
      "format": "double",
      "x-example": 0.4,
      "description": "Function execution duration in seconds."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Execution creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Execution upate date in ISO 8601 format."
    },
    "functionId": {
      "type": "string",
      "x-example": "5e5ea6g16897e",
      "description": "Function ID."
    },
    "requestPath": {
      "type": "string",
      "x-example": "/articles?id=5",
      "description": "HTTP request path and query."
    },
    "$permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "any"
      ],
      "description": "Execution roles."
    },
    "responseBody": {
      "type": "string",
      "x-example": "Developers are awesome.",
      "description": "HTTP response body. This will return empty unless execution is created as synchronous."
    },
    "requestMethod": {
      "type": "string",
      "x-example": "GET",
      "description": "HTTP request method type."
    },
    "requestHeaders": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/headers"
      },
      "x-example": [
        {
          "Content-Type": "application/json"
        }
      ],
      "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous."
    },
    "responseHeaders": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/headers"
      },
      "x-example": [
        {
          "Content-Type": "application/json"
        }
      ],
      "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous."
    },
    "responseStatusCode": {
      "type": "integer",
      "format": "int32",
      "x-example": 200,
      "description": "HTTP response status code."
    }
  },
  "description": "Execution"
}
object executionList
{
  "type": "object",
  "required": [
    "total",
    "executions"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of executions documents that matched your query."
    },
    "executions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/execution"
      },
      "x-example": "",
      "description": "List of executions."
    }
  },
  "description": "Executions List"
}
object file
{
  "type": "object",
  "required": [
    "$id",
    "bucketId",
    "$createdAt",
    "$updatedAt",
    "$permissions",
    "name",
    "signature",
    "mimeType",
    "sizeOriginal",
    "chunksTotal",
    "chunksUploaded"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "File ID."
    },
    "name": {
      "type": "string",
      "x-example": "Pink.png",
      "description": "File name."
    },
    "bucketId": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Bucket ID."
    },
    "mimeType": {
      "type": "string",
      "x-example": "image/png",
      "description": "File mime type."
    },
    "signature": {
      "type": "string",
      "x-example": "5d529fd02b544198ae075bd57c1762bb",
      "description": "File MD5 signature."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "File creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "File update date in ISO 8601 format."
    },
    "chunksTotal": {
      "type": "integer",
      "format": "int32",
      "x-example": 17890,
      "description": "Total number of chunks available"
    },
    "$permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "read(\"any\")"
      ],
      "description": "File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions)."
    },
    "sizeOriginal": {
      "type": "integer",
      "format": "int32",
      "x-example": 17890,
      "description": "File original size in bytes."
    },
    "chunksUploaded": {
      "type": "integer",
      "format": "int32",
      "x-example": 17890,
      "description": "Total number of chunks uploaded"
    }
  },
  "description": "File"
}
object fileList
{
  "type": "object",
  "required": [
    "total",
    "files"
  ],
  "properties": {
    "files": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/file"
      },
      "x-example": "",
      "description": "List of files."
    },
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of files documents that matched your query."
    }
  },
  "description": "Files List"
}
object function
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "execute",
    "name",
    "enabled",
    "live",
    "logging",
    "runtime",
    "deployment",
    "vars",
    "events",
    "schedule",
    "timeout",
    "entrypoint",
    "commands",
    "version",
    "installationId",
    "providerRepositoryId",
    "providerBranch",
    "providerRootDirectory",
    "providerSilentMode"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Function ID."
    },
    "live": {
      "type": "boolean",
      "x-example": false,
      "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration."
    },
    "name": {
      "type": "string",
      "x-example": "My Function",
      "description": "Function name."
    },
    "vars": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/variable"
      },
      "x-example": [],
      "description": "Function variables."
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "account.create",
      "description": "Function trigger events."
    },
    "enabled": {
      "type": "boolean",
      "x-example": false,
      "description": "Function enabled."
    },
    "execute": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "users",
      "description": "Execution permissions."
    },
    "logging": {
      "type": "boolean",
      "x-example": false,
      "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project."
    },
    "runtime": {
      "type": "string",
      "x-example": "python-3.8",
      "description": "Function execution runtime."
    },
    "timeout": {
      "type": "integer",
      "format": "int32",
      "x-example": 300,
      "description": "Function execution timeout in seconds."
    },
    "version": {
      "type": "string",
      "x-example": "v2",
      "description": "Version of Open Runtimes used for the function."
    },
    "commands": {
      "type": "string",
      "x-example": "npm install",
      "description": "The build command used to build the deployment."
    },
    "schedule": {
      "type": "string",
      "x-example": "5 4 * * *",
      "description": "Function execution schedult in CRON format."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Function creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Function update date in ISO 8601 format."
    },
    "deployment": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Function's active deployment ID."
    },
    "entrypoint": {
      "type": "string",
      "x-example": "index.js",
      "description": "The entrypoint file used to execute the deployment."
    },
    "installationId": {
      "type": "string",
      "x-example": "6m40at4ejk5h2u9s1hboo",
      "description": "Function VCS (Version Control System) installation id."
    },
    "providerBranch": {
      "type": "string",
      "x-example": "main",
      "description": "VCS (Version Control System) branch name"
    },
    "providerSilentMode": {
      "type": "boolean",
      "x-example": false,
      "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests"
    },
    "providerRepositoryId": {
      "type": "string",
      "x-example": "appwrite",
      "description": "VCS (Version Control System) Repository ID"
    },
    "providerRootDirectory": {
      "type": "string",
      "x-example": "functions/helloWorld",
      "description": "Path to function in VCS (Version Control System) repository"
    }
  },
  "description": "Function"
}
object functionList
{
  "type": "object",
  "required": [
    "total",
    "functions"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of functions documents that matched your query."
    },
    "functions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/function"
      },
      "x-example": "",
      "description": "List of functions."
    }
  },
  "description": "Functions List"
}
object headers
{
  "type": "object",
  "required": [
    "name",
    "value"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "Content-Type",
      "description": "Header name."
    },
    "value": {
      "type": "string",
      "x-example": "application/json",
      "description": "Header value."
    }
  },
  "description": "Headers"
}
object healthAntivirus
{
  "type": "object",
  "required": [
    "version",
    "status"
  ],
  "properties": {
    "status": {
      "type": "string",
      "x-example": "online",
      "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`"
    },
    "version": {
      "type": "string",
      "x-example": "1.0.0",
      "description": "Antivirus version."
    }
  },
  "description": "Health Antivirus"
}
object healthCertificate
{
  "type": "object",
  "required": [
    "name",
    "subjectSN",
    "issuerOrganisation",
    "validFrom",
    "validTo",
    "signatureTypeSN"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "/CN=www.google.com",
      "description": "Certificate name"
    },
    "validTo": {
      "type": "string",
      "x-example": "1711458597",
      "description": "Valid to"
    },
    "subjectSN": {
      "type": "string",
      "x-example": "",
      "description": "Subject SN"
    },
    "validFrom": {
      "type": "string",
      "x-example": "1704200998",
      "description": "Valid from"
    },
    "signatureTypeSN": {
      "type": "string",
      "x-example": "RSA-SHA256",
      "description": "Signature type SN"
    },
    "issuerOrganisation": {
      "type": "string",
      "x-example": "",
      "description": "Issuer organisation"
    }
  },
  "description": "Health Certificate"
}
object healthQueue
{
  "type": "object",
  "required": [
    "size"
  ],
  "properties": {
    "size": {
      "type": "integer",
      "format": "int32",
      "x-example": 8,
      "description": "Amount of actions in the queue."
    }
  },
  "description": "Health Queue"
}
object healthStatus
{
  "type": "object",
  "required": [
    "name",
    "ping",
    "status"
  ],
  "properties": {
    "name": {
      "type": "string",
      "x-example": "database",
      "description": "Name of the service."
    },
    "ping": {
      "type": "integer",
      "format": "int32",
      "x-example": 128,
      "description": "Duration in milliseconds how long the health check took."
    },
    "status": {
      "type": "string",
      "x-example": "pass",
      "description": "Service status. Possible values can are: `pass`, `fail`"
    }
  },
  "description": "Health Status"
}
object healthTime
{
  "type": "object",
  "required": [
    "remoteTime",
    "localTime",
    "diff"
  ],
  "properties": {
    "diff": {
      "type": "integer",
      "format": "int32",
      "x-example": 93,
      "description": "Difference of unix remote and local timestamps in milliseconds."
    },
    "localTime": {
      "type": "integer",
      "format": "int32",
      "x-example": 1639490844,
      "description": "Current unix timestamp of local server where Appwrite runs."
    },
    "remoteTime": {
      "type": "integer",
      "format": "int32",
      "x-example": 1639490751,
      "description": "Current unix timestamp on trustful remote server."
    }
  },
  "description": "Health Time"
}
object identity
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "userId",
    "provider",
    "providerUid",
    "providerEmail",
    "providerAccessToken",
    "providerAccessTokenExpiry",
    "providerRefreshToken"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Identity ID."
    },
    "userId": {
      "type": "string",
      "x-example": "5e5bb8c16897e",
      "description": "User ID."
    },
    "provider": {
      "type": "string",
      "x-example": "email",
      "description": "Identity Provider."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Identity creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Identity update date in ISO 8601 format."
    },
    "providerUid": {
      "type": "string",
      "x-example": "5e5bb8c16897e",
      "description": "ID of the User in the Identity Provider."
    },
    "providerEmail": {
      "type": "string",
      "x-example": "user@example.com",
      "description": "Email of the User in the Identity Provider."
    },
    "providerAccessToken": {
      "type": "string",
      "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
      "description": "Identity Provider Access Token."
    },
    "providerRefreshToken": {
      "type": "string",
      "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
      "description": "Identity Provider Refresh Token."
    },
    "providerAccessTokenExpiry": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "The date of when the access token expires in ISO 8601 format."
    }
  },
  "description": "Identity"
}
object identityList
{
  "type": "object",
  "required": [
    "total",
    "identities"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of identities documents that matched your query."
    },
    "identities": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/identity"
      },
      "x-example": "",
      "description": "List of identities."
    }
  },
  "description": "Identities List"
}
object index
{
  "type": "object",
  "required": [
    "key",
    "type",
    "status",
    "error",
    "attributes"
  ],
  "properties": {
    "key": {
      "type": "string",
      "x-example": "index1",
      "description": "Index Key."
    },
    "type": {
      "type": "string",
      "x-example": "primary",
      "description": "Index type."
    },
    "error": {
      "type": "string",
      "x-example": "string",
      "description": "Error message. Displays error generated on failure of creating or deleting an index."
    },
    "orders": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "nullable": true,
      "x-example": [],
      "description": "Index orders."
    },
    "status": {
      "type": "string",
      "x-example": "available",
      "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`"
    },
    "attributes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [],
      "description": "Index attributes."
    }
  },
  "description": "Index"
}
object indexList
{
  "type": "object",
  "required": [
    "total",
    "indexes"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of indexes documents that matched your query."
    },
    "indexes": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/index"
      },
      "x-example": "",
      "description": "List of indexes."
    }
  },
  "description": "Indexes List"
}
object jwt
{
  "type": "object",
  "required": [
    "jwt"
  ],
  "properties": {
    "jwt": {
      "type": "string",
      "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
      "description": "JWT encoded string."
    }
  },
  "description": "JWT"
}
object language
{
  "type": "object",
  "required": [
    "name",
    "code",
    "nativeName"
  ],
  "properties": {
    "code": {
      "type": "string",
      "x-example": "it",
      "description": "Language two-character ISO 639-1 codes."
    },
    "name": {
      "type": "string",
      "x-example": "Italian",
      "description": "Language name."
    },
    "nativeName": {
      "type": "string",
      "x-example": "Italiano",
      "description": "Language native name."
    }
  },
  "description": "Language"
}
object languageList
{
  "type": "object",
  "required": [
    "total",
    "languages"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of languages documents that matched your query."
    },
    "languages": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/language"
      },
      "x-example": "",
      "description": "List of languages."
    }
  },
  "description": "Languages List"
}
object locale
{
  "type": "object",
  "required": [
    "ip",
    "countryCode",
    "country",
    "continentCode",
    "continent",
    "eu",
    "currency"
  ],
  "properties": {
    "eu": {
      "type": "boolean",
      "x-example": false,
      "description": "True if country is part of the European Union."
    },
    "ip": {
      "type": "string",
      "x-example": "127.0.0.1",
      "description": "User IP address."
    },
    "country": {
      "type": "string",
      "x-example": "United States",
      "description": "Country name. This field support localization."
    },
    "currency": {
      "type": "string",
      "x-example": "USD",
      "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format"
    },
    "continent": {
      "type": "string",
      "x-example": "North America",
      "description": "Continent name. This field support localization."
    },
    "countryCode": {
      "type": "string",
      "x-example": "US",
      "description": "Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format"
    },
    "continentCode": {
      "type": "string",
      "x-example": "NA",
      "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America."
    }
  },
  "description": "Locale"
}
object localeCode
{
  "type": "object",
  "required": [
    "code",
    "name"
  ],
  "properties": {
    "code": {
      "type": "string",
      "x-example": "en-us",
      "description": "Locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)"
    },
    "name": {
      "type": "string",
      "x-example": "US",
      "description": "Locale name"
    }
  },
  "description": "LocaleCode"
}
object localeCodeList
{
  "type": "object",
  "required": [
    "total",
    "localeCodes"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of localeCodes documents that matched your query."
    },
    "localeCodes": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/localeCode"
      },
      "x-example": "",
      "description": "List of localeCodes."
    }
  },
  "description": "Locale codes list"
}
object log
{
  "type": "object",
  "required": [
    "event",
    "userId",
    "userEmail",
    "userName",
    "mode",
    "ip",
    "time",
    "osCode",
    "osName",
    "osVersion",
    "clientType",
    "clientCode",
    "clientName",
    "clientVersion",
    "clientEngine",
    "clientEngineVersion",
    "deviceName",
    "deviceBrand",
    "deviceModel",
    "countryCode",
    "countryName"
  ],
  "properties": {
    "ip": {
      "type": "string",
      "x-example": "127.0.0.1",
      "description": "IP session in use when the session was created."
    },
    "mode": {
      "type": "string",
      "x-example": "admin",
      "description": "API mode when event triggered."
    },
    "time": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Log creation date in ISO 8601 format."
    },
    "event": {
      "type": "string",
      "x-example": "account.sessions.create",
      "description": "Event name."
    },
    "osCode": {
      "type": "string",
      "x-example": "Mac",
      "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json)."
    },
    "osName": {
      "type": "string",
      "x-example": "Mac",
      "description": "Operating system name."
    },
    "userId": {
      "type": "string",
      "x-example": "610fc2f985ee0",
      "description": "User ID."
    },
    "userName": {
      "type": "string",
      "x-example": "John Doe",
      "description": "User Name."
    },
    "osVersion": {
      "type": "string",
      "x-example": "Mac",
      "description": "Operating system version."
    },
    "userEmail": {
      "type": "string",
      "x-example": "john@appwrite.io",
      "description": "User Email."
    },
    "clientCode": {
      "type": "string",
      "x-example": "CM",
      "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json)."
    },
    "clientName": {
      "type": "string",
      "x-example": "Chrome Mobile iOS",
      "description": "Client name."
    },
    "clientType": {
      "type": "string",
      "x-example": "browser",
      "description": "Client type."
    },
    "deviceName": {
      "type": "string",
      "x-example": "smartphone",
      "description": "Device name."
    },
    "countryCode": {
      "type": "string",
      "x-example": "US",
      "description": "Country two-character ISO 3166-1 alpha code."
    },
    "countryName": {
      "type": "string",
      "x-example": "United States",
      "description": "Country name."
    },
    "deviceBrand": {
      "type": "string",
      "x-example": "Google",
      "description": "Device brand name."
    },
    "deviceModel": {
      "type": "string",
      "x-example": "Nexus 5",
      "description": "Device model name."
    },
    "clientEngine": {
      "type": "string",
      "x-example": "WebKit",
      "description": "Client engine name."
    },
    "clientVersion": {
      "type": "string",
      "x-example": "84.0",
      "description": "Client version."
    },
    "clientEngineVersion": {
      "type": "string",
      "x-example": "605.1.15",
      "description": "Client engine name."
    }
  },
  "description": "Log"
}
object logList
{
  "type": "object",
  "required": [
    "total",
    "logs"
  ],
  "properties": {
    "logs": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/log"
      },
      "x-example": "",
      "description": "List of logs."
    },
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of logs documents that matched your query."
    }
  },
  "description": "Logs List"
}
object membership
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "userId",
    "userName",
    "userEmail",
    "teamId",
    "teamName",
    "invited",
    "joined",
    "confirm",
    "mfa",
    "roles"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Membership ID."
    },
    "mfa": {
      "type": "boolean",
      "x-example": false,
      "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise."
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "owner"
      ],
      "description": "User list of roles"
    },
    "joined": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format."
    },
    "teamId": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Team ID."
    },
    "userId": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "User ID."
    },
    "confirm": {
      "type": "boolean",
      "x-example": false,
      "description": "User confirmation status, true if the user has joined the team or false otherwise."
    },
    "invited": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Date, the user has been invited to join the team in ISO 8601 format."
    },
    "teamName": {
      "type": "string",
      "x-example": "VIP",
      "description": "Team name."
    },
    "userName": {
      "type": "string",
      "x-example": "John Doe",
      "description": "User name."
    },
    "userEmail": {
      "type": "string",
      "x-example": "john@appwrite.io",
      "description": "User email address."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Membership creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Membership update date in ISO 8601 format."
    }
  },
  "description": "Membership"
}
object membershipList
{
  "type": "object",
  "required": [
    "total",
    "memberships"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of memberships documents that matched your query."
    },
    "memberships": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/membership"
      },
      "x-example": "",
      "description": "List of memberships."
    }
  },
  "description": "Memberships List"
}
object message
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "providerType",
    "topics",
    "users",
    "targets",
    "deliveredTotal",
    "data",
    "status"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Message ID."
    },
    "data": {
      "type": "object",
      "x-example": {
        "content": "Hi there, welcome to Appwrite family.",
        "subject": "Welcome to Appwrite"
      },
      "description": "Data of the message."
    },
    "users": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "5e5ea5c16897e"
      ],
      "description": "User IDs set as recipients."
    },
    "status": {
      "type": "string",
      "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.",
      "description": "Status of delivery."
    },
    "topics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "5e5ea5c16897e"
      ],
      "description": "Topic IDs set as recipients."
    },
    "targets": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "5e5ea5c16897e"
      ],
      "description": "Target IDs set as recipients."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Message creation time in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Message update date in ISO 8601 format."
    },
    "deliveredAt": {
      "type": "string",
      "nullable": true,
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "The time when the message was delivered."
    },
    "scheduledAt": {
      "type": "string",
      "nullable": true,
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "The scheduled time for message."
    },
    "providerType": {
      "type": "string",
      "x-example": "email",
      "description": "Message provider type."
    },
    "deliveredTotal": {
      "type": "integer",
      "format": "int32",
      "x-example": 1,
      "description": "Number of recipients the message was delivered to."
    },
    "deliveryErrors": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "nullable": true,
      "x-example": [
        "Failed to send message to target 5e5ea5c16897e: Credentials not valid."
      ],
      "description": "Delivery errors if any."
    }
  },
  "description": "Message"
}
object messageList
{
  "type": "object",
  "required": [
    "total",
    "messages"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of messages documents that matched your query."
    },
    "messages": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/message"
      },
      "x-example": "",
      "description": "List of messages."
    }
  },
  "description": "Message list"
}
object mfaChallenge
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "userId",
    "expire"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "bb8ea5c16897e",
      "description": "Token ID."
    },
    "expire": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Token expiration date in ISO 8601 format."
    },
    "userId": {
      "type": "string",
      "x-example": "5e5ea5c168bb8",
      "description": "User ID."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Token creation date in ISO 8601 format."
    }
  },
  "description": "MFA Challenge"
}
object mfaFactors
{
  "type": "object",
  "required": [
    "totp",
    "phone",
    "email"
  ],
  "properties": {
    "totp": {
      "type": "boolean",
      "x-example": true,
      "description": "TOTP"
    },
    "email": {
      "type": "boolean",
      "x-example": true,
      "description": "Email"
    },
    "phone": {
      "type": "boolean",
      "x-example": true,
      "description": "Phone"
    }
  },
  "description": "MFAFactors"
}
object mfaRecoveryCodes
{
  "type": "object",
  "required": [
    "recoveryCodes"
  ],
  "properties": {
    "recoveryCodes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "a3kf0-s0cl2",
        "s0co1-as98s"
      ],
      "description": "Recovery codes."
    }
  },
  "description": "MFA Recovery Codes"
}
object mfaType
{
  "type": "object",
  "required": [
    "secret",
    "uri"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "x-example": true,
      "description": "URI for authenticator apps."
    },
    "secret": {
      "type": "string",
      "x-example": true,
      "description": "Secret token used for TOTP factor."
    }
  },
  "description": "MFAType"
}
object phone
{
  "type": "object",
  "required": [
    "code",
    "countryCode",
    "countryName"
  ],
  "properties": {
    "code": {
      "type": "string",
      "x-example": "+1",
      "description": "Phone code."
    },
    "countryCode": {
      "type": "string",
      "x-example": "US",
      "description": "Country two-character ISO 3166-1 alpha code."
    },
    "countryName": {
      "type": "string",
      "x-example": "United States",
      "description": "Country name."
    }
  },
  "description": "Phone"
}
object phoneList
{
  "type": "object",
  "required": [
    "total",
    "phones"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of phones documents that matched your query."
    },
    "phones": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/phone"
      },
      "x-example": "",
      "description": "List of phones."
    }
  },
  "description": "Phones List"
}
object preferences
{
  "type": "object",
  "description": "Preferences",
  "additionalProperties": true
}
object provider
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "name",
    "provider",
    "enabled",
    "type",
    "credentials"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Provider ID."
    },
    "name": {
      "type": "string",
      "x-example": "Mailgun",
      "description": "The name for the provider instance."
    },
    "type": {
      "type": "string",
      "x-example": "sms",
      "description": "Type of provider."
    },
    "enabled": {
      "type": "boolean",
      "x-example": true,
      "description": "Is provider enabled?"
    },
    "options": {
      "type": "object",
      "nullable": true,
      "x-example": {
        "from": "sender-email@mydomain"
      },
      "description": "Provider options."
    },
    "provider": {
      "type": "string",
      "x-example": "mailgun",
      "description": "The name of the provider service."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Provider creation time in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Provider update date in ISO 8601 format."
    },
    "credentials": {
      "type": "object",
      "x-example": {
        "key": "123456789"
      },
      "description": "Provider credentials."
    }
  },
  "description": "Provider"
}
object providerList
{
  "type": "object",
  "required": [
    "total",
    "providers"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of providers documents that matched your query."
    },
    "providers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/provider"
      },
      "x-example": "",
      "description": "List of providers."
    }
  },
  "description": "Provider list"
}
object runtime
{
  "type": "object",
  "required": [
    "$id",
    "name",
    "version",
    "base",
    "image",
    "logo",
    "supports"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "python-3.8",
      "description": "Runtime ID."
    },
    "base": {
      "type": "string",
      "x-example": "python:3.8-alpine",
      "description": "Base Docker image used to build the runtime."
    },
    "logo": {
      "type": "string",
      "x-example": "python.png",
      "description": "Name of the logo image."
    },
    "name": {
      "type": "string",
      "x-example": "Python",
      "description": "Runtime Name."
    },
    "image": {
      "type": "string",
      "x-example": "appwrite\\/runtime-for-python:3.8",
      "description": "Image name of Docker Hub."
    },
    "version": {
      "type": "string",
      "x-example": "3.8",
      "description": "Runtime version."
    },
    "supports": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "amd64",
      "description": "List of supported architectures."
    }
  },
  "description": "Runtime"
}
object runtimeList
{
  "type": "object",
  "required": [
    "total",
    "runtimes"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of runtimes documents that matched your query."
    },
    "runtimes": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/runtime"
      },
      "x-example": "",
      "description": "List of runtimes."
    }
  },
  "description": "Runtimes List"
}
object session
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "userId",
    "expire",
    "provider",
    "providerUid",
    "providerAccessToken",
    "providerAccessTokenExpiry",
    "providerRefreshToken",
    "ip",
    "osCode",
    "osName",
    "osVersion",
    "clientType",
    "clientCode",
    "clientName",
    "clientVersion",
    "clientEngine",
    "clientEngineVersion",
    "deviceName",
    "deviceBrand",
    "deviceModel",
    "countryCode",
    "countryName",
    "current",
    "factors",
    "secret",
    "mfaUpdatedAt"
  ],
  "properties": {
    "ip": {
      "type": "string",
      "x-example": "127.0.0.1",
      "description": "IP in use when the session was created."
    },
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Session ID."
    },
    "expire": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Session expiration date in ISO 8601 format."
    },
    "osCode": {
      "type": "string",
      "x-example": "Mac",
      "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json)."
    },
    "osName": {
      "type": "string",
      "x-example": "Mac",
      "description": "Operating system name."
    },
    "secret": {
      "type": "string",
      "x-example": "5e5bb8c16897e",
      "description": "Secret used to authenticate the user. Only included if the request was made with an API key"
    },
    "userId": {
      "type": "string",
      "x-example": "5e5bb8c16897e",
      "description": "User ID."
    },
    "current": {
      "type": "boolean",
      "x-example": true,
      "description": "Returns true if this the current user session."
    },
    "factors": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "email"
      ],
      "description": "Returns a list of active session factors."
    },
    "provider": {
      "type": "string",
      "x-example": "email",
      "description": "Session Provider."
    },
    "osVersion": {
      "type": "string",
      "x-example": "Mac",
      "description": "Operating system version."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Session creation date in ISO 8601 format."
    },
    "clientCode": {
      "type": "string",
      "x-example": "CM",
      "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json)."
    },
    "clientName": {
      "type": "string",
      "x-example": "Chrome Mobile iOS",
      "description": "Client name."
    },
    "clientType": {
      "type": "string",
      "x-example": "browser",
      "description": "Client type."
    },
    "deviceName": {
      "type": "string",
      "x-example": "smartphone",
      "description": "Device name."
    },
    "countryCode": {
      "type": "string",
      "x-example": "US",
      "description": "Country two-character ISO 3166-1 alpha code."
    },
    "countryName": {
      "type": "string",
      "x-example": "United States",
      "description": "Country name."
    },
    "deviceBrand": {
      "type": "string",
      "x-example": "Google",
      "description": "Device brand name."
    },
    "deviceModel": {
      "type": "string",
      "x-example": "Nexus 5",
      "description": "Device model name."
    },
    "providerUid": {
      "type": "string",
      "x-example": "user@example.com",
      "description": "Session Provider User ID."
    },
    "clientEngine": {
      "type": "string",
      "x-example": "WebKit",
      "description": "Client engine name."
    },
    "mfaUpdatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge."
    },
    "clientVersion": {
      "type": "string",
      "x-example": "84.0",
      "description": "Client version."
    },
    "clientEngineVersion": {
      "type": "string",
      "x-example": "605.1.15",
      "description": "Client engine name."
    },
    "providerAccessToken": {
      "type": "string",
      "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
      "description": "Session Provider Access Token."
    },
    "providerRefreshToken": {
      "type": "string",
      "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
      "description": "Session Provider Refresh Token."
    },
    "providerAccessTokenExpiry": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "The date of when the access token expires in ISO 8601 format."
    }
  },
  "description": "Session"
}
object sessionList
{
  "type": "object",
  "required": [
    "total",
    "sessions"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of sessions documents that matched your query."
    },
    "sessions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/session"
      },
      "x-example": "",
      "description": "List of sessions."
    }
  },
  "description": "Sessions List"
}
object subscriber
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "targetId",
    "target",
    "userId",
    "userName",
    "topicId",
    "providerType"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "259125845563242502",
      "description": "Subscriber ID."
    },
    "target": {
      "type": "object",
      "items": {
        "$ref": "#/components/schemas/target"
      },
      "x-example": {
        "$id": "259125845563242502",
        "name": "ageon-app-email",
        "userId": "5e5ea5c16897e",
        "$createdAt": "2020-10-15T06:38:00.000+00:00",
        "$updatedAt": "2020-10-15T06:38:00.000+00:00",
        "identifier": "random-mail@email.org",
        "providerId": "259125845563242502",
        "providerType": "email"
      },
      "description": "Target."
    },
    "userId": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Topic ID."
    },
    "topicId": {
      "type": "string",
      "x-example": "259125845563242502",
      "description": "Topic ID."
    },
    "targetId": {
      "type": "string",
      "x-example": "259125845563242502",
      "description": "Target ID."
    },
    "userName": {
      "type": "string",
      "x-example": "Aegon Targaryen",
      "description": "User Name."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Subscriber creation time in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Subscriber update date in ISO 8601 format."
    },
    "providerType": {
      "type": "string",
      "x-example": "email",
      "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`."
    }
  },
  "description": "Subscriber"
}
object subscriberList
{
  "type": "object",
  "required": [
    "total",
    "subscribers"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of subscribers documents that matched your query."
    },
    "subscribers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/subscriber"
      },
      "x-example": "",
      "description": "List of subscribers."
    }
  },
  "description": "Subscriber list"
}
object target
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "name",
    "userId",
    "providerType",
    "identifier"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "259125845563242502",
      "description": "Target ID."
    },
    "name": {
      "type": "string",
      "x-example": "Aegon apple token",
      "description": "Target Name."
    },
    "userId": {
      "type": "string",
      "x-example": "259125845563242502",
      "description": "User ID."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Target creation time in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Target update date in ISO 8601 format."
    },
    "identifier": {
      "type": "string",
      "x-example": "token",
      "description": "The target identifier."
    },
    "providerId": {
      "type": "string",
      "nullable": true,
      "x-example": "259125845563242502",
      "description": "Provider ID."
    },
    "providerType": {
      "type": "string",
      "x-example": "email",
      "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`."
    }
  },
  "description": "Target"
}
object targetList
{
  "type": "object",
  "required": [
    "total",
    "targets"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of targets documents that matched your query."
    },
    "targets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/target"
      },
      "x-example": "",
      "description": "List of targets."
    }
  },
  "description": "Target list"
}
object team
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "name",
    "total",
    "prefs"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Team ID."
    },
    "name": {
      "type": "string",
      "x-example": "VIP",
      "description": "Team name."
    },
    "prefs": {
      "type": "object",
      "items": {
        "$ref": "#/components/schemas/preferences"
      },
      "x-example": {
        "theme": "pink",
        "timezone": "UTC"
      },
      "description": "Team preferences as a key-value object"
    },
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 7,
      "description": "Total number of team members."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Team creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Team update date in ISO 8601 format."
    }
  },
  "description": "Team"
}
object teamList
{
  "type": "object",
  "required": [
    "total",
    "teams"
  ],
  "properties": {
    "teams": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/team"
      },
      "x-example": "",
      "description": "List of teams."
    },
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of teams documents that matched your query."
    }
  },
  "description": "Teams List"
}
object token
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "userId",
    "secret",
    "expire",
    "phrase"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "bb8ea5c16897e",
      "description": "Token ID."
    },
    "expire": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Token expiration date in ISO 8601 format."
    },
    "phrase": {
      "type": "string",
      "x-example": "Golden Fox",
      "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email."
    },
    "secret": {
      "type": "string",
      "x-example": "",
      "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload."
    },
    "userId": {
      "type": "string",
      "x-example": "5e5ea5c168bb8",
      "description": "User ID."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Token creation date in ISO 8601 format."
    }
  },
  "description": "Token"
}
object topic
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "name",
    "emailTotal",
    "smsTotal",
    "pushTotal",
    "subscribe"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "259125845563242502",
      "description": "Topic ID."
    },
    "name": {
      "type": "string",
      "x-example": "events",
      "description": "The name of the topic."
    },
    "smsTotal": {
      "type": "integer",
      "format": "int32",
      "x-example": 100,
      "description": "Total count of SMS subscribers subscribed to the topic."
    },
    "pushTotal": {
      "type": "integer",
      "format": "int32",
      "x-example": 100,
      "description": "Total count of push subscribers subscribed to the topic."
    },
    "subscribe": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "users",
      "description": "Subscribe permissions."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Topic creation time in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Topic update date in ISO 8601 format."
    },
    "emailTotal": {
      "type": "integer",
      "format": "int32",
      "x-example": 100,
      "description": "Total count of email subscribers subscribed to the topic."
    }
  },
  "description": "Topic"
}
object topicList
{
  "type": "object",
  "required": [
    "total",
    "topics"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of topics documents that matched your query."
    },
    "topics": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/topic"
      },
      "x-example": "",
      "description": "List of topics."
    }
  },
  "description": "Topic list"
}
object user
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "name",
    "registration",
    "status",
    "labels",
    "passwordUpdate",
    "email",
    "phone",
    "emailVerification",
    "phoneVerification",
    "mfa",
    "prefs",
    "targets",
    "accessedAt"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "User ID."
    },
    "mfa": {
      "type": "boolean",
      "x-example": true,
      "description": "Multi factor authentication status."
    },
    "hash": {
      "type": "string",
      "nullable": true,
      "x-example": "argon2",
      "description": "Password hashing algorithm."
    },
    "name": {
      "type": "string",
      "x-example": "John Doe",
      "description": "User name."
    },
    "email": {
      "type": "string",
      "x-example": "john@appwrite.io",
      "description": "User email address."
    },
    "phone": {
      "type": "string",
      "x-example": "+4930901820",
      "description": "User phone number in E.164 format."
    },
    "prefs": {
      "type": "object",
      "items": {
        "$ref": "#/components/schemas/preferences"
      },
      "x-example": {
        "theme": "pink",
        "timezone": "UTC"
      },
      "description": "User preferences as a key-value object"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "vip"
      ],
      "description": "Labels for the user."
    },
    "status": {
      "type": "boolean",
      "x-example": true,
      "description": "User status. Pass `true` for enabled and `false` for disabled."
    },
    "targets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/target"
      },
      "x-example": [],
      "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider."
    },
    "password": {
      "type": "string",
      "nullable": true,
      "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L/4LdgrVRXxE",
      "description": "Hashed user password."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "User creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "User update date in ISO 8601 format."
    },
    "accessedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours."
    },
    "hashOptions": {
      "type": "object",
      "items": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/algoArgon2"
          },
          {
            "$ref": "#/components/schemas/algoScrypt"
          },
          {
            "$ref": "#/components/schemas/algoScryptModified"
          },
          {
            "$ref": "#/components/schemas/algoBcrypt"
          },
          {
            "$ref": "#/components/schemas/algoPhpass"
          },
          {
            "$ref": "#/components/schemas/algoSha"
          },
          {
            "$ref": "#/components/schemas/algoMd5"
          }
        ]
      },
      "nullable": true,
      "x-example": {},
      "description": "Password hashing algorithm configuration."
    },
    "registration": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "User registration date in ISO 8601 format."
    },
    "passwordUpdate": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Password update time in ISO 8601 format."
    },
    "emailVerification": {
      "type": "boolean",
      "x-example": true,
      "description": "Email verification status."
    },
    "phoneVerification": {
      "type": "boolean",
      "x-example": true,
      "description": "Phone verification status."
    }
  },
  "description": "User"
}
object userList
{
  "type": "object",
  "required": [
    "total",
    "users"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of users documents that matched your query."
    },
    "users": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/user"
      },
      "x-example": "",
      "description": "List of users."
    }
  },
  "description": "Users List"
}
object variable
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "key",
    "value",
    "resourceType",
    "resourceId"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Variable ID."
    },
    "key": {
      "type": "string",
      "x-example": "API_KEY",
      "description": "Variable key."
    },
    "value": {
      "type": "string",
      "x-example": "myPa$$word1",
      "description": "Variable value."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Variable creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Variable creation date in ISO 8601 format."
    },
    "resourceId": {
      "type": "string",
      "x-example": "myAwesomeFunction",
      "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function."
    },
    "resourceType": {
      "type": "string",
      "x-example": "function",
      "description": "Service to which the variable belongs. Possible values are \"project\", \"function\""
    }
  },
  "description": "Variable"
}
object variableList
{
  "type": "object",
  "required": [
    "total",
    "variables"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of variables documents that matched your query."
    },
    "variables": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/variable"
      },
      "x-example": "",
      "description": "List of variables."
    }
  },
  "description": "Variables List"
}