/storage/buckets/{bucketId}/files/{fileId}
Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| bucketId | path | required | string | Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration. |
| fileId | path | required | string | File ID. |
File
GET /storage/buckets/{bucketId}/files/{fileId}
/storage/buckets/{bucketId}/files/{fileId}
Update a file by its unique ID. Only users with write permissions have access to update 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 unique ID. |
application/json
StorageUpdateFileByIdRequest
| Property | Type | Required |
|---|---|---|
| name | string | optional |
| permissions | array | optional |
File
PUT /storage/buckets/{bucketId}/files/{fileId}
/storage/buckets/{bucketId}/files/{fileId}/download
Get a file content by its unique ID. The endpoint response return with a ‘Content-Disposition: attachment’ header that tells the browser to start downloading the file to user downloads directory.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| bucketId | path | required | string | Storage bucket ID. You can create a new storage bucket using the Storage service server integration. |
| fileId | path | required | string | File ID. |
File
GET /storage/buckets/{bucketId}/files/{fileId}/download
/storage/buckets/{bucketId}/files/{fileId}/preview
Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| bucketId | path | required | string | Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration. |
| fileId | path | required | string | File ID |
| width | query | optional | integer | Resize preview image width, Pass an integer between 0 to 4000. |
| height | query | optional | integer | Resize preview image height, Pass an integer between 0 to 4000. |
| gravity | query | optional | string | Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right |
| quality | query | optional | integer | Preview image quality. Pass an integer between 0 to 100. Defaults to 100. |
| borderWidth | query | optional | integer | Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0. |
| borderColor | query | optional | string | Preview image border color. Use a valid HEX color, no # is needed for prefix. |
| borderRadius | query | optional | integer | Preview image border radius in pixels. Pass an integer between 0 to 4000. |
| opacity | query | optional | number | Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1. |
| rotation | query | optional | integer | Preview image rotation in degrees. Pass an integer between -360 and 360. |
| background | query | optional | string | Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix. |
| output | query | optional | string | Output format type (jpeg, jpg, png, gif and webp). |
Image
GET /storage/buckets/{bucketId}/files/{fileId}/preview
/storage/buckets/{bucketId}/files/{fileId}/view
Get a file content by its unique ID. This endpoint is similar to the download method but returns with no ‘Content-Disposition: attachment’ header.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| bucketId | path | required | string | Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration. |
| fileId | path | required | string | File ID. |
File
GET /storage/buckets/{bucketId}/files/{fileId}/view
/teams
Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| queries | query | optional | array | Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan |
| search | query | optional | string | Search term to filter your list results. Max length: 256 chars. |
Teams List
GET /teams
/teams
Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.
application/json
TeamsCreateNewTeamRequest
| Property | Type | Required |
|---|---|---|
| name | string | required |
| roles | array | optional |
| teamId | string | required |
Team
POST /teams
/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}
Get a team by its ID. All team members have read access for this resource.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
Team
GET /teams/{teamId}
/teams/{teamId}
Update the team’s name by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
application/json
TeamsUpdateNameByIdRequest
| Property | Type | Required |
|---|---|---|
| name | string | required |
Team
PUT /teams/{teamId}
/teams/{teamId}/memberships
Use this endpoint to list a team’s members using the team’s ID. All team members have read access to this endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
| queries | query | optional | array | Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm |
| search | query | optional | string | Search term to filter your list results. Max length: 256 chars. |
Memberships List
GET /teams/{teamId}/memberships
/teams/{teamId}/memberships
Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn’t exist. If initiated from a Server SDK, the new member will be added automatically to the team.
You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.
Use the url parameter to redirect the user from the invitation email to your app. After the user is redirected, use the Update Team Membership Status endpoint to allow the user to accept the invitation to the team.
Please note that to avoid a Redirect Attack Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
application/json
TeamsCreateMembershipRequestRequest
| Property | Type | Required |
|---|---|---|
| url | string | optional |
| name | string | optional |
| string | optional | |
| phone | string | optional |
| roles | array | required |
| userId | string | optional |
Membership
POST /teams/{teamId}/memberships
/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}
/teams/{teamId}/memberships/{membershipId}
Get a team member by the membership unique id. All team members have read access for this resource.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
| membershipId | path | required | string | Membership ID. |
Membership
GET /teams/{teamId}/memberships/{membershipId}
/teams/{teamId}/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
| membershipId | path | required | string | Membership ID. |
application/json
TeamsUpdateMembershipRolesRequest
| Property | Type | Required |
|---|---|---|
| roles | array | required |
Membership
PATCH /teams/{teamId}/memberships/{membershipId}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
| membershipId | path | required | string | Membership ID. |
application/json
TeamsUpdateMembershipStatusRequest
| Property | Type | Required |
|---|---|---|
| secret | string | required |
| userId | string | required |
Membership
PATCH /teams/{teamId}/memberships/{membershipId}/status
/teams/{teamId}/prefs
Get the team’s shared preferences by its unique ID. If a preference doesn’t need to be shared by all team members, prefer storing them in user preferences.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
Preferences
GET /teams/{teamId}/prefs
/teams/{teamId}/prefs
Update the team’s preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamId | path | required | string | Team ID. |
application/json
TeamsUpdatePrefsByIdRequest
| Property | Type | Required |
|---|---|---|
| prefs | object | required |
Preferences
PUT /teams/{teamId}/prefs
/users
Get a list of all the project’s users. You can use the query params to filter your results.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| queries | query | optional | array | Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels |
| search | query | optional | string | Search term to filter your list results. Max length: 256 chars. |
Users List
GET /users
/users
Create a new user.
application/json
UsersCreateNewUserRequest
| Property | Type | Required |
|---|---|---|
| name | string | optional |
| string | optional | |
| phone | string | optional |
| userId | string | required |
| password | string | optional |
User
POST /users
/users/argon2
Create a new user. Password provided must be hashed with the Argon2 algorithm. Use the POST /users endpoint to create users with a plain text password.
application/json
UsersCreateArgon2UserRequest
| Property | Type | Required |
|---|---|---|
| name | string | optional |
| string | required | |
| userId | string | required |
| password | string | required |
User
POST /users/argon2
/users/bcrypt
Create a new user. Password provided must be hashed with the Bcrypt algorithm. Use the POST /users endpoint to create users with a plain text password.
application/json
UsersCreateBcryptUserRequest
| Property | Type | Required |
|---|---|---|
| name | string | optional |
| string | required | |
| userId | string | required |
| password | string | required |
User
POST /users/bcrypt
/users/identities
Get identities for all users.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| queries | query | optional | array | Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry |
| search | query | optional | string | Search term to filter your list results. Max length: 256 chars. |
Identities List
GET /users/identities
/users/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/md5
Create a new user. Password provided must be hashed with the MD5 algorithm. Use the POST /users endpoint to create users with a plain text password.
application/json
UsersCreateMd5UserRequest
| Property | Type | Required |
|---|---|---|
| name | string | optional |
| string | required | |
| userId | string | required |
| password | string | required |
User
POST /users/md5
/users/phpass
Create a new user. Password provided must be hashed with the PHPass algorithm. Use the POST /users endpoint to create users with a plain text password.
application/json
UsersCreatePhpassUserRequest
| Property | Type | Required |
|---|---|---|
| name | string | optional |
| string | required | |
| userId | string | required |
| password | string | required |
User
POST /users/phpass
/users/scrypt
Create a new user. Password provided must be hashed with the Scrypt algorithm. Use the POST /users endpoint to create users with a plain text password.
application/json
UsersCreateScryptUserRequest
| Property | Type | Required |
|---|---|---|
| name | string | optional |
| string | required | |
| userId | string | required |
| password | string | required |
| passwordCpu | integer | required |
| passwordSalt | string | required |
| passwordLength | integer | required |
| passwordMemory | integer | required |
| passwordParallel | integer | required |
User
POST /users/scrypt
/users/scrypt-modified
Create a new user. Password provided must be hashed with the Scrypt Modified algorithm. Use the POST /users endpoint to create users with a plain text password.
application/json
UsersCreateScryptModifiedUserRequest
| Property | Type | Required |
|---|---|---|
| name | string | optional |
| string | required | |
| userId | string | required |
| password | string | required |
| passwordSalt | string | required |
| passwordSignerKey | string | required |
| passwordSaltSeparator | string | required |
User
POST /users/scrypt-modified
/users/sha
Create a new user. Password provided must be hashed with the SHA algorithm. Use the POST /users endpoint to create users with a plain text password.
application/json
UsersCreateShaUserRequest
| Property | Type | Required |
|---|---|---|
| name | string | optional |
| string | required | |
| userId | string | required |
| password | string | required |
| passwordVersion | string | optional |
User
POST /users/sha
/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}
Get a user by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
User
GET /users/{userId}
/users/{userId}/email
Update the user email by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
application/json
UsersUpdateEmailByIdRequest
| Property | Type | Required |
|---|---|---|
| string | required |
User
PATCH /users/{userId}/email
/users/{userId}/labels
Update the user labels by its unique ID.
Labels can be used to grant access to resources. While teams are a way for user’s to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the Permissions docs for more info.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
application/json
UsersUpdateLabelsByIdRequest
| Property | Type | Required |
|---|---|---|
| labels | array | required |
User
PUT /users/{userId}/labels
/users/{userId}/logs
Get the user activity logs list by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
| queries | query | optional | array | Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Only supported methods are limit and offset |
Logs List
GET /users/{userId}/logs
/users/{userId}/memberships
Get the user membership list by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
Memberships List
GET /users/{userId}/memberships
/users/{userId}/mfa
Enable or disable MFA on a user account.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
application/json
UsersUpdateMfaStatusRequest
| Property | Type | Required |
|---|---|---|
| mfa | boolean | required |
User
PATCH /users/{userId}/mfa
/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}/mfa/factors
List the factors available on the account to be used as a MFA challange.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
MFAFactors
GET /users/{userId}/mfa/factors
/users/{userId}/mfa/recovery-codes
Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using createMfaRecoveryCodes method.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
MFA Recovery Codes
GET /users/{userId}/mfa/recovery-codes
/users/{userId}/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
MFA Recovery Codes
PATCH /users/{userId}/mfa/recovery-codes
/users/{userId}/mfa/recovery-codes
Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using createMfaRecoveryCodes method.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
MFA Recovery Codes
PUT /users/{userId}/mfa/recovery-codes
/users/{userId}/name
Update the user name by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
application/json
UsersUpdateUserByNameRequest
| Property | Type | Required |
|---|---|---|
| name | string | required |
User
PATCH /users/{userId}/name
/users/{userId}/password
Update the user password by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
application/json
UsersUpdatePasswordByIdRequest
| Property | Type | Required |
|---|---|---|
| password | string | required |
User
PATCH /users/{userId}/password
/users/{userId}/phone
Update the user phone by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
application/json
UsersUpdatePhoneByIdRequest
| Property | Type | Required |
|---|---|---|
| number | string | required |
User
PATCH /users/{userId}/phone
/users/{userId}/prefs
Get the user preferences by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
Preferences
GET /users/{userId}/prefs
/users/{userId}/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
application/json
UsersUpdatePreferencesByIdRequest
| Property | Type | Required |
|---|---|---|
| prefs | object | required |
Preferences
PATCH /users/{userId}/prefs
/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
Get the user sessions list by its unique ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. |
Sessions List
GET /users/{userId}/sessions
/users/{userId}/sessions
Creates a session for a user. Returns an immediately usable session object.
If you want to generate a token for a custom authentication flow, use the POST /users/{userId}/tokens endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userId | path | required | string | User ID. Choose a custom ID or generate a random ID with |
Session
POST /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}