just/mocks_
mockzilla.org →
Catalog /backend /Appwrite Client API

Appwrite Client API

PROVIDER · Appwrite SPEC v1.5.0 · OpenAPI 3.0.0 MOCK · LIVE
▸ TRY IT
https://api.justmocks.com/appwrite-client
Open mock →

Emulate the Appwrite Client API in seconds. Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application.

[01]

About

overview

Mock the Appwrite Client API as a turnkey Mockzilla sim with 95 OpenAPI endpoints, realistic JSON payloads, no upstream signup or sandbox keys. Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. Methods: 39x GET, 23x POST, 12x PATCH, 11x PUT, 10x DELETE. Top resource groups: account, teams, locale, storage. Hit https://api.justmocks.com/appwrite-client for the Mockzilla API Explorer landing and per-endpoint sample requests.

Endpoints
95 across 9 resource groups
Methods
GET 39 · POST 23 · PUT 11 · PATCH 12 · DEL 10 none deprecated
OpenAPI
3.0.0 spec version 1.5.0
Source spec
228 KB · YAML
[02]

Endpoints

95 operations · 9 resource groups
GET /account
account
Get account
Get the currently logged in user. Mocked via Mockzilla.
POST /account
account
Create account
Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the /account/verfication route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new account session.
PATCH /account/email
account
Update 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.
GET /account/identities
account
List Identities
Get the list of identities for the currently logged in user.
DEL /account/identities/{identityId}
account
Delete identity
Delete an identity by its unique ID.
POST /account/jwt
account
Create JWT
Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame. Available as a Mockzilla mock endpoint.
GET /account/logs
account
List logs
Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
PATCH /account/mfa
account
Update MFA
Enable or disable MFA on an account.
POST /account/mfa/authenticators/{type}
account
Add Authenticator
Add an authenticator app to be used as an MFA factor. Verify the authenticator using the verify authenticator method.
PUT /account/mfa/authenticators/{type}
account
Verify Authenticator
Verify an authenticator app after adding it using the add authenticator method.
DEL /account/mfa/authenticators/{type}
account
Delete Authenticator
Delete an authenticator for a user by ID. Mockzilla mock: no signup, no API key.
POST /account/mfa/challenge
account
Create 2FA Challenge
Begin the process of MFA verification after sign-in. Finish the flow with updateMfaChallenge method.
PUT /account/mfa/challenge
account
Create MFA Challenge (confirmation)
Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use createMfaChallenge method.
GET /account/mfa/factors
account
List Factors
List the factors available on the account to be used as a MFA challange.
GET /account/mfa/recovery-codes
account
Get MFA Recovery Codes
Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using createMfaRecoveryCodes method. An OTP challenge is required to read recovery codes.
POST /account/mfa/recovery-codes
account
Create MFA Recovery Codes
Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in createMfaChallenge method. Served by the Mockzilla mock runtime.
PATCH /account/mfa/recovery-codes
account
Regenerate 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.
PATCH /account/name
account
Update name
Update currently logged in user account name.
PATCH /account/password
account
Update 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.
PATCH /account/phone
account
Update 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.
GET /account/prefs
account
Get account preferences
Get the preferences as a key-value object for the currently logged in user. Mocked via Mockzilla.
PATCH /account/prefs
account
Update preferences
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.
POST /account/recovery
account
Create password recovery
Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the PUT /account/recovery endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.
PUT /account/recovery
account
Create password recovery (confirmation)
Use this endpoint to complete the user account password reset. Both the userId and secret arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the POST /account/recovery endpoint. Please note that in order to avoid a Redirect Attack the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
GET /account/sessions
account
List sessions
Get the list of active sessions across different devices for the currently logged in user.
DEL /account/sessions
account
Delete sessions
Delete all sessions from the user account and remove any sessions cookies from the end client. Available as a Mockzilla mock endpoint.
POST /account/sessions/anonymous
account
Create anonymous session
Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its email and password or create an OAuth2 session.
POST /account/sessions/email
account
Create email password session
Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. A user is limited to 10 active sessions at a time by default. Learn more about session limits.
PUT /account/sessions/magic-url
account
Update magic URL session
Use this endpoint to create a session from token. Provide the userId and secret parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
GET /account/sessions/oauth2/{provider}
account
Create OAuth2 session
Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user. A user is limited to 10 active sessions at a time by default. Learn more about session limits.
PUT /account/sessions/phone
account
Update phone session
Use this endpoint to create a session from token. Provide the userId and secret parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login. Mockzilla mock: no signup, no API key.
POST /account/sessions/token
account
Create session
Use this endpoint to create a session from token. Provide the userId and secret parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
GET /account/sessions/{sessionId}
account
Get session
Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.
PATCH /account/sessions/{sessionId}
account
Update session
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.
DEL /account/sessions/{sessionId}
account
Delete session
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.
PATCH /account/status
account
Update 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. Served by the Mockzilla mock runtime.
POST /account/targets/push
account
Create push target
PUT /account/targets/{targetId}/push
account
Update push target
DEL /account/targets/{targetId}/push
account
Delete push target
POST /account/tokens/email
account
Create email token (OTP)
Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the POST /v1/account/sessions/token endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. Learn more about session limits.
POST /account/tokens/magic-url
account
Create magic URL token
Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the POST /v1/account/sessions/token endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default. A user is limited to 10 active sessions at a time by default. Learn more about session limits.
GET /account/tokens/oauth2/{provider}
account
Create OAuth2 token
Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. If authentication succeeds, userId and secret of a token will be appended to the success URL as query parameters. These can be used to create a new session using the Create session endpoint. A user is limited to 10 active sessions at a time by default. Learn more about session limits.
POST /account/tokens/phone
account
Create phone token
Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the POST /v1/account/sessions/token endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. Learn more about session limits.
POST /account/verification
account
Create email verification
Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the userId and secret arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the userId and secret parameters. Learn more about how to complete the verification process. The verification link sent to the user's email address is valid for 7 days. Please note that in order to avoid a Redirect Attack, the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. Mocked via Mockzilla.
PUT /account/verification
account
Create email verification (confirmation)
Use this endpoint to complete the user email verification process. Use both the userId and secret parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.
POST /account/verification/phone
account
Create phone verification
Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the accountUpdatePhone endpoint. Learn more about how to complete the verification process. The verification code sent to the user's phone number is valid for 15 minutes.
PUT /account/verification/phone
account
Create phone verification (confirmation)
Use this endpoint to complete the user phone verification process. Use the userId and secret that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.
GET /avatars/browsers/{code}
avatars
Get browser icon
You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user GET /account/sessions endpoint. Use width, height and quality arguments to change the output settings. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
GET /avatars/credit-cards/{code}
avatars
Get credit card icon
The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. Available as a Mockzilla mock endpoint.
GET /avatars/favicon
avatars
Get favicon
Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
GET /avatars/flags/{code}
avatars
Get country flag
You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the ISO 3166-1 standard. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
GET /avatars/image
avatars
Get image from URL
Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
GET /avatars/initials
avatars
Get user initials
Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned. You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
GET /avatars/qr
avatars
Get QR code
Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image. Mockzilla mock: no signup, no API key.
GET /databases/{databaseId}/collections/{collectionId}/documents
databases
List documents
Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
POST /databases/{databaseId}/collections/{collectionId}/documents
databases
Create document
Create a new Document. Before using this route, you should create a new collection resource using either a server integration API or directly from your database console.
GET /databases/{databaseId}/collections/{collectionId}/documents/{documentId}
databases
Get document
Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
PATCH /databases/{databaseId}/collections/{collectionId}/documents/{documentId}
databases
Update document
Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
DEL /databases/{databaseId}/collections/{collectionId}/documents/{documentId}
databases
Delete document
Delete a document by its unique ID. Served by the Mockzilla mock runtime.
GET /functions/{functionId}/executions
functions
List executions
Get a list of all the current user function execution logs. You can use the query params to filter your results.
POST /functions/{functionId}/executions
functions
Create execution
Trigger a function execution. The returned object will return you the current execution status. You can ping the Get Execution endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
GET /functions/{functionId}/executions/{executionId}
functions
Get execution
Get a function execution log by its unique ID.
POST /graphql
graphql
GraphQL endpoint
Execute a GraphQL mutation.
POST /graphql/mutation
graphql
GraphQL endpoint
Execute a GraphQL mutation. Mocked via Mockzilla.
GET /locale
locale
Get user locale
Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. (IP Geolocation by DB-IP)
GET /locale/codes
locale
List Locale Codes
List of all locale codes in ISO 639-1.
GET /locale/continents
locale
List continents
List of all continents. You can use the locale header to get the data in a supported language.
GET /locale/countries
locale
List countries
List of all countries. You can use the locale header to get the data in a supported language.
GET /locale/countries/eu
locale
List EU countries
List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language. Available as a Mockzilla mock endpoint.
GET /locale/countries/phones
locale
List countries phone codes
List of all countries phone codes. You can use the locale header to get the data in a supported language.
GET /locale/currencies
locale
List currencies
List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
GET /locale/languages
locale
List languages
List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
POST /messaging/topics/{topicId}/subscribers
messaging
Create subscriber
Create a new subscriber.
DEL /messaging/topics/{topicId}/subscribers/{subscriberId}
messaging
Delete subscriber
Delete a subscriber by its unique ID. Mockzilla mock: no signup, no API key.
GET /storage/buckets/{bucketId}/files
storage
List files
Get a list of all the user files. You can use the query params to filter your results.
POST /storage/buckets/{bucketId}/files
storage
Create file
Create a new file. Before using this route, you should create a new bucket resource using either a server integration API or directly from your Appwrite console. Larger files should be uploaded using multiple requests with the content-range header to send a partial request with a maximum supported chunk of 5MB. The content-range header values should always be in bytes. When the first request is sent, the server will return the File object, and the subsequent part request must include the file's id in x-appwrite-id header to allow the server to know that the partial upload is for the existing file and not for a new one. If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
GET /storage/buckets/{bucketId}/files/{fileId}
storage
Get file
Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
PUT /storage/buckets/{bucketId}/files/{fileId}
storage
Update file
Update a file by its unique ID. Only users with write permissions have access to update this resource.
DEL /storage/buckets/{bucketId}/files/{fileId}
storage
Delete File
Delete a file by its unique ID. Only users with write permissions have access to delete this resource. Served by the Mockzilla mock runtime.
GET /storage/buckets/{bucketId}/files/{fileId}/download
storage
Get file for 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.
GET /storage/buckets/{bucketId}/files/{fileId}/preview
storage
Get file 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.
GET /storage/buckets/{bucketId}/files/{fileId}/view
storage
Get file for 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.
GET /teams
teams
List 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.
POST /teams
teams
Create team
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. Mocked via Mockzilla.
GET /teams/{teamId}
teams
Get team
Get a team by its ID. All team members have read access for this resource.
PUT /teams/{teamId}
teams
Update name
Update the team's name by its unique ID.
DEL /teams/{teamId}
teams
Delete team
Delete a team using its ID. Only team members with the owner role can delete the team.
GET /teams/{teamId}/memberships
teams
List team memberships
Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.
POST /teams/{teamId}/memberships
teams
Create team membership
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. Available as a Mockzilla mock endpoint.
GET /teams/{teamId}/memberships/{membershipId}
teams
Get team membership
Get a team member by the membership unique id. All team members have read access for this resource.
PATCH /teams/{teamId}/memberships/{membershipId}
teams
Update membership
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.
DEL /teams/{teamId}/memberships/{membershipId}
teams
Delete team membership
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.
PATCH /teams/{teamId}/memberships/{membershipId}/status
teams
Update team membership 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.
GET /teams/{teamId}/prefs
teams
Get team preferences
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. Mockzilla mock: no signup, no API key.
PUT /teams/{teamId}/prefs
teams
Update preferences
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.