Appwrite Server

Open source backend-as-a-service

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

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

Get API Key

Server URLs

https://cloud.appwrite.io/v1

Endpoints

Clear filters

Account 9 endpoints

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

application/json
schema AccountUpdateEmailAddressRequest
Property Type Required
email string required
password string required

Responses

200

User

PATCH /account/email
PATCH /account/mfa

Enable or disable MFA on an account.

operationId: Account_updateMfaStatus

Request Body

application/json
schema AccountUpdateMfaStatusRequest
Property Type Required
mfa boolean required

Responses

200

User

PATCH /account/mfa
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 method. An OTP challenge is required to regenreate recovery codes.

operationId: Account_regenerateMfaRecoveryCodes

Responses

200

MFA Recovery Codes

PATCH /account/mfa/recovery-codes
PATCH /account/name

Update currently logged in user account name.

operationId: Account_updateNameOperation

Request Body

application/json
schema AccountUpdateNameOperationRequest
Property Type Required
name string required

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

application/json
schema AccountUpdatePasswordOperationRequest
Property Type Required
password string required
oldPassword string optional

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 endpoint to send a confirmation SMS.

operationId: Account_updatePhone

Request Body

application/json
schema AccountUpdatePhoneRequest
Property Type Required
phone string required
password string required

Responses

200

User

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

application/json
schema AccountUpdatePreferencesRequest
Property Type Required
prefs object required

Responses

200

User

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

Databases 11 endpoints

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.

key path required string

Attribute Key.

Request Body

application/json
schema DatabasesUpdateBooleanAttributeRequest
Property Type Required
default boolean required
required boolean required

Responses

200

AttributeBoolean

PATCH /databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}
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.

key path required string

Attribute Key.

Request Body

application/json
schema DatabasesUpdateDatetimeAttributeRequest
Property Type Required
default string required
required boolean required

Responses

200

AttributeDatetime

PATCH /databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}
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.

key path required string

Attribute Key.

Request Body

application/json
schema DatabasesUpdateEmailAttributeRequest
Property Type Required
default string required
required boolean required

Responses

200

AttributeEmail

PATCH /databases/{databaseId}/collections/{collectionId}/attributes/email/{key}
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.

key path required string

Attribute Key.

Request Body

application/json
schema DatabasesUpdateEnumAttributeRequest
Property Type Required
default string required
elements array required
required boolean required

Responses

200

AttributeEnum

PATCH /databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}
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.

key path required string

Attribute Key.

Request Body

application/json
schema DatabasesUpdateFloatAttributeRequest
Property Type Required
max number required
min number required
default number required
required boolean required

Responses

200

AttributeFloat

PATCH /databases/{databaseId}/collections/{collectionId}/attributes/float/{key}
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.

key path required string

Attribute Key.

Request Body

application/json
schema DatabasesUpdateIntegerAttributeRequest
Property Type Required
max integer required
min integer required
default integer required
required boolean required

Responses

200

AttributeInteger

PATCH /databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}
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.

key path required string

Attribute Key.

Request Body

application/json
schema DatabasesUpdateIpAttributeRequest
Property Type Required
default string required
required boolean required

Responses

200

AttributeIP

PATCH /databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}
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.

key path required string

Attribute Key.

Request Body

application/json
schema DatabasesUpdateStringAttributeRequest
Property Type Required
default string required
required boolean required

Responses

200

AttributeString

PATCH /databases/{databaseId}/collections/{collectionId}/attributes/string/{key}
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.

key path required string

Attribute Key.

Request Body

application/json
schema DatabasesUpdateUrlAttributeRequest
Property Type Required
default string required
required boolean required

Responses

200

AttributeURL

PATCH /databases/{databaseId}/collections/{collectionId}/attributes/url/{key}
PATCH /databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship

Update relationship attribute. Learn more about 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.

key path required string

Attribute Key.

Request Body

application/json
schema DatabasesUpdateRelationshipAttributeRequest
Property Type Required
onDelete string optional

Responses

200

AttributeRelationship

PATCH /databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship
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

application/json
schema DatabasesUpdateDocumentByIdRequest
Property Type Required
data object optional
permissions array optional

Responses

200

Document

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

Functions 1 endpoints

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}

Messaging 14 endpoints

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

application/json
schema MessagingUpdateEmailByIdRequest
Property Type Required
cc array optional
bcc array optional
html boolean optional
draft boolean optional
users array optional
topics array optional
content string optional
subject string optional
targets array optional
scheduledAt string optional

Responses

200

Message

PATCH /messaging/messages/email/{messageId}
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

application/json
schema MessagingUpdatePushNotificationRequest
Property Type Required
tag string optional
body string optional
data object optional
icon string optional
badge integer optional
color string optional
draft boolean optional
image string optional
sound string optional
title string optional
users array optional
action string optional
topics array optional
targets array optional
scheduledAt string optional

Responses

200

Message

PATCH /messaging/messages/push/{messageId}
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

