Query structured spec data via REST or MCP. Get exactly what your agent needs.
https://cloud.appwrite.io/v1
/account/identities/{identityId}
Delete an identity by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| identityId | path | required | string | Identity ID. |
No content
DELETE /account/identities/{identityId}
/account/mfa/authenticators/{type}
Delete an authenticator for a user by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| type | path | required | string | Type of authenticator. |
application/json
AccountDeleteAuthenticatorByIdRequest
| Property | Type | Required |
|---|---|---|
| otp | string | required |
User
DELETE /account/mfa/authenticators/{type}
/account/sessions
Delete all sessions from the user account and remove any sessions cookies from the end client.
No content
DELETE /account/sessions
/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 instead.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sessionId | path | required | string | Session ID. Use the string ‘current’ to delete the current device session. |
No content
DELETE /account/sessions/{sessionId}
/databases/{databaseId}
Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| databaseId | path | required | string | Database ID. |
No content
DELETE /databases/{databaseId}
/databases/{databaseId}/collections/{collectionId}
Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| databaseId | path | required | string | Database ID. |
| collectionId | path | required | string | Collection ID. |
No content
DELETE /databases/{databaseId}/collections/{collectionId}
/databases/{databaseId}/collections/{collectionId}/attributes/{key}
Deletes an attribute.
| 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. |
No content
DELETE /databases/{databaseId}/collections/{collectionId}/attributes/{key}
/databases/{databaseId}/collections/{collectionId}/documents/{documentId}
Delete a document by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| databaseId | path | required | string | Database ID. |
| collectionId | path | required | string | Collection ID. You can create a new collection using the Database service server integration. |
| documentId | path | required | string | Document ID. |
No content
DELETE /databases/{databaseId}/collections/{collectionId}/documents/{documentId}
/databases/{databaseId}/collections/{collectionId}/indexes/{key}
Delete an index.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| databaseId | path | required | string | Database ID. |
| collectionId | path | required | string | Collection ID. You can create a new collection using the Database service server integration. |
| key | path | required | string | Index Key. |
No content
DELETE /databases/{databaseId}/collections/{collectionId}/indexes/{key}
/functions/{functionId}
Delete a function by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| functionId | path | required | string | Function ID. |
No content
DELETE /functions/{functionId}
/functions/{functionId}/deployments/{deploymentId}
Delete a code deployment by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| functionId | path | required | string | Function ID. |
| deploymentId | path | required | string | Deployment ID. |
No content
DELETE /functions/{functionId}/deployments/{deploymentId}
/functions/{functionId}/variables/{variableId}
Delete a variable by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| functionId | path | required | string | Function unique ID. |
| variableId | path | required | string | Variable unique ID. |
No content
DELETE /functions/{functionId}/variables/{variableId}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| messageId | path | required | string | Message ID. |
No content
DELETE /messaging/messages/{messageId}
/messaging/providers/{providerId}
Delete a provider by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| providerId | path | required | string | Provider ID. |
No content
DELETE /messaging/providers/{providerId}
/messaging/topics/{topicId}
Delete a topic by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| topicId | path | required | string | Topic ID. |
No content
DELETE /messaging/topics/{topicId}
/messaging/topics/{topicId}/subscribers/{subscriberId}
Delete a subscriber by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| topicId | path | required | string | Topic ID. The topic ID subscribed to. |
| subscriberId | path | required | string | Subscriber ID. |
No content
DELETE /messaging/topics/{topicId}/subscribers/{subscriberId}
/storage/buckets/{bucketId}
Delete a storage bucket by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| bucketId | path | required | string | Bucket unique ID. |
No content
DELETE /storage/buckets/{bucketId}
/storage/buckets/{bucketId}/files/{fileId}
Delete a file by its unique ID. Only users with write permissions have access to delete this resource.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| bucketId | path | required | string | Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration. |
| fileId | path | required | string | File ID. |
No content
DELETE /storage/buckets/{bucketId}/files/{fileId}
/teams/{teamId}
Delete a team using its ID. Only team members with the owner role can delete the team.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
No content
DELETE /teams/{teamId}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
| membershipId | path | required | string | Membership ID. |
No content
DELETE /teams/{teamId}/memberships/{membershipId}
/users/identities/{identityId}
Delete an identity by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| identityId | path | required | string | Identity ID. |
No content
DELETE /users/identities/{identityId}
/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 endpoint instead.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
No content
DELETE /users/{userId}
/users/{userId}/mfa/authenticators/{type}
Delete an authenticator app.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
| type | path | required | string | Type of authenticator. |
User
DELETE /users/{userId}/mfa/authenticators/{type}
/users/{userId}/sessions
Delete all user’s sessions by using the user’s unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
No content
DELETE /users/{userId}/sessions
/users/{userId}/sessions/{sessionId}
Delete a user sessions by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
| sessionId | path | required | string | Session ID. |
No content
DELETE /users/{userId}/sessions/{sessionId}
/users/{userId}/targets/{targetId}
Delete a messaging target.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
| targetId | path | required | string | Target ID. |
No content
DELETE /users/{userId}/targets/{targetId}
AccountBeginMfaVerificationRequest
{
"type": "object",
"required": [
"factor"
],
"properties": {
"factor": {
"enum": [
"email",
"phone",
"totp",
"recoverycode"
],
"type": "string",
"x-example": "email",
"description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.",
"x-enum-keys": [],
"x-enum-name": "AuthenticationFactor"
}
}
}
AccountCompleteEmailVerificationRequest
{
"type": "object",
"required": [
"userId",
"secret"
],
"properties": {
"secret": {
"type": "string",
"x-example": "<SECRET>",
"description": "Valid verification token."
},
"userId": {
"type": "string",
"x-example": "<USER_ID>",
"description": "User ID."
}
}
}
AccountCompleteMfaChallengeRequest
{
"type": "object",
"required": [
"challengeId",
"otp"
],
"properties": {
"otp": {
"type": "string",
"x-example": "<OTP>",
"description": "Valid verification token."
},
"challengeId": {
"type": "string",
"x-example": "<CHALLENGE_ID>",
"description": "ID of the challenge."
}
}
}
AccountCompletePasswordRecoveryRequest
{
"type": "object",
"required": [
"userId",
"secret",
"password"
],
"properties": {
"secret": {
"type": "string",
"x-example": "<SECRET>",
"description": "Valid reset token."
},
"userId": {
"type": "string",
"x-example": "<USER_ID>",
"description": "User ID."
},
"password": {
"type": "string",
"x-example": null,
"description": "New user password. Must be between 8 and 256 chars."
}
}
}
AccountConfirmPhoneVerificationRequest
{
"type": "object",
"required": [
"userId",
"secret"
],
"properties": {
"secret": {
"type": "string",
"x-example": "<SECRET>",
"description": "Valid verification token."
},
"userId": {
"type": "string",
"x-example": "<USER_ID>",
"description": "User ID."
}
}
}
AccountCreateEmailPasswordSessionRequest
{
"type": "object",
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string",
"x-example": "email@example.com",
"description": "User email."
},
"password": {
"type": "string",
"x-example": "password",
"description": "User password. Must be at least 8 chars."
}
}
}
AccountCreateEmailTokenRequest
{
"type": "object",
"required": [
"userId",
"email"
],
"properties": {
"email": {
"type": "string",
"x-example": "email@example.com",
"description": "User email."
},
"phrase": {
"type": "boolean",
"x-example": false,
"description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow."
},
"userId": {
"type": "string",
"x-example": "<USER_ID>",
"description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
}
}
}
AccountCreateEmailVerificationRequest
{
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"x-example": "https://example.com",
"description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API."
}
}
}
AccountCreateMagicUrlTokenRequest
{
"type": "object",
"required": [
"userId",
"email"
],
"properties": {
"url": {
"type": "string",
"x-example": "https://example.com",
"description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API."
},
"email": {
"type": "string",
"x-example": "email@example.com",
"description": "User email."
},
"phrase": {
"type": "boolean",
"x-example": false,
"description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow."
},
"userId": {
"type": "string",
"x-example": "<USER_ID>",
"description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
}
}
}
AccountCreateNewUserRequest
{
"type": "object",
"required": [
"userId",
"email",
"password"
],
"properties": {
"name": {
"type": "string",
"x-example": "<NAME>",
"description": "User name. Max length: 128 chars."
},
"email": {
"type": "string",
"x-example": "email@example.com",
"description": "User email."
},
"userId": {
"type": "string",
"x-example": "<USER_ID>",
"description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
},
"password": {
"type": "string",
"x-example": null,
"description": "New user password. Must be between 8 and 256 chars."
}
}
}
AccountCreatePasswordRecoveryRequest
{
"type": "object",
"required": [
"email",
"url"
],
"properties": {
"url": {
"type": "string",
"x-example": "https://example.com",
"description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API."
},
"email": {
"type": "string",
"x-example": "email@example.com",
"description": "User email."
}
}
}
AccountCreatePhoneTokenRequest
{
"type": "object",
"required": [
"userId",
"phone"
],
"properties": {
"phone": {
"type": "string",
"x-example": "+12065550100",
"description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212."
},
"userId": {
"type": "string",
"x-example": "<USER_ID>",
"description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
}
}
}
AccountCreateTokenSessionRequest
{
"type": "object",
"required": [
"userId",
"secret"
],
"properties": {
"secret": {
"type": "string",
"x-example": "<SECRET>",
"description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods."
},
"userId": {
"type": "string",
"x-example": "<USER_ID>",
"description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
}
}
}
AccountDeleteAuthenticatorByIdRequest
{
"type": "object",
"required": [
"otp"
],
"properties": {
"otp": {
"type": "string",
"x-example": "<OTP>",
"description": "Valid verification token."
}
}
}
AccountUpdateEmailAddressRequest
{
"type": "object",
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string",
"x-example": "email@example.com",
"description": "User email."
},
"password": {
"type": "string",
"x-example": "password",
"description": "User password. Must be at least 8 chars."
}
}
}
AccountUpdateMagicUrlSessionRequest
{
"type": "object",
"required": [
"userId",
"secret"
],
"properties": {
"secret": {
"type": "string",
"x-example": "<SECRET>",
"description": "Valid verification token."
},
"userId": {
"type": "string",
"x-example": "<USER_ID>",
"description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
}
}
}
AccountUpdateMfaStatusRequest
{
"type": "object",
"required": [
"mfa"
],
"properties": {
"mfa": {
"type": "boolean",
"x-example": false,
"description": "Enable or disable MFA."
}
}
}
AccountUpdateNameOperationRequest
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"x-example": "<NAME>",
"description": "User name. Max length: 128 chars."
}
}
}
AccountUpdatePasswordOperationRequest
{
"type": "object",
"required": [
"password"
],
"properties": {
"password": {
"type": "string",
"x-example": null,
"description": "New user password. Must be at least 8 chars."
},
"oldPassword": {
"type": "string",
"x-example": "password",
"description": "Current user password. Must be at least 8 chars."
}
}
}
AccountUpdatePhoneRequest
{
"type": "object",
"required": [
"phone",
"password"
],
"properties": {
"phone": {
"type": "string",
"x-example": "+12065550100",
"description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212."
},
"password": {
"type": "string",
"x-example": "password",
"description": "User password. Must be at least 8 chars."
}
}
}
AccountUpdatePhoneSessionRequest
{
"type": "object",
"required": [
"userId",
"secret"
],
"properties": {
"secret": {
"type": "string",
"x-example": "<SECRET>",
"description": "Valid verification token."
},
"userId": {
"type": "string",
"x-example": "<USER_ID>",
"description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
}
}
}
AccountUpdatePreferencesRequest
{
"type": "object",
"required": [
"prefs"
],
"properties": {
"prefs": {
"type": "object",
"x-example": "{}",
"description": "Prefs key-value JSON object."
}
}
}
AccountVerifyAuthenticatorRequest
{
"type": "object",
"required": [
"otp"
],
"properties": {
"otp": {
"type": "string",
"x-example": "<OTP>",
"description": "Valid verification token."
}
}
}
DatabasesCreateBooleanAttributeRequest
{
"type": "object",
"required": [
"key",
"required"
],
"properties": {
"key": {
"type": "string",
"x-example": null,
"description": "Attribute Key."
},
"array": {
"type": "boolean",
"x-example": false,
"description": "Is attribute an array?"
},
"default": {
"type": "boolean",
"x-example": false,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesCreateCollectionRequest
{
"type": "object",
"required": [
"collectionId",
"name"
],
"properties": {
"name": {
"type": "string",
"x-example": "<NAME>",
"description": "Collection name. Max length: 128 chars."
},
"enabled": {
"type": "boolean",
"x-example": false,
"description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled."
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"x-example": "[\"read(\"any\")\"]",
"description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions)."
},
"collectionId": {
"type": "string",
"x-example": "<COLLECTION_ID>",
"description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
},
"documentSecurity": {
"type": "boolean",
"x-example": false,
"description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions)."
}
}
}
DatabasesCreateDatabaseRequest
{
"type": "object",
"required": [
"databaseId",
"name"
],
"properties": {
"name": {
"type": "string",
"x-example": "<NAME>",
"description": "Database name. Max length: 128 chars."
},
"enabled": {
"type": "boolean",
"x-example": false,
"description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled."
},
"databaseId": {
"type": "string",
"x-example": "<DATABASE_ID>",
"description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
}
}
}
DatabasesCreateDatetimeAttributeRequest
{
"type": "object",
"required": [
"key",
"required"
],
"properties": {
"key": {
"type": "string",
"x-example": null,
"description": "Attribute Key."
},
"array": {
"type": "boolean",
"x-example": false,
"description": "Is attribute an array?"
},
"default": {
"type": "string",
"x-example": null,
"description": "Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesCreateDocumentRequest
{
"type": "object",
"required": [
"documentId",
"data"
],
"properties": {
"data": {
"type": "object",
"x-example": "{}",
"description": "Document data as JSON object."
},
"documentId": {
"type": "string",
"x-example": "<DOCUMENT_ID>",
"description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars."
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"x-example": "[\"read(\"any\")\"]",
"description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions)."
}
}
}
DatabasesCreateEmailAttributeRequest
{
"type": "object",
"required": [
"key",
"required"
],
"properties": {
"key": {
"type": "string",
"x-example": null,
"description": "Attribute Key."
},
"array": {
"type": "boolean",
"x-example": false,
"description": "Is attribute an array?"
},
"default": {
"type": "string",
"x-example": "email@example.com",
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesCreateEnumAttributeRequest
{
"type": "object",
"required": [
"key",
"elements",
"required"
],
"properties": {
"key": {
"type": "string",
"x-example": null,
"description": "Attribute Key."
},
"array": {
"type": "boolean",
"x-example": false,
"description": "Is attribute an array?"
},
"default": {
"type": "string",
"x-example": "<DEFAULT>",
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"elements": {
"type": "array",
"items": {
"type": "string"
},
"x-example": null,
"description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesCreateFloatAttributeRequest
{
"type": "object",
"required": [
"key",
"required"
],
"properties": {
"key": {
"type": "string",
"x-example": null,
"description": "Attribute Key."
},
"max": {
"type": "number",
"x-example": null,
"description": "Maximum value to enforce on new documents"
},
"min": {
"type": "number",
"x-example": null,
"description": "Minimum value to enforce on new documents"
},
"array": {
"type": "boolean",
"x-example": false,
"description": "Is attribute an array?"
},
"default": {
"type": "number",
"x-example": null,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesCreateIndexRequest
{
"type": "object",
"required": [
"key",
"type",
"attributes"
],
"properties": {
"key": {
"type": "string",
"x-example": null,
"description": "Index Key."
},
"type": {
"enum": [
"key",
"fulltext",
"unique"
],
"type": "string",
"x-example": "key",
"description": "Index type.",
"x-enum-keys": [],
"x-enum-name": "IndexType"
},
"orders": {
"type": "array",
"items": {
"type": "string"
},
"x-example": null,
"description": "Array of index orders. Maximum of 100 orders are allowed."
},
"attributes": {
"type": "array",
"items": {
"type": "string"
},
"x-example": null,
"description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long."
}
}
}
DatabasesCreateIntegerAttributeRequest
{
"type": "object",
"required": [
"key",
"required"
],
"properties": {
"key": {
"type": "string",
"x-example": null,
"description": "Attribute Key."
},
"max": {
"type": "integer",
"x-example": null,
"description": "Maximum value to enforce on new documents"
},
"min": {
"type": "integer",
"x-example": null,
"description": "Minimum value to enforce on new documents"
},
"array": {
"type": "boolean",
"x-example": false,
"description": "Is attribute an array?"
},
"default": {
"type": "integer",
"x-example": null,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesCreateIpAttributeRequest
{
"type": "object",
"required": [
"key",
"required"
],
"properties": {
"key": {
"type": "string",
"x-example": null,
"description": "Attribute Key."
},
"array": {
"type": "boolean",
"x-example": false,
"description": "Is attribute an array?"
},
"default": {
"type": "string",
"x-example": null,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesCreateRelationshipAttributeRequest
{
"type": "object",
"required": [
"relatedCollectionId",
"type"
],
"properties": {
"key": {
"type": "string",
"x-example": null,
"description": "Attribute Key."
},
"type": {
"enum": [
"oneToOne",
"manyToOne",
"manyToMany",
"oneToMany"
],
"type": "string",
"x-example": "oneToOne",
"description": "Relation type",
"x-enum-keys": [],
"x-enum-name": "RelationshipType"
},
"twoWay": {
"type": "boolean",
"x-example": false,
"description": "Is Two Way?"
},
"onDelete": {
"enum": [
"cascade",
"restrict",
"setNull"
],
"type": "string",
"x-example": "cascade",
"description": "Constraints option",
"x-enum-keys": [],
"x-enum-name": "RelationMutate"
},
"twoWayKey": {
"type": "string",
"x-example": null,
"description": "Two Way Attribute Key."
},
"relatedCollectionId": {
"type": "string",
"x-example": "<RELATED_COLLECTION_ID>",
"description": "Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)."
}
}
}
DatabasesCreateStringAttributeRequest
{
"type": "object",
"required": [
"key",
"size",
"required"
],
"properties": {
"key": {
"type": "string",
"x-example": null,
"description": "Attribute Key."
},
"size": {
"type": "integer",
"x-example": 1,
"description": "Attribute size for text attributes, in number of characters."
},
"array": {
"type": "boolean",
"x-example": false,
"description": "Is attribute an array?"
},
"default": {
"type": "string",
"x-example": "<DEFAULT>",
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"encrypt": {
"type": "boolean",
"x-example": false,
"description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesCreateUrlAttributeRequest
{
"type": "object",
"required": [
"key",
"required"
],
"properties": {
"key": {
"type": "string",
"x-example": null,
"description": "Attribute Key."
},
"array": {
"type": "boolean",
"x-example": false,
"description": "Is attribute an array?"
},
"default": {
"type": "string",
"x-example": "https://example.com",
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesGetAttributeByIdResponse
{
"oneOf": [
{
"$ref": "#/components/schemas/attributeBoolean"
},
{
"$ref": "#/components/schemas/attributeInteger"
},
{
"$ref": "#/components/schemas/attributeFloat"
},
{
"$ref": "#/components/schemas/attributeEmail"
},
{
"$ref": "#/components/schemas/attributeEnum"
},
{
"$ref": "#/components/schemas/attributeUrl"
},
{
"$ref": "#/components/schemas/attributeIp"
},
{
"$ref": "#/components/schemas/attributeDatetime"
},
{
"$ref": "#/components/schemas/attributeRelationship"
},
{
"$ref": "#/components/schemas/attributeString"
}
]
}
DatabasesUpdateBooleanAttributeRequest
{
"type": "object",
"required": [
"required",
"default"
],
"properties": {
"default": {
"type": "boolean",
"x-example": false,
"x-nullable": true,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesUpdateByIdRequest
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"x-example": "<NAME>",
"description": "Database name. Max length: 128 chars."
},
"enabled": {
"type": "boolean",
"x-example": false,
"description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled."
}
}
}
DatabasesUpdateCollectionByIdRequest
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"x-example": "<NAME>",
"description": "Collection name. Max length: 128 chars."
},
"enabled": {
"type": "boolean",
"x-example": false,
"description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled."
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"x-example": "[\"read(\"any\")\"]",
"description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions)."
},
"documentSecurity": {
"type": "boolean",
"x-example": false,
"description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions)."
}
}
}
DatabasesUpdateDatetimeAttributeRequest
{
"type": "object",
"required": [
"required",
"default"
],
"properties": {
"default": {
"type": "string",
"x-example": null,
"x-nullable": true,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesUpdateDocumentByIdRequest
{
"type": "object",
"properties": {
"data": {
"type": "object",
"x-example": "{}",
"description": "Document data as JSON object. Include only attribute and value pairs to be updated."
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"x-example": "[\"read(\"any\")\"]",
"description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions)."
}
}
}
DatabasesUpdateEmailAttributeRequest
{
"type": "object",
"required": [
"required",
"default"
],
"properties": {
"default": {
"type": "string",
"x-example": "email@example.com",
"x-nullable": true,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesUpdateEnumAttributeRequest
{
"type": "object",
"required": [
"elements",
"required",
"default"
],
"properties": {
"default": {
"type": "string",
"x-example": "<DEFAULT>",
"x-nullable": true,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"elements": {
"type": "array",
"items": {
"type": "string"
},
"x-example": null,
"description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesUpdateFloatAttributeRequest
{
"type": "object",
"required": [
"required",
"min",
"max",
"default"
],
"properties": {
"max": {
"type": "number",
"x-example": null,
"description": "Maximum value to enforce on new documents"
},
"min": {
"type": "number",
"x-example": null,
"description": "Minimum value to enforce on new documents"
},
"default": {
"type": "number",
"x-example": null,
"x-nullable": true,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesUpdateIntegerAttributeRequest
{
"type": "object",
"required": [
"required",
"min",
"max",
"default"
],
"properties": {
"max": {
"type": "integer",
"x-example": null,
"description": "Maximum value to enforce on new documents"
},
"min": {
"type": "integer",
"x-example": null,
"description": "Minimum value to enforce on new documents"
},
"default": {
"type": "integer",
"x-example": null,
"x-nullable": true,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesUpdateIpAttributeRequest
{
"type": "object",
"required": [
"required",
"default"
],
"properties": {
"default": {
"type": "string",
"x-example": null,
"x-nullable": true,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}
DatabasesUpdateRelationshipAttributeRequest
{
"type": "object",
"properties": {
"onDelete": {
"enum": [
"cascade",
"restrict",
"setNull"
],
"type": "string",
"x-example": "cascade",
"description": "Constraints option",
"x-enum-keys": [],
"x-enum-name": "RelationMutate"
}
}
}
DatabasesUpdateStringAttributeRequest
{
"type": "object",
"required": [
"required",
"default"
],
"properties": {
"default": {
"type": "string",
"x-example": "<DEFAULT>",
"x-nullable": true,
"description": "Default value for attribute when not provided. Cannot be set when attribute is required."
},
"required": {
"type": "boolean",
"x-example": false,
"description": "Is attribute required?"
}
}
}