application/json
schema MessagingUpdateSmsMessageRequest
Property Type Required
draft boolean optional
users array optional
topics array optional
content string optional
targets array optional
scheduledAt string optional

Responses

200

Message

PATCH /messaging/messages/sms/{messageId}
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

application/json
schema MessagingUpdateApnsProviderRequest
Property Type Required
name string optional
teamId string optional
authKey string optional
enabled boolean optional
sandbox boolean optional
bundleId string optional
authKeyId string optional

Responses

200

Provider

PATCH /messaging/providers/apns/{providerId}
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

application/json
schema MessagingUpdateFcmProviderByIdRequest
Property Type Required
name string optional
enabled boolean optional
serviceAccountJSON object optional

Responses

200

Provider

PATCH /messaging/providers/fcm/{providerId}
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

application/json
schema MessagingUpdateMailgunProviderRequest
Property Type Required
name string optional
apiKey string optional
domain string optional
enabled boolean optional
fromName string optional
fromEmail string optional
isEuRegion boolean optional
replyToName string optional
replyToEmail string optional

Responses

200

Provider

PATCH /messaging/providers/mailgun/{providerId}
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

application/json
schema MessagingUpdateMsg91ProviderRequest
Property Type Required
from string optional
name string optional
authKey string optional
enabled boolean optional
senderId string optional

Responses

200

Provider

PATCH /messaging/providers/msg91/{providerId}
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

application/json
schema MessagingUpdateProviderRequest
Property Type Required
name string optional
apiKey string optional
enabled boolean optional
fromName string optional
fromEmail string optional
replyToName string optional
replyToEmail string optional

Responses

200

Provider

PATCH /messaging/providers/sendgrid/{providerId}
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

application/json
schema MessagingUpdateProviderByIdRequest
Property Type Required
host string optional
name string optional
port integer optional
mailer string optional
autoTLS boolean optional
enabled boolean optional
fromName string optional
password string optional
username string optional
fromEmail string optional
encryption string optional
replyToName string optional
replyToEmail string optional

Responses

200

Provider

PATCH /messaging/providers/smtp/{providerId}
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

application/json
schema MessagingUpdateTelesignProviderRequest
Property Type Required
from string optional
name string optional
apiKey string optional
enabled boolean optional
customerId string optional

Responses

200

Provider

PATCH /messaging/providers/telesign/{providerId}
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

application/json
schema MessagingUpdateTextmagicProviderRequest
Property Type Required
from string optional
name string optional
apiKey string optional
enabled boolean optional
username string optional

Responses

200

Provider

PATCH /messaging/providers/textmagic/{providerId}
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

application/json
schema MessagingUpdateTwilioProviderRequest
Property Type Required
from string optional
name string optional
enabled boolean optional
authToken string optional
accountSid string optional

Responses

200

Provider

PATCH /messaging/providers/twilio/{providerId}
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

application/json
schema MessagingUpdateVonageProviderRequest
Property Type Required
from string optional
name string optional
apiKey string optional
enabled boolean optional
apiSecret string optional

Responses

200

Provider

PATCH /messaging/providers/vonage/{providerId}
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

application/json
schema MessagingUpdateTopicByIdRequest
Property Type Required
name string optional
subscribe array optional

Responses

200

Topic

PATCH /messaging/topics/{topicId}

Teams 2 endpoints

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.

operationId: Teams_updateMembershipRoles

Parameters

Name In Required Type Description
teamId path required string

Team ID.

membershipId path required string

Membership ID.

Request Body

application/json
schema TeamsUpdateMembershipRolesRequest
Property Type Required
roles array required

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

application/json
schema TeamsUpdateMembershipStatusRequest
Property Type Required
secret string required
userId string required

Responses

200

Membership

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

Users 11 endpoints

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

application/json
schema UsersUpdateEmailByIdRequest
Property Type Required
email string required

Responses

200

User

PATCH /users/{userId}/email
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

application/json
schema UsersUpdateMfaStatusRequest
Property Type Required
mfa boolean required

Responses

200

User

PATCH /users/{userId}/mfa
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 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
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

application/json
schema UsersUpdateUserByNameRequest
Property Type Required
name string required

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

application/json
schema UsersUpdatePasswordByIdRequest
Property Type Required
password string required

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

application/json
schema UsersUpdatePhoneByIdRequest
Property Type Required
number string required

Responses

200

User

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

application/json
schema UsersUpdatePreferencesByIdRequest
Property Type Required
prefs object required

Responses

200

Preferences

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

application/json
schema UsersUpdateStatusRequest
Property Type Required
status boolean required

Responses

200

User

PATCH /users/{userId}/status
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

application/json
schema UsersUpdateTargetMessagingRequest
Property Type Required
name string optional
identifier string optional
providerId string optional

Responses

200

Target

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

application/json
schema UsersUpdateEmailVerificationRequest
Property Type Required
emailVerification boolean required

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

application/json
schema UsersUpdatePhoneVerificationRequest
Property Type Required
phoneVerification boolean required

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?"
    }
  }
}