diff --git a/CHANGELOG.md b/CHANGELOG.md
index 91809d35..4d0e60e4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,25 @@
# Change Log
+## 19.0.0
+
+* Breaking: removed the `Assistant` service (`assistant.chat`) and `_APP_ASSISTANT_ENABLED` from `ConsoleVariables`
+* Breaking: `waf.getRule` and `waf.listRules` return the action-specific rule models (`WafRuleBypass`, `WafRuleChallenge`, `WafRuleDeny`, `WafRuleRateLimit`, `WafRuleRedirect`); `WafRule` is removed
+* Breaking: removed the `deno-1.21`, `deno-1.24` and `deno-1.35` runtimes from `Runtime` and `BuildRuntime`
+* Updated: `X-Appwrite-Response-Format` is now `2.4.0`
+* Updated: missing fields in API responses are filled with their documented defaults
+* Added: `Analytics` service: `listProperties`, `createProperty`, `getProperty`, `updateProperty`, `deleteProperty`, `createEvent` and `listMetrics`, with `AnalyticsDimension` and `AnalyticsInterval` enums
+* Added: `Tracking` helper that auto-tracks pageviews, outbound links, downloads, scroll depth and engagement time
+* Added: `admin` threat methods `listThreats`, `createThreat`, `getThreat`, `deleteThreat` and `updateThreatStatus`
+* Added: `admin` cache methods `deletePlatformCache`, `deletePlatformResourceCache`, `deleteProjectCache` and `deleteProjectResourceCache`
+* Added: `project.updatePasswordRotationPolicy` and the `PolicyPasswordRotation` model
+* Added: optional `state` on `account.createOAuth2Session` and `account.createOAuth2Token`
+* Added: optional `fingerprints` on `project.createAndroidPlatform` and `project.updateAndroidPlatform`, and on `PlatformAndroid`
+* Added: optional `membershipId` on `teams.createMembership`
+* Added: `project.listEnvironments`, `createEnvironment`, `getEnvironment`, `updateEnvironment` and `deleteEnvironment`, with `parentId` on `Project` and `environments` on `BillingPlan`
+* Added: `trigram` in `DatabasesIndexType` and `TablesDBIndexType`, and `supportForTrigramIndex` on `ConsoleVariables`
+* Added: the package ships the spec it was generated from as `spec.json`, exported as `@appwrite.io/console/spec.json`
+* Added: `analytics.read` and `analytics.write` key scopes, analytics usage metrics, and `avatarsStorageTotal` on `UsageOrganization`
+
## 18.4.1
* Fixed: added `ProjectAuthMethodId.Passkey`, so `project.updateAuthMethod` can enable passkeys
diff --git a/README.md b/README.md
index b7b8c23a..bc005f5e 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
# Appwrite Console SDK

-
+
[](https://travis-ci.com/appwrite/sdk-generator)
[](https://twitter.com/appwrite)
[](https://appwrite.io/discord)
-**This SDK targets Appwrite server version latest as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-console/releases) when APIs differ.
+**This SDK targets Appwrite server version 2.4.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-console/releases) when APIs differ.
Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Console SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
@@ -33,7 +33,7 @@ import { Client, Account } from '@appwrite.io/console';
To install with a CDN (content delivery network) add the following scripts to the bottom of your
tag, but before you use any Appwrite services:
```html
-
+
```
## Getting Started
diff --git a/docs/examples/account/create-o-auth-2-session.md b/docs/examples/account/create-o-auth-2-session.md
index 735fd2ea..621103a2 100644
--- a/docs/examples/account/create-o-auth-2-session.md
+++ b/docs/examples/account/create-o-auth-2-session.md
@@ -12,5 +12,6 @@ account.createOAuth2Session({
success: 'https://example.com', // optional
failure: 'https://example.com', // optional
scopes: [], // optional
+ state: '', // optional
});
```
diff --git a/docs/examples/account/create-o-auth-2-token.md b/docs/examples/account/create-o-auth-2-token.md
index cf961db6..1cb8437c 100644
--- a/docs/examples/account/create-o-auth-2-token.md
+++ b/docs/examples/account/create-o-auth-2-token.md
@@ -12,5 +12,6 @@ account.createOAuth2Token({
success: 'https://example.com', // optional
failure: 'https://example.com', // optional
scopes: [], // optional
+ state: '', // optional
});
```
diff --git a/docs/examples/admin/create-threat.md b/docs/examples/admin/create-threat.md
new file mode 100644
index 00000000..f42321a5
--- /dev/null
+++ b/docs/examples/admin/create-threat.md
@@ -0,0 +1,24 @@
+```javascript
+import {
+ Client,
+ Admin,
+ ThreatResourceType,
+ ThreatStatus,
+} from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const admin = new Admin(client);
+
+const result = await admin.createThreat({
+ projectId: '',
+ resourceType: ThreatResourceType.Projects,
+ resourceId: '',
+ description: '', // optional
+ status: ThreatStatus.Open, // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/admin/delete-platform-cache.md b/docs/examples/admin/delete-platform-cache.md
new file mode 100644
index 00000000..7e31802e
--- /dev/null
+++ b/docs/examples/admin/delete-platform-cache.md
@@ -0,0 +1,13 @@
+```javascript
+import { Client, Admin } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const admin = new Admin(client);
+
+const result = await admin.deletePlatformCache();
+
+console.log(result);
+```
diff --git a/docs/examples/admin/delete-platform-resource-cache.md b/docs/examples/admin/delete-platform-resource-cache.md
new file mode 100644
index 00000000..52b684d6
--- /dev/null
+++ b/docs/examples/admin/delete-platform-resource-cache.md
@@ -0,0 +1,16 @@
+```javascript
+import { Client, Admin, PlatformResourceType } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const admin = new Admin(client);
+
+const result = await admin.deletePlatformResourceCache({
+ resourceType: PlatformResourceType.Projects,
+ resourceId: '', // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/admin/delete-project-cache.md b/docs/examples/admin/delete-project-cache.md
new file mode 100644
index 00000000..fb7e0dda
--- /dev/null
+++ b/docs/examples/admin/delete-project-cache.md
@@ -0,0 +1,15 @@
+```javascript
+import { Client, Admin } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const admin = new Admin(client);
+
+const result = await admin.deleteProjectCache({
+ projectId: '',
+});
+
+console.log(result);
+```
diff --git a/docs/examples/admin/delete-project-resource-cache.md b/docs/examples/admin/delete-project-resource-cache.md
new file mode 100644
index 00000000..728f3a74
--- /dev/null
+++ b/docs/examples/admin/delete-project-resource-cache.md
@@ -0,0 +1,17 @@
+```javascript
+import { Client, Admin, ProjectResourceType } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const admin = new Admin(client);
+
+const result = await admin.deleteProjectResourceCache({
+ projectId: '',
+ resourceType: ProjectResourceType.Users,
+ resourceId: '', // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/assistant/chat.md b/docs/examples/admin/delete-threat.md
similarity index 56%
rename from docs/examples/assistant/chat.md
rename to docs/examples/admin/delete-threat.md
index 2131548d..254d2086 100644
--- a/docs/examples/assistant/chat.md
+++ b/docs/examples/admin/delete-threat.md
@@ -1,14 +1,14 @@
```javascript
-import { Client, Assistant } from '@appwrite.io/console';
+import { Client, Admin } from '@appwrite.io/console';
const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const assistant = new Assistant(client);
+const admin = new Admin(client);
-const result = await assistant.chat({
- prompt: '',
+const result = await admin.deleteThreat({
+ threatId: '',
});
console.log(result);
diff --git a/docs/examples/admin/get-threat.md b/docs/examples/admin/get-threat.md
new file mode 100644
index 00000000..c8f3df79
--- /dev/null
+++ b/docs/examples/admin/get-threat.md
@@ -0,0 +1,15 @@
+```javascript
+import { Client, Admin } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const admin = new Admin(client);
+
+const result = await admin.getThreat({
+ threatId: '',
+});
+
+console.log(result);
+```
diff --git a/docs/examples/admin/list-threats.md b/docs/examples/admin/list-threats.md
new file mode 100644
index 00000000..71368d31
--- /dev/null
+++ b/docs/examples/admin/list-threats.md
@@ -0,0 +1,16 @@
+```javascript
+import { Client, Admin } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const admin = new Admin(client);
+
+const result = await admin.listThreats({
+ queries: [], // optional
+ total: false, // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/admin/update-threat-status.md b/docs/examples/admin/update-threat-status.md
new file mode 100644
index 00000000..e359ad94
--- /dev/null
+++ b/docs/examples/admin/update-threat-status.md
@@ -0,0 +1,16 @@
+```javascript
+import { Client, Admin, ThreatStatus } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const admin = new Admin(client);
+
+const result = await admin.updateThreatStatus({
+ threatId: '',
+ status: ThreatStatus.Open,
+});
+
+console.log(result);
+```
diff --git a/docs/examples/analytics/create-event.md b/docs/examples/analytics/create-event.md
new file mode 100644
index 00000000..b5201362
--- /dev/null
+++ b/docs/examples/analytics/create-event.md
@@ -0,0 +1,27 @@
+```javascript
+import { Client, Analytics } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const analytics = new Analytics(client);
+
+const result = await analytics.createEvent({
+ propertyId: '',
+ name: '',
+ url: 'https://example.com',
+ domain: '', // optional
+ referrer: '', // optional
+ screenWidth: null, // optional
+ sessionHash: '', // optional
+ scrollDepth: 0, // optional
+ engagementTime: 0, // optional
+ props: [], // optional
+ userId: '', // optional
+ ip: '', // optional
+ userAgent: '', // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/analytics/create-property.md b/docs/examples/analytics/create-property.md
new file mode 100644
index 00000000..97759437
--- /dev/null
+++ b/docs/examples/analytics/create-property.md
@@ -0,0 +1,19 @@
+```javascript
+import { Client, Analytics } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const analytics = new Analytics(client);
+
+const result = await analytics.createProperty({
+ propertyId: '',
+ name: '',
+ domain: '', // optional
+ enabled: false, // optional
+ allowedOrigins: [], // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/analytics/delete-property.md b/docs/examples/analytics/delete-property.md
new file mode 100644
index 00000000..390ec323
--- /dev/null
+++ b/docs/examples/analytics/delete-property.md
@@ -0,0 +1,15 @@
+```javascript
+import { Client, Analytics } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const analytics = new Analytics(client);
+
+const result = await analytics.deleteProperty({
+ propertyId: '',
+});
+
+console.log(result);
+```
diff --git a/docs/examples/analytics/get-property.md b/docs/examples/analytics/get-property.md
new file mode 100644
index 00000000..9605b522
--- /dev/null
+++ b/docs/examples/analytics/get-property.md
@@ -0,0 +1,15 @@
+```javascript
+import { Client, Analytics } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const analytics = new Analytics(client);
+
+const result = await analytics.getProperty({
+ propertyId: '',
+});
+
+console.log(result);
+```
diff --git a/docs/examples/analytics/list-metrics.md b/docs/examples/analytics/list-metrics.md
new file mode 100644
index 00000000..675da6f1
--- /dev/null
+++ b/docs/examples/analytics/list-metrics.md
@@ -0,0 +1,27 @@
+```javascript
+import {
+ Client,
+ Analytics,
+ AnalyticsInterval,
+ AnalyticsDimension,
+} from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const analytics = new Analytics(client);
+
+const result = await analytics.listMetrics({
+ propertyId: '',
+ queries: [], // optional
+ interval: AnalyticsInterval.OneHour, // optional
+ dimensions: [AnalyticsDimension.Country], // optional
+ dateRange: '', // optional
+ startAt: '2020-10-15T06:38:00.000+00:00', // optional
+ endAt: '2020-10-15T06:38:00.000+00:00', // optional
+ limit: 1, // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/analytics/list-properties.md b/docs/examples/analytics/list-properties.md
new file mode 100644
index 00000000..d543a7d5
--- /dev/null
+++ b/docs/examples/analytics/list-properties.md
@@ -0,0 +1,17 @@
+```javascript
+import { Client, Analytics } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const analytics = new Analytics(client);
+
+const result = await analytics.listProperties({
+ queries: [], // optional
+ search: '', // optional
+ total: false, // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/analytics/update-property.md b/docs/examples/analytics/update-property.md
new file mode 100644
index 00000000..cb6e9f03
--- /dev/null
+++ b/docs/examples/analytics/update-property.md
@@ -0,0 +1,19 @@
+```javascript
+import { Client, Analytics } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const analytics = new Analytics(client);
+
+const result = await analytics.updateProperty({
+ propertyId: '',
+ name: '', // optional
+ domain: '', // optional
+ enabled: false, // optional
+ allowedOrigins: [], // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/oauth2/authorize-post.md b/docs/examples/oauth2/authorize-post.md
index acb7116d..551709b9 100644
--- a/docs/examples/oauth2/authorize-post.md
+++ b/docs/examples/oauth2/authorize-post.md
@@ -19,7 +19,7 @@ const result = await oauth2.authorizePost({
prompt: '', // optional
maxAge: 0, // optional
authorizationDetails: '', // optional
- resource: '', // optional
+ resource: [], // optional
audience: '', // optional
requestUri: '', // optional
});
diff --git a/docs/examples/oauth2/authorize.md b/docs/examples/oauth2/authorize.md
index 0a02731b..87be841a 100644
--- a/docs/examples/oauth2/authorize.md
+++ b/docs/examples/oauth2/authorize.md
@@ -19,7 +19,7 @@ const result = await oauth2.authorize({
prompt: '', // optional
maxAge: 0, // optional
authorizationDetails: '', // optional
- resource: '', // optional
+ resource: [], // optional
audience: '', // optional
requestUri: '', // optional
});
diff --git a/docs/examples/oauth2/create-device-authorization.md b/docs/examples/oauth2/create-device-authorization.md
index 3203b84d..7ab83a56 100644
--- a/docs/examples/oauth2/create-device-authorization.md
+++ b/docs/examples/oauth2/create-device-authorization.md
@@ -11,7 +11,7 @@ const result = await oauth2.createDeviceAuthorization({
clientId: '', // optional
scope: '', // optional
authorizationDetails: '', // optional
- resource: '', // optional
+ resource: [], // optional
audience: '', // optional
});
diff --git a/docs/examples/oauth2/create-par.md b/docs/examples/oauth2/create-par.md
index 3c503287..3e5f0415 100644
--- a/docs/examples/oauth2/create-par.md
+++ b/docs/examples/oauth2/create-par.md
@@ -19,7 +19,7 @@ const result = await oauth2.createPAR({
prompt: '', // optional
maxAge: 0, // optional
authorizationDetails: '', // optional
- resource: '', // optional
+ resource: [], // optional
audience: '', // optional
});
diff --git a/docs/examples/oauth2/create-token.md b/docs/examples/oauth2/create-token.md
index 900352e9..512346b4 100644
--- a/docs/examples/oauth2/create-token.md
+++ b/docs/examples/oauth2/create-token.md
@@ -16,7 +16,7 @@ const result = await oauth2.createToken({
clientSecret: '', // optional
codeVerifier: '', // optional
redirectUri: 'https://example.com', // optional
- resource: '', // optional
+ resource: [], // optional
audience: '', // optional
});
diff --git a/docs/examples/project/create-android-platform.md b/docs/examples/project/create-android-platform.md
index df927932..a5cb57a2 100644
--- a/docs/examples/project/create-android-platform.md
+++ b/docs/examples/project/create-android-platform.md
@@ -11,6 +11,7 @@ const result = await project.createAndroidPlatform({
platformId: '',
name: '',
applicationId: '',
+ fingerprints: [], // optional
});
console.log(result);
diff --git a/docs/examples/project/create-environment.md b/docs/examples/project/create-environment.md
new file mode 100644
index 00000000..651c274c
--- /dev/null
+++ b/docs/examples/project/create-environment.md
@@ -0,0 +1,16 @@
+```javascript
+import { Client, Project } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const project = new Project(client);
+
+const result = await project.createEnvironment({
+ environmentId: '',
+ name: '',
+});
+
+console.log(result);
+```
diff --git a/docs/examples/project/delete-environment.md b/docs/examples/project/delete-environment.md
new file mode 100644
index 00000000..4111da17
--- /dev/null
+++ b/docs/examples/project/delete-environment.md
@@ -0,0 +1,15 @@
+```javascript
+import { Client, Project } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const project = new Project(client);
+
+const result = await project.deleteEnvironment({
+ environmentId: '',
+});
+
+console.log(result);
+```
diff --git a/docs/examples/project/get-environment.md b/docs/examples/project/get-environment.md
new file mode 100644
index 00000000..64094ba1
--- /dev/null
+++ b/docs/examples/project/get-environment.md
@@ -0,0 +1,15 @@
+```javascript
+import { Client, Project } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const project = new Project(client);
+
+const result = await project.getEnvironment({
+ environmentId: '',
+});
+
+console.log(result);
+```
diff --git a/docs/examples/project/list-environments.md b/docs/examples/project/list-environments.md
new file mode 100644
index 00000000..0ea5151c
--- /dev/null
+++ b/docs/examples/project/list-environments.md
@@ -0,0 +1,16 @@
+```javascript
+import { Client, Project } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const project = new Project(client);
+
+const result = await project.listEnvironments({
+ queries: [], // optional
+ total: false, // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/project/update-android-platform.md b/docs/examples/project/update-android-platform.md
index e736fb56..7a9650f7 100644
--- a/docs/examples/project/update-android-platform.md
+++ b/docs/examples/project/update-android-platform.md
@@ -11,6 +11,7 @@ const result = await project.updateAndroidPlatform({
platformId: '',
name: '',
applicationId: '',
+ fingerprints: [], // optional
});
console.log(result);
diff --git a/docs/examples/project/update-environment.md b/docs/examples/project/update-environment.md
new file mode 100644
index 00000000..197a552e
--- /dev/null
+++ b/docs/examples/project/update-environment.md
@@ -0,0 +1,16 @@
+```javascript
+import { Client, Project } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const project = new Project(client);
+
+const result = await project.updateEnvironment({
+ environmentId: '',
+ name: '',
+});
+
+console.log(result);
+```
diff --git a/docs/examples/project/update-password-rotation-policy.md b/docs/examples/project/update-password-rotation-policy.md
new file mode 100644
index 00000000..903ad282
--- /dev/null
+++ b/docs/examples/project/update-password-rotation-policy.md
@@ -0,0 +1,16 @@
+```javascript
+import { Client, Project } from '@appwrite.io/console';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const project = new Project(client);
+
+const result = await project.updatePasswordRotationPolicy({
+ enabled: false, // optional
+ maxAge: 86400, // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md
index d06d4894..a86f07fe 100644
--- a/docs/examples/teams/create-membership.md
+++ b/docs/examples/teams/create-membership.md
@@ -15,6 +15,7 @@ const result = await teams.createMembership({
phone: '+12065550100', // optional
url: 'https://example.com', // optional
name: '', // optional
+ membershipId: '', // optional
});
console.log(result);
diff --git a/docs/examples/usage/list-events.md b/docs/examples/usage/list-events.md
index 30b8d975..fe672527 100644
--- a/docs/examples/usage/list-events.md
+++ b/docs/examples/usage/list-events.md
@@ -16,7 +16,7 @@ const client = new Client()
const usage = new Usage(client);
const result = await usage.listEvents({
- metrics: [UsageEventMetric.NetworkRequests],
+ metrics: [UsageEventMetric.AnalyticsEvents],
queries: [], // optional
interval: UsageInterval.OneMinute, // optional
dimensions: [UsageEventDimension.Path], // optional
diff --git a/docs/examples/usage/list-gauges.md b/docs/examples/usage/list-gauges.md
index 745ecf94..3cc965dc 100644
--- a/docs/examples/usage/list-gauges.md
+++ b/docs/examples/usage/list-gauges.md
@@ -16,7 +16,7 @@ const client = new Client()
const usage = new Usage(client);
const result = await usage.listGauges({
- metrics: [UsageGaugeMetric.Teams],
+ metrics: [UsageGaugeMetric.AnalyticsProperties],
queries: [], // optional
interval: UsageInterval.OneMinute, // optional
dimensions: [UsageGaugeDimension.ResourceId], // optional
diff --git a/docs/examples/waf/create-bypass-rule.md b/docs/examples/waf/create-bypass-rule.md
index 9c494768..d5db7c0f 100644
--- a/docs/examples/waf/create-bypass-rule.md
+++ b/docs/examples/waf/create-bypass-rule.md
@@ -15,7 +15,7 @@ const result = await waf.createBypassRule({
description: '', // optional
priority: -100000, // optional
enabled: false, // optional
- conditions: '', // optional
+ conditions: [], // optional
});
console.log(result);
diff --git a/docs/examples/waf/create-challenge-rule.md b/docs/examples/waf/create-challenge-rule.md
index 5b1689f8..a93d6acc 100644
--- a/docs/examples/waf/create-challenge-rule.md
+++ b/docs/examples/waf/create-challenge-rule.md
@@ -16,7 +16,7 @@ const result = await waf.createChallengeRule({
challengeType: 'compute', // optional
priority: -100000, // optional
enabled: false, // optional
- conditions: '', // optional
+ conditions: [], // optional
difficulty: 1, // optional
ttl: 900, // optional
});
diff --git a/docs/examples/waf/create-deny-rule.md b/docs/examples/waf/create-deny-rule.md
index 87bfdbec..b6d9488c 100644
--- a/docs/examples/waf/create-deny-rule.md
+++ b/docs/examples/waf/create-deny-rule.md
@@ -15,7 +15,7 @@ const result = await waf.createDenyRule({
description: '', // optional
priority: -100000, // optional
enabled: false, // optional
- conditions: '', // optional
+ conditions: [], // optional
});
console.log(result);
diff --git a/docs/examples/waf/create-rate-limit-rule.md b/docs/examples/waf/create-rate-limit-rule.md
index bb1d683f..12cb9baa 100644
--- a/docs/examples/waf/create-rate-limit-rule.md
+++ b/docs/examples/waf/create-rate-limit-rule.md
@@ -20,7 +20,7 @@ const result = await waf.createRateLimitRule({
maxBucketSize: 1, // optional
priority: -100000, // optional
enabled: false, // optional
- conditions: '', // optional
+ conditions: [], // optional
});
console.log(result);
diff --git a/docs/examples/waf/create-redirect-rule.md b/docs/examples/waf/create-redirect-rule.md
index 37d9ed8f..650e8b9f 100644
--- a/docs/examples/waf/create-redirect-rule.md
+++ b/docs/examples/waf/create-redirect-rule.md
@@ -17,7 +17,7 @@ const result = await waf.createRedirectRule({
description: '', // optional
priority: -100000, // optional
enabled: false, // optional
- conditions: '', // optional
+ conditions: [], // optional
});
console.log(result);
diff --git a/docs/examples/waf/update-bypass-rule.md b/docs/examples/waf/update-bypass-rule.md
index d0987aa2..a82f8190 100644
--- a/docs/examples/waf/update-bypass-rule.md
+++ b/docs/examples/waf/update-bypass-rule.md
@@ -15,7 +15,7 @@ const result = await waf.updateBypassRule({
description: '', // optional
priority: -100000, // optional
enabled: false, // optional
- conditions: '', // optional
+ conditions: [], // optional
});
console.log(result);
diff --git a/docs/examples/waf/update-challenge-rule.md b/docs/examples/waf/update-challenge-rule.md
index 210200fc..d2d18336 100644
--- a/docs/examples/waf/update-challenge-rule.md
+++ b/docs/examples/waf/update-challenge-rule.md
@@ -16,7 +16,7 @@ const result = await waf.updateChallengeRule({
challengeType: 'compute', // optional
priority: -100000, // optional
enabled: false, // optional
- conditions: '', // optional
+ conditions: [], // optional
difficulty: 1, // optional
ttl: 900, // optional
});
diff --git a/docs/examples/waf/update-deny-rule.md b/docs/examples/waf/update-deny-rule.md
index a46d5680..608bb7c1 100644
--- a/docs/examples/waf/update-deny-rule.md
+++ b/docs/examples/waf/update-deny-rule.md
@@ -15,7 +15,7 @@ const result = await waf.updateDenyRule({
description: '', // optional
priority: -100000, // optional
enabled: false, // optional
- conditions: '', // optional
+ conditions: [], // optional
});
console.log(result);
diff --git a/docs/examples/waf/update-rate-limit-rule.md b/docs/examples/waf/update-rate-limit-rule.md
index 24dfd934..1b30b99e 100644
--- a/docs/examples/waf/update-rate-limit-rule.md
+++ b/docs/examples/waf/update-rate-limit-rule.md
@@ -19,7 +19,7 @@ const result = await waf.updateRateLimitRule({
maxBucketSize: 1, // optional
priority: -100000, // optional
enabled: false, // optional
- conditions: '', // optional
+ conditions: [], // optional
});
console.log(result);
diff --git a/docs/examples/waf/update-redirect-rule.md b/docs/examples/waf/update-redirect-rule.md
index 00e5c3ef..05612edc 100644
--- a/docs/examples/waf/update-redirect-rule.md
+++ b/docs/examples/waf/update-redirect-rule.md
@@ -17,7 +17,7 @@ const result = await waf.updateRedirectRule({
statusCode: 300, // optional
priority: -100000, // optional
enabled: false, // optional
- conditions: '', // optional
+ conditions: [], // optional
});
console.log(result);
diff --git a/package-lock.json b/package-lock.json
index 7854e616..db4c0ce0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@appwrite.io/console",
- "version": "18.4.1",
+ "version": "19.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@appwrite.io/console",
- "version": "18.4.1",
+ "version": "19.0.0",
"license": "BSD-3-Clause",
"dependencies": {
"buffer": "6.0.3",
diff --git a/package.json b/package.json
index 0a5aa133..aff28c17 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "@appwrite.io/console",
"homepage": "https://appwrite.io/support",
"description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
- "version": "18.4.1",
+ "version": "19.0.0",
"license": "BSD-3-Clause",
"main": "dist/cjs/sdk.js",
"exports": {
@@ -11,13 +11,15 @@
"require": "./dist/cjs/sdk.js",
"types": "./types/index.d.ts"
},
- "./package.json": "./package.json"
+ "./package.json": "./package.json",
+ "./spec.json": "./spec.json"
},
"module": "dist/esm/sdk.js",
"types": "types/index.d.ts",
"files": [
"dist",
- "types"
+ "types",
+ "spec.json"
],
"repository": {
"type": "git",
diff --git a/spec.json b/spec.json
new file mode 100644
index 00000000..1a761d5b
--- /dev/null
+++ b/spec.json
@@ -0,0 +1,154059 @@
+{
+ "openapi": "3.0.0",
+ "info": {
+ "version": "2.4.0",
+ "title": "Appwrite",
+ "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)",
+ "termsOfService": "https:\/\/appwrite.io\/policy\/terms",
+ "contact": {
+ "name": "Appwrite Team",
+ "url": "https:\/\/appwrite.io\/support",
+ "email": "team@appwrite.io"
+ },
+ "license": {
+ "name": "BSD-3-Clause",
+ "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"
+ }
+ },
+ "servers": [
+ {
+ "url": "https:\/\/cloud.appwrite.io\/v1",
+ "description": "Appwrite Cloud endpoint."
+ },
+ {
+ "url": "https:\/\/{region}.cloud.appwrite.io\/v1",
+ "description": "Appwrite Cloud regional endpoint. Replace `{region}` with your project region.",
+ "variables": {
+ "region": {
+ "default": "fra",
+ "description": "Appwrite Cloud region."
+ }
+ }
+ }
+ ],
+ "paths": {
+ "\/account": {
+ "get": {
+ "summary": "Get account",
+ "operationId": "accountGet",
+ "tags": [
+ "account"
+ ],
+ "description": "Get the currently logged in user.",
+ "responses": {
+ "200": {
+ "description": "User",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/user"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "account",
+ "demo": "account\/get.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ]
+ },
+ "post": {
+ "summary": "Create account",
+ "operationId": "accountCreate",
+ "tags": [
+ "account"
+ ],
+ "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).",
+ "responses": {
+ "201": {
+ "description": "User",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/user"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "account",
+ "demo": "account\/create.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "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.",
+ "type": "string",
+ "example": ""
+ },
+ "email": {
+ "description": "User email.",
+ "type": "string",
+ "example": "email@example.com",
+ "format": "email"
+ },
+ "password": {
+ "description": "New user password. Must be between 8 and 256 chars.",
+ "type": "string",
+ "example": "password",
+ "format": "password"
+ },
+ "name": {
+ "description": "User name. Max length: 128 chars.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ }
+ },
+ "required": [
+ "userId",
+ "email",
+ "password"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete account",
+ "operationId": "accountDelete",
+ "tags": [
+ "account"
+ ],
+ "description": "Delete the currently logged in user.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "account",
+ "demo": "account\/delete.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ]
+ }
+ },
+ "\/account\/billing-addresses": {
+ "get": {
+ "summary": "List billing addresses",
+ "operationId": "accountListBillingAddresses",
+ "tags": [
+ "account"
+ ],
+ "description": "List all billing addresses for a user.",
+ "responses": {
+ "200": {
+ "description": "Billing address list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/billingAddressList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/list-billing-addresses.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ }
+ ]
+ },
+ "post": {
+ "summary": "Create billing address",
+ "operationId": "accountCreateBillingAddress",
+ "tags": [
+ "account"
+ ],
+ "description": "Add a new billing address to a user's account.",
+ "responses": {
+ "201": {
+ "description": "Address",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/billingAddress"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/create-billing-address.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "country": {
+ "description": "Country",
+ "type": "string",
+ "example": ""
+ },
+ "city": {
+ "description": "City",
+ "type": "string",
+ "example": ""
+ },
+ "streetAddress": {
+ "description": "Street address",
+ "type": "string",
+ "example": ""
+ },
+ "addressLine2": {
+ "description": "Address line 2",
+ "type": "string",
+ "default": "",
+ "example": "",
+ "nullable": true
+ },
+ "state": {
+ "description": "State or province",
+ "type": "string",
+ "default": "",
+ "example": "",
+ "nullable": true
+ },
+ "postalCode": {
+ "description": "Postal code",
+ "type": "string",
+ "default": "",
+ "example": "",
+ "nullable": true
+ }
+ },
+ "required": [
+ "country",
+ "city",
+ "streetAddress"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/billing-addresses\/{billingAddressId}": {
+ "get": {
+ "summary": "Get billing address",
+ "operationId": "accountGetBillingAddress",
+ "tags": [
+ "account"
+ ],
+ "description": "Get a specific billing address for a user using it's ID.",
+ "responses": {
+ "200": {
+ "description": "Address",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/billingAddress"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/get-billing-address.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "billingAddressId",
+ "description": "Unique ID of billing address",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "put": {
+ "summary": "Update billing address",
+ "operationId": "accountUpdateBillingAddress",
+ "tags": [
+ "account"
+ ],
+ "description": "Update a specific billing address using it's ID.",
+ "responses": {
+ "200": {
+ "description": "Address",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/billingAddress"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/update-billing-address.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "billingAddressId",
+ "description": "Unique ID of billing address",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "country": {
+ "description": "Country",
+ "type": "string",
+ "example": ""
+ },
+ "city": {
+ "description": "City",
+ "type": "string",
+ "example": ""
+ },
+ "streetAddress": {
+ "description": "Street address",
+ "type": "string",
+ "example": ""
+ },
+ "addressLine2": {
+ "description": "Address line 2",
+ "type": "string",
+ "default": "",
+ "example": "",
+ "nullable": true
+ },
+ "state": {
+ "description": "State or province",
+ "type": "string",
+ "default": "",
+ "example": "",
+ "nullable": true
+ },
+ "postalCode": {
+ "description": "Postal code",
+ "type": "string",
+ "default": "",
+ "example": "",
+ "nullable": true
+ }
+ },
+ "required": [
+ "country",
+ "city",
+ "streetAddress"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete billing address",
+ "operationId": "accountDeleteBillingAddress",
+ "tags": [
+ "account"
+ ],
+ "description": "Delete a specific billing address using it's ID.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/delete-billing-address.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "billingAddressId",
+ "description": "Billing address unique ID",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/consents": {
+ "get": {
+ "summary": "List consents",
+ "operationId": "accountListConsents",
+ "tags": [
+ "account"
+ ],
+ "description": "Get a list of the OAuth2 consents the current user has given to third-party apps.",
+ "responses": {
+ "200": {
+ "description": "OAuth2 consents list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/oauth2ConsentList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "consents",
+ "demo": "account\/list-consents.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "total",
+ "description": "When set to false, the total count returned will be 0 and will not be calculated.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "example": false,
+ "default": true
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/account\/consents\/{consentId}": {
+ "get": {
+ "summary": "Get consent",
+ "operationId": "accountGetConsent",
+ "tags": [
+ "account"
+ ],
+ "description": "Get an OAuth2 consent the current user has given to a third-party app by its unique ID.",
+ "responses": {
+ "200": {
+ "description": "OAuth2 Consent",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/oauth2Consent"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "consents",
+ "demo": "account\/get-consent.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "consentId",
+ "description": "Consent unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "delete": {
+ "summary": "Delete consent",
+ "operationId": "accountDeleteConsent",
+ "tags": [
+ "account"
+ ],
+ "description": "Delete an OAuth2 consent by its unique ID. All token families issued under the consent are revoked, and the app must ask for consent again to regain access.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "consents",
+ "demo": "account\/delete-consent.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "consentId",
+ "description": "Consent unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/consents\/{consentId}\/tokens": {
+ "get": {
+ "summary": "List consent tokens",
+ "operationId": "accountListConsentTokens",
+ "tags": [
+ "account"
+ ],
+ "description": "Get a list of the token families issued under an OAuth2 consent. Each entry represents one authorized device or session; the token secrets themselves are never returned.",
+ "responses": {
+ "200": {
+ "description": "OAuth2 consent tokens list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/oauth2ConsentTokenList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "consents",
+ "demo": "account\/list-consent-tokens.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "consentId",
+ "description": "Consent unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ },
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "total",
+ "description": "When set to false, the total count returned will be 0 and will not be calculated.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "example": false,
+ "default": true
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/account\/consents\/{consentId}\/tokens\/{tokenId}": {
+ "get": {
+ "summary": "Get consent token",
+ "operationId": "accountGetConsentToken",
+ "tags": [
+ "account"
+ ],
+ "description": "Get a token family issued under an OAuth2 consent by its unique ID. The token secrets themselves are never returned.",
+ "responses": {
+ "200": {
+ "description": "OAuth2 Consent Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/oauth2ConsentToken"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "consents",
+ "demo": "account\/get-consent-token.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "consentId",
+ "description": "Consent unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ },
+ {
+ "name": "tokenId",
+ "description": "Token unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "delete": {
+ "summary": "Delete consent token",
+ "operationId": "accountDeleteConsentToken",
+ "tags": [
+ "account"
+ ],
+ "description": "Delete a token family issued under an OAuth2 consent by its unique ID. The access and refresh tokens of the family stop working immediately; other token families and the consent itself are unaffected.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "consents",
+ "demo": "account\/delete-consent-token.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "consentId",
+ "description": "Consent unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ },
+ {
+ "name": "tokenId",
+ "description": "Token unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/coupons\/{couponId}": {
+ "get": {
+ "summary": "Get coupon details",
+ "operationId": "accountGetCoupon",
+ "tags": [
+ "account"
+ ],
+ "description": "Get coupon details for an account.",
+ "responses": {
+ "200": {
+ "description": "Coupon",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/coupon"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/get-coupon.md",
+ "rate-limit": 50,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "couponId",
+ "description": "ID of the coupon",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/email": {
+ "patch": {
+ "summary": "Update email",
+ "operationId": "accountUpdateEmail",
+ "tags": [
+ "account"
+ ],
+ "description": "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.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n",
+ "responses": {
+ "200": {
+ "description": "User",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/user"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "account",
+ "demo": "account\/update-email.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "email": {
+ "description": "User email.",
+ "type": "string",
+ "example": "email@example.com",
+ "format": "email"
+ },
+ "password": {
+ "description": "User password. Must be at least 8 chars.",
+ "type": "string",
+ "example": "password",
+ "format": "password"
+ }
+ },
+ "required": [
+ "email",
+ "password"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/identities": {
+ "get": {
+ "summary": "List identities",
+ "operationId": "accountListIdentities",
+ "tags": [
+ "account"
+ ],
+ "description": "Get the list of identities for the currently logged in user.",
+ "responses": {
+ "200": {
+ "description": "Identities List",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/identityList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "identities",
+ "demo": "account\/list-identities.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "total",
+ "description": "When set to false, the total count returned will be 0 and will not be calculated.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "example": false,
+ "default": true
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/account\/identities\/{identityId}": {
+ "delete": {
+ "summary": "Delete identity",
+ "operationId": "accountDeleteIdentity",
+ "tags": [
+ "account"
+ ],
+ "description": "Delete an identity by its unique ID.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "identities",
+ "demo": "account\/delete-identity.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "identityId",
+ "description": "Identity ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/invoices": {
+ "get": {
+ "summary": "List invoices",
+ "operationId": "accountListInvoices",
+ "tags": [
+ "account"
+ ],
+ "description": "List all invoices tied to an account.",
+ "responses": {
+ "200": {
+ "description": "Billing invoices list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/invoiceList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/list-invoices.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "teams.read",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/account\/jwts": {
+ "post": {
+ "summary": "Create JWT",
+ "operationId": "accountCreateJWT",
+ "tags": [
+ "account"
+ ],
+ "description": "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.",
+ "responses": {
+ "201": {
+ "description": "JWT",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/jwt"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "tokens",
+ "demo": "account\/create-jwt.md",
+ "rate-limit": 120,
+ "rate-time": 60,
+ "rate-key": "url:{url},userId:{userId}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "duration": {
+ "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.",
+ "type": "integer",
+ "default": 900,
+ "example": 0,
+ "format": "int32"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/keys": {
+ "get": {
+ "summary": "List account key",
+ "operationId": "accountListKeys",
+ "tags": [
+ "account"
+ ],
+ "description": "Get a list of all API keys from the current account.",
+ "responses": {
+ "200": {
+ "description": "API Keys List",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/keyList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "keys",
+ "demo": "account\/list-keys.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "total",
+ "description": "When set to false, the total count returned will be 0 and will not be calculated.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "example": false,
+ "default": true
+ },
+ "in": "query"
+ }
+ ]
+ },
+ "post": {
+ "summary": "Create account key",
+ "operationId": "accountCreateKey",
+ "tags": [
+ "account"
+ ],
+ "description": "Create a new account API key.",
+ "responses": {
+ "201": {
+ "description": "Key",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/key"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "keys",
+ "demo": "account\/create-key.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "Key name. Max length: 128 chars.",
+ "type": "string",
+ "example": ""
+ },
+ "scopes": {
+ "description": "Key scopes list. Maximum of 200 scopes are allowed.",
+ "type": "array",
+ "items": {
+ "title": "AccountKeyScopes",
+ "type": "string",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "account"
+ ],
+ "title": "account"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "teams.read"
+ ],
+ "title": "teams.read"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "teams.write"
+ ],
+ "title": "teams.write"
+ }
+ ]
+ }
+ },
+ "expire": {
+ "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.",
+ "type": "string",
+ "example": "2020-10-15T06:38:00.000+00:00",
+ "format": "datetime",
+ "nullable": true
+ }
+ },
+ "required": [
+ "name",
+ "scopes"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/keys\/{keyId}": {
+ "get": {
+ "summary": "Get account key",
+ "operationId": "accountGetKey",
+ "tags": [
+ "account"
+ ],
+ "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your account including it's scopes.",
+ "responses": {
+ "200": {
+ "description": "Key",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/key"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "keys",
+ "demo": "account\/get-key.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "keyId",
+ "description": "Key unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "put": {
+ "summary": "Update account key",
+ "operationId": "accountUpdateKey",
+ "tags": [
+ "account"
+ ],
+ "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.",
+ "responses": {
+ "200": {
+ "description": "Key",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/key"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "keys",
+ "demo": "account\/update-key.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "keyId",
+ "description": "Key unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "Key name. Max length: 128 chars.",
+ "type": "string",
+ "example": ""
+ },
+ "scopes": {
+ "description": "Key scopes list. Maximum of 200 scopes are allowed.",
+ "type": "array",
+ "items": {
+ "title": "AccountKeyScopes",
+ "type": "string",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "account"
+ ],
+ "title": "account"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "teams.read"
+ ],
+ "title": "teams.read"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "teams.write"
+ ],
+ "title": "teams.write"
+ }
+ ]
+ }
+ },
+ "expire": {
+ "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.",
+ "type": "string",
+ "example": "2020-10-15T06:38:00.000+00:00",
+ "format": "datetime",
+ "nullable": true
+ }
+ },
+ "required": [
+ "name",
+ "scopes"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete account key",
+ "operationId": "accountDeleteKey",
+ "tags": [
+ "account"
+ ],
+ "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "keys",
+ "demo": "account\/delete-key.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "keyId",
+ "description": "Key unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/mfa": {
+ "patch": {
+ "summary": "Update MFA",
+ "operationId": "accountUpdateMFA",
+ "tags": [
+ "account"
+ ],
+ "description": "Enable or disable MFA on an account.",
+ "responses": {
+ "200": {
+ "description": "User",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/user"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "mfa",
+ "demo": "account\/update-mfa.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mfa": {
+ "description": "Enable or disable MFA.",
+ "type": "boolean",
+ "example": false
+ }
+ },
+ "required": [
+ "mfa"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/mfa\/authenticators\/{type}": {
+ "post": {
+ "summary": "Create authenticator",
+ "operationId": "accountCreateMfaAuthenticator",
+ "tags": [
+ "account"
+ ],
+ "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.",
+ "responses": {
+ "200": {
+ "description": "MFAType",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/mfaType"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": true,
+ "x-appwrite": {
+ "group": "mfa",
+ "demo": "account\/create-mfa-authenticator.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.createMFAAuthenticator"
+ },
+ "methods": [
+ {
+ "name": "createMfaAuthenticator",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "type"
+ ],
+ "required": [
+ "type"
+ ],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/mfaType"
+ }
+ ],
+ "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.",
+ "demo": "account\/create-mfa-authenticator.md",
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.createMFAAuthenticator"
+ }
+ },
+ {
+ "name": "createMFAAuthenticator",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "type"
+ ],
+ "required": [
+ "type"
+ ],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/mfaType"
+ }
+ ],
+ "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.",
+ "demo": "account\/create-mfa-authenticator.md",
+ "public": true
+ }
+ ],
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "type",
+ "description": "Type of authenticator. Must be `totp`",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "totp",
+ "title": "AuthenticatorType",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "totp"
+ ],
+ "title": "totp"
+ }
+ ]
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "put": {
+ "summary": "Update authenticator (confirmation)",
+ "operationId": "accountUpdateMfaAuthenticator",
+ "tags": [
+ "account"
+ ],
+ "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.",
+ "responses": {
+ "200": {
+ "description": "User",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/user"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": true,
+ "x-appwrite": {
+ "group": "mfa",
+ "demo": "account\/update-mfa-authenticator.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.updateMFAAuthenticator"
+ },
+ "methods": [
+ {
+ "name": "updateMfaAuthenticator",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "type",
+ "otp"
+ ],
+ "required": [
+ "type",
+ "otp"
+ ],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/user"
+ }
+ ],
+ "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.",
+ "demo": "account\/update-mfa-authenticator.md",
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.updateMFAAuthenticator"
+ }
+ },
+ {
+ "name": "updateMFAAuthenticator",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "type",
+ "otp"
+ ],
+ "required": [
+ "type",
+ "otp"
+ ],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/user"
+ }
+ ],
+ "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.",
+ "demo": "account\/update-mfa-authenticator.md",
+ "public": true
+ }
+ ],
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "type",
+ "description": "Type of authenticator.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "totp",
+ "title": "AuthenticatorType",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "totp"
+ ],
+ "title": "totp"
+ }
+ ]
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "otp": {
+ "description": "Valid verification token.",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "otp"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete authenticator",
+ "operationId": "accountDeleteMfaAuthenticator",
+ "tags": [
+ "account"
+ ],
+ "description": "Delete an authenticator for a user by ID.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": true,
+ "x-appwrite": {
+ "group": "mfa",
+ "demo": "account\/delete-mfa-authenticator.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.deleteMFAAuthenticator"
+ },
+ "methods": [
+ {
+ "name": "deleteMfaAuthenticator",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "type"
+ ],
+ "required": [
+ "type"
+ ],
+ "responses": [
+ {
+ "code": 204
+ }
+ ],
+ "description": "Delete an authenticator for a user by ID.",
+ "demo": "account\/delete-mfa-authenticator.md",
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.deleteMFAAuthenticator"
+ }
+ },
+ {
+ "name": "deleteMFAAuthenticator",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "type"
+ ],
+ "required": [
+ "type"
+ ],
+ "responses": [
+ {
+ "code": 204
+ }
+ ],
+ "description": "Delete an authenticator for a user by ID.",
+ "demo": "account\/delete-mfa-authenticator.md",
+ "public": true
+ }
+ ],
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "type",
+ "description": "Type of authenticator.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "totp",
+ "title": "AuthenticatorType",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "totp"
+ ],
+ "title": "totp"
+ }
+ ]
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/mfa\/challenges": {
+ "post": {
+ "summary": "Create MFA challenge",
+ "operationId": "accountCreateMfaChallenge",
+ "tags": [
+ "account"
+ ],
+ "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.",
+ "responses": {
+ "201": {
+ "description": "MFA Challenge",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/mfaChallenge"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": true,
+ "x-appwrite": {
+ "group": "mfa",
+ "demo": "account\/create-mfa-challenge.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},userId:{userId}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.createMFAChallenge"
+ },
+ "methods": [
+ {
+ "name": "createMfaChallenge",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "factor"
+ ],
+ "required": [
+ "factor"
+ ],
+ "responses": [
+ {
+ "code": 201,
+ "model": "#\/components\/schemas\/mfaChallenge"
+ }
+ ],
+ "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.",
+ "demo": "account\/create-mfa-challenge.md",
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.createMFAChallenge"
+ }
+ },
+ {
+ "name": "createMFAChallenge",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "factor"
+ ],
+ "required": [
+ "factor"
+ ],
+ "responses": [
+ {
+ "code": 201,
+ "model": "#\/components\/schemas\/mfaChallenge"
+ }
+ ],
+ "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.",
+ "demo": "account\/create-mfa-challenge.md",
+ "public": true
+ }
+ ],
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "factor": {
+ "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`, `custom`.",
+ "type": "string",
+ "example": "email",
+ "title": "AuthenticationFactor",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "email"
+ ],
+ "title": "email"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "phone"
+ ],
+ "title": "phone"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "totp"
+ ],
+ "title": "totp"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "recoverycode"
+ ],
+ "title": "recoverycode"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "custom"
+ ],
+ "title": "custom"
+ }
+ ]
+ }
+ },
+ "required": [
+ "factor"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "put": {
+ "summary": "Update MFA challenge (confirmation)",
+ "operationId": "accountUpdateMfaChallenge",
+ "tags": [
+ "account"
+ ],
+ "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.",
+ "responses": {
+ "200": {
+ "description": "Session",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/session"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": true,
+ "x-appwrite": {
+ "group": "mfa",
+ "demo": "account\/update-mfa-challenge.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},challengeId:{param-challengeId}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.updateMFAChallenge"
+ },
+ "methods": [
+ {
+ "name": "updateMfaChallenge",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "challengeId",
+ "otp"
+ ],
+ "required": [
+ "challengeId",
+ "otp"
+ ],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/session"
+ }
+ ],
+ "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.",
+ "demo": "account\/update-mfa-challenge.md",
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.updateMFAChallenge"
+ }
+ },
+ {
+ "name": "updateMFAChallenge",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "challengeId",
+ "otp"
+ ],
+ "required": [
+ "challengeId",
+ "otp"
+ ],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/session"
+ }
+ ],
+ "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.",
+ "demo": "account\/update-mfa-challenge.md",
+ "public": true
+ }
+ ],
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "challengeId": {
+ "description": "ID of the challenge.",
+ "type": "string",
+ "example": ""
+ },
+ "otp": {
+ "description": "Valid verification token.",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "challengeId",
+ "otp"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/mfa\/factors": {
+ "get": {
+ "summary": "List factors",
+ "operationId": "accountListMfaFactors",
+ "tags": [
+ "account"
+ ],
+ "description": "List the factors available on the account to be used as a MFA challange.",
+ "responses": {
+ "200": {
+ "description": "MFAFactors",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/mfaFactors"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": true,
+ "x-appwrite": {
+ "group": "mfa",
+ "demo": "account\/list-mfa-factors.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.listMFAFactors"
+ },
+ "methods": [
+ {
+ "name": "listMfaFactors",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [],
+ "required": [],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/mfaFactors"
+ }
+ ],
+ "description": "List the factors available on the account to be used as a MFA challange.",
+ "demo": "account\/list-mfa-factors.md",
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.listMFAFactors"
+ }
+ },
+ {
+ "name": "listMFAFactors",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [],
+ "required": [],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/mfaFactors"
+ }
+ ],
+ "description": "List the factors available on the account to be used as a MFA challange.",
+ "demo": "account\/list-mfa-factors.md",
+ "public": true
+ }
+ ],
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ]
+ }
+ },
+ "\/account\/mfa\/recovery-codes": {
+ "get": {
+ "summary": "List MFA recovery codes",
+ "operationId": "accountGetMfaRecoveryCodes",
+ "tags": [
+ "account"
+ ],
+ "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.",
+ "responses": {
+ "200": {
+ "description": "MFA Recovery Codes",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/mfaRecoveryCodes"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": true,
+ "x-appwrite": {
+ "group": "mfa",
+ "demo": "account\/get-mfa-recovery-codes.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.getMFARecoveryCodes"
+ },
+ "methods": [
+ {
+ "name": "getMfaRecoveryCodes",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [],
+ "required": [],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/mfaRecoveryCodes"
+ }
+ ],
+ "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.",
+ "demo": "account\/get-mfa-recovery-codes.md",
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.getMFARecoveryCodes"
+ }
+ },
+ {
+ "name": "getMFARecoveryCodes",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [],
+ "required": [],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/mfaRecoveryCodes"
+ }
+ ],
+ "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.",
+ "demo": "account\/get-mfa-recovery-codes.md",
+ "public": true
+ }
+ ],
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ]
+ },
+ "post": {
+ "summary": "Create MFA recovery codes",
+ "operationId": "accountCreateMfaRecoveryCodes",
+ "tags": [
+ "account"
+ ],
+ "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.",
+ "responses": {
+ "201": {
+ "description": "MFA Recovery Codes",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/mfaRecoveryCodes"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": true,
+ "x-appwrite": {
+ "group": "mfa",
+ "demo": "account\/create-mfa-recovery-codes.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.createMFARecoveryCodes"
+ },
+ "methods": [
+ {
+ "name": "createMfaRecoveryCodes",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [],
+ "required": [],
+ "responses": [
+ {
+ "code": 201,
+ "model": "#\/components\/schemas\/mfaRecoveryCodes"
+ }
+ ],
+ "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.",
+ "demo": "account\/create-mfa-recovery-codes.md",
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.createMFARecoveryCodes"
+ }
+ },
+ {
+ "name": "createMFARecoveryCodes",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [],
+ "required": [],
+ "responses": [
+ {
+ "code": 201,
+ "model": "#\/components\/schemas\/mfaRecoveryCodes"
+ }
+ ],
+ "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.",
+ "demo": "account\/create-mfa-recovery-codes.md",
+ "public": true
+ }
+ ],
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ]
+ },
+ "patch": {
+ "summary": "Update MFA recovery codes (regenerate)",
+ "operationId": "accountUpdateMfaRecoveryCodes",
+ "tags": [
+ "account"
+ ],
+ "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.",
+ "responses": {
+ "200": {
+ "description": "MFA Recovery Codes",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/mfaRecoveryCodes"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": true,
+ "x-appwrite": {
+ "group": "mfa",
+ "demo": "account\/update-mfa-recovery-codes.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.updateMFARecoveryCodes"
+ },
+ "methods": [
+ {
+ "name": "updateMfaRecoveryCodes",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [],
+ "required": [],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/mfaRecoveryCodes"
+ }
+ ],
+ "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.",
+ "demo": "account\/update-mfa-recovery-codes.md",
+ "public": true,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.updateMFARecoveryCodes"
+ }
+ },
+ {
+ "name": "updateMFARecoveryCodes",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [],
+ "required": [],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/mfaRecoveryCodes"
+ }
+ ],
+ "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.",
+ "demo": "account\/update-mfa-recovery-codes.md",
+ "public": true
+ }
+ ],
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ]
+ }
+ },
+ "\/account\/name": {
+ "patch": {
+ "summary": "Update name",
+ "operationId": "accountUpdateName",
+ "tags": [
+ "account"
+ ],
+ "description": "Update currently logged in user account name.",
+ "responses": {
+ "200": {
+ "description": "User",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/user"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "account",
+ "demo": "account\/update-name.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "User name. Max length: 128 chars.",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "name"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/passkeys": {
+ "get": {
+ "summary": "List passkeys",
+ "operationId": "accountListPasskeys",
+ "tags": [
+ "account"
+ ],
+ "description": "Get the list of verified passkeys registered by the currently logged in user.",
+ "responses": {
+ "200": {
+ "description": "Passkeys List",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/passkeyList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "passkeys",
+ "demo": "account\/list-passkeys.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter and order on the following attributes: $id, $createdAt, $updatedAt, name, accessedAt",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "total",
+ "description": "When set to false, the total count returned will be 0 and will not be calculated.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "example": false,
+ "default": true
+ },
+ "in": "query"
+ }
+ ]
+ },
+ "post": {
+ "summary": "Create passkey",
+ "operationId": "accountCreatePasskey",
+ "tags": [
+ "account"
+ ],
+ "description": "Start registering a passkey for the currently logged in user. The session must have signed in or completed an MFA challenge within the last 10 minutes. Pass the returned `publicKey` options to `navigator.credentials.create()`, then complete the registration with [Update passkey verification](\/docs\/references\/cloud\/client-web\/account#updatePasskeyVerification). The passkey stays pending until verified, and the challenge expires after 5 minutes.",
+ "responses": {
+ "201": {
+ "description": "Passkey Challenge",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/passkeyChallenge"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "passkeys",
+ "demo": "account\/create-passkey.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},userId:{userId}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "passkeyId": {
+ "description": "Passkey 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.",
+ "type": "string",
+ "default": "unique()",
+ "example": ""
+ },
+ "name": {
+ "description": "Passkey name, shown when listing passkeys. Max length: 128 chars.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/passkeys\/{passkeyId}": {
+ "get": {
+ "summary": "Get passkey",
+ "operationId": "accountGetPasskey",
+ "tags": [
+ "account"
+ ],
+ "description": "Get a verified passkey of the currently logged in user by its unique ID.",
+ "responses": {
+ "200": {
+ "description": "Passkey",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/passkey"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "passkeys",
+ "demo": "account\/get-passkey.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "passkeyId",
+ "description": "Passkey ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "patch": {
+ "summary": "Update passkey",
+ "operationId": "accountUpdatePasskey",
+ "tags": [
+ "account"
+ ],
+ "description": "Rename a passkey of the currently logged in user.",
+ "responses": {
+ "200": {
+ "description": "Passkey",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/passkey"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "passkeys",
+ "demo": "account\/update-passkey.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "passkeyId",
+ "description": "Passkey ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "Passkey name. Max length: 128 chars.",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "name"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete passkey",
+ "operationId": "accountDeletePasskey",
+ "tags": [
+ "account"
+ ],
+ "description": "Delete a passkey from the currently logged in user. The passkey can no longer be used to sign in, although it may remain stored on the user's device. The session must have signed in or completed an MFA challenge within the last 10 minutes.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "passkeys",
+ "demo": "account\/delete-passkey.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "passkeyId",
+ "description": "Passkey ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/passkeys\/{passkeyId}\/verification": {
+ "put": {
+ "summary": "Update passkey verification",
+ "operationId": "accountUpdatePasskeyVerification",
+ "tags": [
+ "account"
+ ],
+ "description": "Complete a passkey registration started with [Create passkey](\/docs\/references\/cloud\/client-web\/account#createPasskey). Pass the JSON form of the credential returned by `navigator.credentials.create()`, for example `credential.toJSON()`. Each registration can be verified once; a failed attempt requires starting it again.",
+ "responses": {
+ "200": {
+ "description": "Passkey",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/passkey"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "passkeys",
+ "demo": "account\/update-passkey-verification.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},userId:{userId}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "passkeyId",
+ "description": "Passkey ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "credential": {
+ "description": "Registration credential returned by the authenticator, in the JSON form produced by `PublicKeyCredential.toJSON()`.",
+ "type": "object",
+ "default": {},
+ "example": {}
+ }
+ },
+ "required": [
+ "credential"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/password": {
+ "patch": {
+ "summary": "Update password",
+ "operationId": "accountUpdatePassword",
+ "tags": [
+ "account"
+ ],
+ "description": "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.",
+ "responses": {
+ "200": {
+ "description": "User",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/user"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "account",
+ "demo": "account\/update-password.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "password": {
+ "description": "New user password. Must be at least 8 chars.",
+ "type": "string",
+ "example": "password",
+ "format": "password"
+ },
+ "oldPassword": {
+ "description": "Current user password. Max length: 256 chars.",
+ "type": "string",
+ "default": "",
+ "example": "password",
+ "format": "password"
+ }
+ },
+ "required": [
+ "password"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/payment-methods": {
+ "get": {
+ "summary": "List payment methods",
+ "operationId": "accountListPaymentMethods",
+ "tags": [
+ "account"
+ ],
+ "description": "List payment methods for this account.",
+ "responses": {
+ "200": {
+ "description": "Payment methods list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/paymentMethodList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/list-payment-methods.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ }
+ ]
+ },
+ "post": {
+ "summary": "Create new payment method",
+ "operationId": "accountCreatePaymentMethod",
+ "tags": [
+ "account"
+ ],
+ "description": "Create a new payment method for the current user account.",
+ "responses": {
+ "201": {
+ "description": "paymentMethod",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/paymentMethod"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/create-payment-method.md",
+ "rate-limit": 10,
+ "rate-time": 86400,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ]
+ }
+ },
+ "\/account\/payment-methods\/{paymentMethodId}": {
+ "get": {
+ "summary": "Get payment method",
+ "operationId": "accountGetPaymentMethod",
+ "tags": [
+ "account"
+ ],
+ "description": "Get a specific payment method for the user.",
+ "responses": {
+ "200": {
+ "description": "paymentMethod",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/paymentMethod"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/get-payment-method.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "paymentMethodId",
+ "description": "Unique ID of payment method",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "patch": {
+ "summary": "Update payment method",
+ "operationId": "accountUpdatePaymentMethod",
+ "tags": [
+ "account"
+ ],
+ "description": "Update a new payment method for the current user account.",
+ "responses": {
+ "200": {
+ "description": "paymentMethod",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/paymentMethod"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/update-payment-method.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "paymentMethodId",
+ "description": "Unique ID of payment method",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "expiryMonth": {
+ "description": "Payment expiry month",
+ "type": "integer",
+ "example": 1,
+ "format": "int32"
+ },
+ "expiryYear": {
+ "description": "Expiry year",
+ "type": "integer",
+ "example": 2026,
+ "format": "int32"
+ },
+ "state": {
+ "description": "State of the payment method country",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "expiryMonth",
+ "expiryYear"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete payment method",
+ "operationId": "accountDeletePaymentMethod",
+ "tags": [
+ "account"
+ ],
+ "description": "Delete a specific payment method from a user's account.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/delete-payment-method.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "paymentMethodId",
+ "description": "Unique ID of payment method",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/payment-methods\/{paymentMethodId}\/provider": {
+ "patch": {
+ "summary": "Update payment method provider id",
+ "operationId": "accountUpdatePaymentMethodProvider",
+ "tags": [
+ "account"
+ ],
+ "description": "Update payment method provider.",
+ "responses": {
+ "200": {
+ "description": "paymentMethod",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/paymentMethod"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/update-payment-method-provider.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "paymentMethodId",
+ "description": "Unique ID of payment method",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "providerMethodId": {
+ "description": "Payment method ID from the payment provider",
+ "type": "string",
+ "example": ""
+ },
+ "name": {
+ "description": "Name in the payment method",
+ "type": "string",
+ "example": ""
+ },
+ "state": {
+ "description": "State of the payment method country",
+ "type": "string",
+ "example": "",
+ "nullable": true
+ }
+ },
+ "required": [
+ "providerMethodId",
+ "name"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/payment-methods\/{paymentMethodId}\/setup": {
+ "patch": {
+ "summary": "Update payment method with new setup with mandates for indian cards",
+ "operationId": "accountUpdatePaymentMethodMandateOptions",
+ "tags": [
+ "account"
+ ],
+ "description": "Update payment method mandate options.",
+ "responses": {
+ "200": {
+ "description": "paymentMethod",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/paymentMethod"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "account\/update-payment-method-mandate-options.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "paymentMethodId",
+ "description": "Unique ID of payment method",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/phone": {
+ "patch": {
+ "summary": "Update phone",
+ "operationId": "accountUpdatePhone",
+ "tags": [
+ "account"
+ ],
+ "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.",
+ "responses": {
+ "200": {
+ "description": "User",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/user"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "account",
+ "demo": "account\/update-phone.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "phone": {
+ "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.",
+ "type": "string",
+ "example": "+12065550100",
+ "format": "phone"
+ },
+ "password": {
+ "description": "User password. Must be at least 8 chars.",
+ "type": "string",
+ "example": "password",
+ "format": "password"
+ }
+ },
+ "required": [
+ "phone",
+ "password"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/prefs": {
+ "get": {
+ "summary": "Get account preferences",
+ "operationId": "accountGetPrefs",
+ "tags": [
+ "account"
+ ],
+ "description": "Get the preferences as a key-value object for the currently logged in user.",
+ "responses": {
+ "200": {
+ "description": "Preferences",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/preferences"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "account",
+ "demo": "account\/get-prefs.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ]
+ },
+ "patch": {
+ "summary": "Update preferences",
+ "operationId": "accountUpdatePrefs",
+ "tags": [
+ "account"
+ ],
+ "description": "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.",
+ "responses": {
+ "200": {
+ "description": "User",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/user"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "account",
+ "demo": "account\/update-prefs.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "prefs": {
+ "description": "Prefs key-value JSON object.",
+ "type": "object",
+ "default": {},
+ "example": {
+ "language": "en",
+ "timezone": "UTC",
+ "darkTheme": true
+ }
+ }
+ },
+ "required": [
+ "prefs"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/recovery": {
+ "post": {
+ "summary": "Create password recovery",
+ "operationId": "accountCreateRecovery",
+ "tags": [
+ "account"
+ ],
+ "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.",
+ "responses": {
+ "201": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "recovery",
+ "demo": "account\/create-recovery.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": [
+ "url:{url},email:{param-email}",
+ "url:{url},ip:{ip}"
+ ],
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "email": {
+ "description": "User email.",
+ "type": "string",
+ "example": "email@example.com",
+ "format": "email"
+ },
+ "url": {
+ "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.",
+ "type": "string",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ }
+ },
+ "required": [
+ "email",
+ "url"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "put": {
+ "summary": "Update password recovery (confirmation)",
+ "operationId": "accountUpdateRecovery",
+ "tags": [
+ "account"
+ ],
+ "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.",
+ "responses": {
+ "200": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "recovery",
+ "demo": "account\/update-recovery.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},userId:{param-userId}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "description": "User ID.",
+ "type": "string",
+ "example": ""
+ },
+ "secret": {
+ "description": "Valid reset token.",
+ "type": "string",
+ "example": ""
+ },
+ "password": {
+ "description": "New user password. Must be between 8 and 256 chars.",
+ "type": "string",
+ "example": "password",
+ "format": "password"
+ }
+ },
+ "required": [
+ "userId",
+ "secret",
+ "password"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/recovery\/otp": {
+ "post": {
+ "summary": "Create password recovery (OTP)",
+ "operationId": "accountCreateRecoveryOTP",
+ "tags": [
+ "account"
+ ],
+ "description": "Use this endpoint to send a 6-digit password recovery code to the user's email address. Unlike [createRecovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a recovery page. Learn more about how to [complete the recovery process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecoveryOTP). The code sent to the user's email address is valid for 15 minutes.\n\nEnable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing.\n",
+ "responses": {
+ "201": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "recovery",
+ "demo": "account\/create-recovery-otp.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": [
+ "url:{url},email:{param-email}",
+ "url:{url},ip:{ip}"
+ ],
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "email": {
+ "description": "User email.",
+ "type": "string",
+ "example": "email@example.com",
+ "format": "email"
+ },
+ "phrase": {
+ "description": "Toggle for security phrase. If enabled, email will be sent 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.",
+ "type": "boolean",
+ "default": false,
+ "example": false
+ }
+ },
+ "required": [
+ "email"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "put": {
+ "summary": "Update password recovery (OTP)",
+ "operationId": "accountUpdateRecoveryOTP",
+ "tags": [
+ "account"
+ ],
+ "description": "Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated.\n",
+ "responses": {
+ "200": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "recovery",
+ "demo": "account\/update-recovery-otp.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},userId:{param-userId}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "description": "User ID.",
+ "type": "string",
+ "example": ""
+ },
+ "secret": {
+ "description": "Valid recovery OTP code.",
+ "type": "string",
+ "example": ""
+ },
+ "password": {
+ "description": "New user password. Must be between 8 and 256 chars.",
+ "type": "string",
+ "example": "password",
+ "format": "password"
+ }
+ },
+ "required": [
+ "userId",
+ "secret",
+ "password"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/sessions": {
+ "get": {
+ "summary": "List sessions",
+ "operationId": "accountListSessions",
+ "tags": [
+ "account"
+ ],
+ "description": "Get the list of active sessions across different devices for the currently logged in user.",
+ "responses": {
+ "200": {
+ "description": "Sessions List",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/sessionList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/list-sessions.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "total",
+ "description": "When set to false, the total count returned will be 0 and will not be calculated.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "example": false,
+ "default": true
+ },
+ "in": "query"
+ }
+ ]
+ },
+ "delete": {
+ "summary": "Delete sessions",
+ "operationId": "accountDeleteSessions",
+ "tags": [
+ "account"
+ ],
+ "description": "Delete all sessions from the user account and remove any sessions cookies from the end client. Pass `current` as false to keep the session making the request and sign out of every other session.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/delete-sessions.md",
+ "rate-limit": 100,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "current",
+ "description": "Delete the current session too. Use false to sign out of every other session while staying signed in on this one.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "example": false,
+ "default": true
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/account\/sessions\/anonymous": {
+ "post": {
+ "summary": "Create anonymous session",
+ "operationId": "accountCreateAnonymousSession",
+ "tags": [
+ "account"
+ ],
+ "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).",
+ "responses": {
+ "201": {
+ "description": "Session",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/session"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/create-anonymous-session.md",
+ "rate-limit": 50,
+ "rate-time": 3600,
+ "rate-key": "ip:{ip}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ]
+ }
+ },
+ "\/account\/sessions\/email": {
+ "post": {
+ "summary": "Create email password session",
+ "operationId": "accountCreateEmailPasswordSession",
+ "tags": [
+ "account"
+ ],
+ "description": "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. Use the optional `duration` parameter to create a shorter session, for example when the user doesn't choose \"remember me\". It must be at least 60 seconds and cannot exceed the project maximum session length.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).",
+ "responses": {
+ "201": {
+ "description": "Session",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/session"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/create-email-password-session.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},email:{param-email}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "email": {
+ "description": "User email.",
+ "type": "string",
+ "example": "email@example.com",
+ "format": "email"
+ },
+ "password": {
+ "description": "User password. Must be at least 8 chars.",
+ "type": "string",
+ "example": "password",
+ "format": "password"
+ },
+ "duration": {
+ "description": "Session length in seconds. Minimum is 60 seconds, and it cannot exceed the project maximum session length. Defaults to the project maximum session length.",
+ "type": "integer",
+ "example": 60,
+ "format": "int32",
+ "nullable": true
+ }
+ },
+ "required": [
+ "email",
+ "password"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/sessions\/id-token": {
+ "post": {
+ "summary": "Create ID token session",
+ "operationId": "accountCreateIdTokenSession",
+ "tags": [
+ "account"
+ ],
+ "description": "Allow the user to login to their account using an OpenID Connect ID token obtained natively from the OAuth2 provider, for example via Google Credential Manager on Android or Sign in with Apple on iOS. No browser or redirect is involved: the ID token is verified against the provider's published signing keys and a session is created in a single request.\n\nNative sign-in is switched on per provider with its nativeEnabled setting. It is independent of the browser-based flow's enabled setting, which has no effect on this endpoint. The token's audience must match the provider's configured client ID or one of its native client IDs; tokens issued for any other client ID are rejected. For Sign in with Apple, register your app's bundle ID as a native client ID. For Google, the web client ID used by Credential Manager is usually the configured client ID; add your Android and iOS client IDs as native client IDs if your app requests tokens for them.\n\nPass the raw nonce used when requesting the ID token so it can be validated against the token's nonce claim. When signing in with Apple, the nonce is required: hash it with SHA-256 before passing it to the Apple SDK, and send the raw value here - Apple tokens requested without a nonce are rejected. For Google the nonce is optional: it is validated whenever the token carries one, and ignored when the provider issued the token without one. Apple only returns the user's name on the first authorization, and never inside the ID token - capture it on the client and pass it via the name parameter.\n\nIf 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 verified email received from the provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nThis flow does not return provider refresh tokens. You may pass an access token the provider handed your client, along with its lifetime, to store it on the session - but Appwrite cannot renew it once it expires. If your app needs long-lived access to provider APIs, use the browser-based OAuth2 flow instead.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n",
+ "responses": {
+ "201": {
+ "description": "Session",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/session"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/create-id-token-session.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "description": "OAuth2 provider that issued the ID token. Currently, supported providers are: apple, google.",
+ "type": "string",
+ "example": "apple",
+ "title": "IdTokenProvider",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "apple"
+ ],
+ "title": "apple"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "google"
+ ],
+ "title": "google"
+ }
+ ]
+ },
+ "idToken": {
+ "description": "OpenID Connect ID token (JWT) obtained natively from the provider, for example via Google Credential Manager or Sign in with Apple.",
+ "type": "string",
+ "example": ""
+ },
+ "nonce": {
+ "description": "Raw nonce used when requesting the ID token. Required for Apple, and whenever the token carries a nonce claim, which must match it. Ignored when the provider issued the token without a nonce.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "accessToken": {
+ "description": "Provider access token to store alongside the session for calling provider APIs. Never used for authentication.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "accessTokenExpiry": {
+ "description": "Seconds until the provider access token expires, as reported by the provider. Stored so clients can tell when the stored token goes stale.",
+ "type": "integer",
+ "default": 0,
+ "example": 0,
+ "format": "int32"
+ },
+ "name": {
+ "description": "User name. Only used when creating a new user and the ID token has no name claim, such as on the first Sign in with Apple authorization.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ }
+ },
+ "required": [
+ "provider",
+ "idToken"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/sessions\/magic-url": {
+ "put": {
+ "summary": "Update magic URL session",
+ "operationId": "accountUpdateMagicURLSession",
+ "tags": [
+ "account"
+ ],
+ "description": "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.",
+ "responses": {
+ "201": {
+ "description": "Session",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/session"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": true,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/update-magic-url-session.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "ip:{ip},userId:{param-userId}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "deprecated": {
+ "since": "1.6.0",
+ "replaceWith": "account.createSession"
+ },
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "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.",
+ "type": "string",
+ "example": ""
+ },
+ "secret": {
+ "description": "Valid verification token.",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "userId",
+ "secret"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/sessions\/oauth2\/{provider}": {
+ "get": {
+ "summary": "Create OAuth2 session",
+ "operationId": "accountCreateOAuth2Session",
+ "tags": [
+ "account"
+ ],
+ "description": "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.\n\nIf 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.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n",
+ "responses": {
+ "301": {
+ "description": "No content",
+ "content": {
+ "text\/html": {
+ "schema": {
+ "type": "string",
+ "format": "binary"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/create-o-auth-2-session.md",
+ "rate-limit": 50,
+ "rate-time": 3600,
+ "rate-key": "ip:{ip}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "provider",
+ "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, webflow, wordpress, x, yahoo, yammer, yandex, zoho, zoom.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "amazon",
+ "title": "OAuthProvider",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "amazon"
+ ],
+ "title": "amazon"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "apple"
+ ],
+ "title": "apple"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "appwrite"
+ ],
+ "title": "appwrite"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "auth0"
+ ],
+ "title": "auth0"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "authentik"
+ ],
+ "title": "authentik"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "autodesk"
+ ],
+ "title": "autodesk"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "bitbucket"
+ ],
+ "title": "bitbucket"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "bitly"
+ ],
+ "title": "bitly"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "box"
+ ],
+ "title": "box"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "cloudflare"
+ ],
+ "title": "cloudflare"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "dailymotion"
+ ],
+ "title": "dailymotion"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "discord"
+ ],
+ "title": "discord"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "disqus"
+ ],
+ "title": "disqus"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "dropbox"
+ ],
+ "title": "dropbox"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "etsy"
+ ],
+ "title": "etsy"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "facebook"
+ ],
+ "title": "facebook"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "figma"
+ ],
+ "title": "figma"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "fusionauth"
+ ],
+ "title": "fusionauth"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "github"
+ ],
+ "title": "github"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "gitlab"
+ ],
+ "title": "gitlab"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "google"
+ ],
+ "title": "google"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "huggingface"
+ ],
+ "title": "huggingface"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "kakao"
+ ],
+ "title": "kakao"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "keycloak"
+ ],
+ "title": "keycloak"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "kick"
+ ],
+ "title": "kick"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "linkedin"
+ ],
+ "title": "linkedin"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "microsoft"
+ ],
+ "title": "microsoft"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "notion"
+ ],
+ "title": "notion"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "oidc"
+ ],
+ "title": "oidc"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "okta"
+ ],
+ "title": "okta"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "paypal"
+ ],
+ "title": "paypal"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "paypalSandbox"
+ ],
+ "title": "paypalSandbox"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "podio"
+ ],
+ "title": "podio"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "resend"
+ ],
+ "title": "resend"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "salesforce"
+ ],
+ "title": "salesforce"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "slack"
+ ],
+ "title": "slack"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "spotify"
+ ],
+ "title": "spotify"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "stripe"
+ ],
+ "title": "stripe"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "tiktok"
+ ],
+ "title": "tiktok"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "tradeshift"
+ ],
+ "title": "tradeshift"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "tradeshiftBox"
+ ],
+ "title": "tradeshiftBox"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "twitch"
+ ],
+ "title": "twitch"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "webflow"
+ ],
+ "title": "webflow"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "wordpress"
+ ],
+ "title": "wordpress"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "x"
+ ],
+ "title": "x"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "yahoo"
+ ],
+ "title": "yahoo"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "yammer"
+ ],
+ "title": "yammer"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "yandex"
+ ],
+ "title": "yandex"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "zoho"
+ ],
+ "title": "zoho"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "zoom"
+ ],
+ "title": "zoom"
+ }
+ ]
+ },
+ "in": "path"
+ },
+ {
+ "name": "success",
+ "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "format": "url",
+ "example": "https:\/\/example.com",
+ "default": ""
+ },
+ "in": "query"
+ },
+ {
+ "name": "failure",
+ "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "format": "url",
+ "example": "https:\/\/example.com",
+ "default": ""
+ },
+ "in": "query"
+ },
+ {
+ "name": "scopes",
+ "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "state",
+ "description": "An opaque value your app generates and keeps, for example in a cookie. It is returned unchanged as the `state` query parameter on the success and failure URLs, so your app can check that the sign-in it receives is one it started. Printable ASCII only (RFC 6749 Appendix A.5). Max length: 256 chars.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "example": "",
+ "default": ""
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/account\/sessions\/phone": {
+ "put": {
+ "summary": "Update phone session",
+ "operationId": "accountUpdatePhoneSession",
+ "tags": [
+ "account"
+ ],
+ "description": "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.",
+ "responses": {
+ "201": {
+ "description": "Session",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/session"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": true,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/update-phone-session.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "ip:{ip},userId:{param-userId}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "deprecated": {
+ "since": "1.6.0",
+ "replaceWith": "account.createSession"
+ },
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "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.",
+ "type": "string",
+ "example": ""
+ },
+ "secret": {
+ "description": "Valid verification token.",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "userId",
+ "secret"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/sessions\/token": {
+ "post": {
+ "summary": "Create session",
+ "operationId": "accountCreateSession",
+ "tags": [
+ "account"
+ ],
+ "description": "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.",
+ "responses": {
+ "201": {
+ "description": "Session",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/session"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/create-session.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "ip:{ip},userId:{param-userId}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "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.",
+ "type": "string",
+ "example": ""
+ },
+ "secret": {
+ "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "userId",
+ "secret"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/sessions\/{sessionId}": {
+ "get": {
+ "summary": "Get session",
+ "operationId": "accountGetSession",
+ "tags": [
+ "account"
+ ],
+ "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.",
+ "responses": {
+ "200": {
+ "description": "Session",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/session"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/get-session.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "sessionId",
+ "description": "Session ID. Use the string 'current' to get the current device session.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "",
+ "default": "current"
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "patch": {
+ "summary": "Update session",
+ "operationId": "accountUpdateSession",
+ "tags": [
+ "account"
+ ],
+ "description": "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.",
+ "responses": {
+ "200": {
+ "description": "Session",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/session"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/update-session.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "sessionId",
+ "description": "Session ID. Use the string 'current' to update the current device session.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "",
+ "default": "current"
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "delete": {
+ "summary": "Delete session",
+ "operationId": "accountDeleteSession",
+ "tags": [
+ "account"
+ ],
+ "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "sessions",
+ "demo": "account\/delete-session.md",
+ "rate-limit": 100,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "sessionId",
+ "description": "Session ID. Use the string 'current' to delete the current device session.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "",
+ "default": "current"
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/status": {
+ "patch": {
+ "summary": "Update status",
+ "operationId": "accountUpdateStatus",
+ "tags": [
+ "account"
+ ],
+ "description": "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.",
+ "responses": {
+ "200": {
+ "description": "User",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/user"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "account",
+ "demo": "account\/update-status.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ]
+ }
+ },
+ "\/account\/targets\/push": {
+ "post": {
+ "summary": "Create push target",
+ "operationId": "accountCreatePushTarget",
+ "tags": [
+ "account"
+ ],
+ "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. A session holds one push target per provider, so if one already exists this endpoint updates and returns that target instead of creating a second one, and a device that rotates its token is never notified twice.",
+ "responses": {
+ "201": {
+ "description": "Target",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/target"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "pushTargets",
+ "demo": "account\/create-push-target.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "targets.write",
+ "platforms": [
+ "console",
+ "client"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "targetId": {
+ "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.",
+ "type": "string",
+ "example": ""
+ },
+ "identifier": {
+ "description": "The target identifier (token, email, phone etc.)",
+ "type": "string",
+ "example": ""
+ },
+ "providerId": {
+ "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ }
+ },
+ "required": [
+ "targetId",
+ "identifier"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/targets\/{targetId}\/push": {
+ "put": {
+ "summary": "Update push target",
+ "operationId": "accountUpdatePushTarget",
+ "tags": [
+ "account"
+ ],
+ "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.",
+ "responses": {
+ "200": {
+ "description": "Target",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/target"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "pushTargets",
+ "demo": "account\/update-push-target.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "targets.write",
+ "platforms": [
+ "console",
+ "client"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "targetId",
+ "description": "Target ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "description": "The target identifier (token, email, phone etc.)",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "identifier"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete push target",
+ "operationId": "accountDeletePushTarget",
+ "tags": [
+ "account"
+ ],
+ "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "pushTargets",
+ "demo": "account\/delete-push-target.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "targets.write",
+ "platforms": [
+ "console",
+ "client"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "targetId",
+ "description": "Target ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/account\/tokens\/email": {
+ "post": {
+ "summary": "Create email token (OTP)",
+ "operationId": "accountCreateEmailToken",
+ "tags": [
+ "account"
+ ],
+ "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n",
+ "responses": {
+ "201": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "tokens",
+ "demo": "account\/create-email-token.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": [
+ "url:{url},email:{param-email}",
+ "url:{url},ip:{ip}"
+ ],
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.",
+ "type": "string",
+ "example": ""
+ },
+ "email": {
+ "description": "User email.",
+ "type": "string",
+ "example": "email@example.com",
+ "format": "email"
+ },
+ "phrase": {
+ "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.",
+ "type": "boolean",
+ "default": false,
+ "example": false
+ }
+ },
+ "required": [
+ "userId",
+ "email"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/tokens\/magic-url": {
+ "post": {
+ "summary": "Create magic URL token",
+ "operationId": "accountCreateMagicURLToken",
+ "tags": [
+ "account"
+ ],
+ "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n",
+ "responses": {
+ "201": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "tokens",
+ "demo": "account\/create-magic-url-token.md",
+ "rate-limit": 60,
+ "rate-time": 3600,
+ "rate-key": [
+ "url:{url},email:{param-email}",
+ "url:{url},ip:{ip}"
+ ],
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.",
+ "type": "string",
+ "example": ""
+ },
+ "email": {
+ "description": "User email.",
+ "type": "string",
+ "example": "email@example.com",
+ "format": "email"
+ },
+ "url": {
+ "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.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "phrase": {
+ "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.",
+ "type": "boolean",
+ "default": false,
+ "example": false
+ }
+ },
+ "required": [
+ "userId",
+ "email"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/tokens\/oauth2\/{provider}": {
+ "get": {
+ "summary": "Create OAuth2 token",
+ "operationId": "accountCreateOAuth2Token",
+ "tags": [
+ "account"
+ ],
+ "description": "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. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nIf there is already an active session, the OAuth2 identity is attached to the logged-in account and that session stays active until the token is exchanged for a new one.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).",
+ "responses": {
+ "301": {
+ "description": "No content",
+ "content": {
+ "text\/html": {
+ "schema": {
+ "type": "string",
+ "format": "binary"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "tokens",
+ "demo": "account\/create-o-auth-2-token.md",
+ "rate-limit": 50,
+ "rate-time": 3600,
+ "rate-key": "ip:{ip}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "provider",
+ "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, webflow, wordpress, x, yahoo, yammer, yandex, zoho, zoom.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "amazon",
+ "title": "OAuthProvider",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "amazon"
+ ],
+ "title": "amazon"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "apple"
+ ],
+ "title": "apple"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "appwrite"
+ ],
+ "title": "appwrite"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "auth0"
+ ],
+ "title": "auth0"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "authentik"
+ ],
+ "title": "authentik"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "autodesk"
+ ],
+ "title": "autodesk"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "bitbucket"
+ ],
+ "title": "bitbucket"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "bitly"
+ ],
+ "title": "bitly"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "box"
+ ],
+ "title": "box"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "cloudflare"
+ ],
+ "title": "cloudflare"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "dailymotion"
+ ],
+ "title": "dailymotion"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "discord"
+ ],
+ "title": "discord"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "disqus"
+ ],
+ "title": "disqus"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "dropbox"
+ ],
+ "title": "dropbox"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "etsy"
+ ],
+ "title": "etsy"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "facebook"
+ ],
+ "title": "facebook"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "figma"
+ ],
+ "title": "figma"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "fusionauth"
+ ],
+ "title": "fusionauth"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "github"
+ ],
+ "title": "github"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "gitlab"
+ ],
+ "title": "gitlab"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "google"
+ ],
+ "title": "google"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "huggingface"
+ ],
+ "title": "huggingface"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "kakao"
+ ],
+ "title": "kakao"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "keycloak"
+ ],
+ "title": "keycloak"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "kick"
+ ],
+ "title": "kick"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "linkedin"
+ ],
+ "title": "linkedin"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "microsoft"
+ ],
+ "title": "microsoft"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "notion"
+ ],
+ "title": "notion"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "oidc"
+ ],
+ "title": "oidc"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "okta"
+ ],
+ "title": "okta"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "paypal"
+ ],
+ "title": "paypal"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "paypalSandbox"
+ ],
+ "title": "paypalSandbox"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "podio"
+ ],
+ "title": "podio"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "resend"
+ ],
+ "title": "resend"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "salesforce"
+ ],
+ "title": "salesforce"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "slack"
+ ],
+ "title": "slack"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "spotify"
+ ],
+ "title": "spotify"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "stripe"
+ ],
+ "title": "stripe"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "tiktok"
+ ],
+ "title": "tiktok"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "tradeshift"
+ ],
+ "title": "tradeshift"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "tradeshiftBox"
+ ],
+ "title": "tradeshiftBox"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "twitch"
+ ],
+ "title": "twitch"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "webflow"
+ ],
+ "title": "webflow"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "wordpress"
+ ],
+ "title": "wordpress"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "x"
+ ],
+ "title": "x"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "yahoo"
+ ],
+ "title": "yahoo"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "yammer"
+ ],
+ "title": "yammer"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "yandex"
+ ],
+ "title": "yandex"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "zoho"
+ ],
+ "title": "zoho"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "zoom"
+ ],
+ "title": "zoom"
+ }
+ ]
+ },
+ "in": "path"
+ },
+ {
+ "name": "success",
+ "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "format": "url",
+ "example": "https:\/\/example.com",
+ "default": ""
+ },
+ "in": "query"
+ },
+ {
+ "name": "failure",
+ "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "format": "url",
+ "example": "https:\/\/example.com",
+ "default": ""
+ },
+ "in": "query"
+ },
+ {
+ "name": "scopes",
+ "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "state",
+ "description": "An opaque value your app generates and keeps, for example in a cookie. It is returned unchanged as the `state` query parameter on the success and failure URLs, so your app can check that the sign-in it receives is one it started. Printable ASCII only (RFC 6749 Appendix A.5). Max length: 256 chars.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "example": "",
+ "default": ""
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/account\/tokens\/passkey": {
+ "post": {
+ "summary": "Create passkey token",
+ "operationId": "accountCreatePasskeyToken",
+ "tags": [
+ "account"
+ ],
+ "description": "Start signing in with a passkey. No email or user ID is needed: pass the returned `publicKey` options to `navigator.credentials.get()` and the user picks one of their passkeys. Then call [Update passkey token](\/docs\/references\/cloud\/client-web\/account#updatePasskeyToken) with the credential to receive a token, and exchange it with [Create session](\/docs\/references\/cloud\/client-web\/account#createSession). The challenge expires after 5 minutes.",
+ "responses": {
+ "201": {
+ "description": "Passkey Challenge",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/passkeyChallenge"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "tokens",
+ "demo": "account\/create-passkey-token.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ]
+ },
+ "put": {
+ "summary": "Update passkey token",
+ "operationId": "accountUpdatePasskeyToken",
+ "tags": [
+ "account"
+ ],
+ "description": "Complete a passkey sign-in started with [Create passkey token](\/docs\/references\/cloud\/client-web\/account#createPasskeyToken). Pass the challenge ID and the JSON form of the credential returned by `navigator.credentials.get()`, for example `credential.toJSON()`. The returned token includes its secret and expires after 1 minute: exchange it for a session with [Create session](\/docs\/references\/cloud\/client-web\/account#createSession). Passkeys require user verification, so the session also satisfies MFA. Each challenge can only be used once.",
+ "responses": {
+ "201": {
+ "description": "Token Secret",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/tokenSecret"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "tokens",
+ "demo": "account\/update-passkey-token.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "challengeId": {
+ "description": "Challenge ID returned by createPasskeyToken.",
+ "type": "string",
+ "example": ""
+ },
+ "credential": {
+ "description": "Authentication credential returned by the authenticator, in the JSON form produced by `PublicKeyCredential.toJSON()`.",
+ "type": "object",
+ "default": {},
+ "example": {}
+ }
+ },
+ "required": [
+ "challengeId",
+ "credential"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/tokens\/phone": {
+ "post": {
+ "summary": "Create phone token",
+ "operationId": "accountCreatePhoneToken",
+ "tags": [
+ "account"
+ ],
+ "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).",
+ "responses": {
+ "201": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "tokens",
+ "demo": "account\/create-phone-token.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": [
+ "url:{url},phone:{param-phone}",
+ "url:{url},ip:{ip}"
+ ],
+ "scope": "sessions.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.",
+ "type": "string",
+ "example": ""
+ },
+ "phone": {
+ "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.",
+ "type": "string",
+ "example": "+12065550100",
+ "format": "phone"
+ }
+ },
+ "required": [
+ "userId",
+ "phone"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/verifications\/email": {
+ "post": {
+ "summary": "Create email verification",
+ "operationId": "accountCreateEmailVerification",
+ "tags": [
+ "account"
+ ],
+ "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n",
+ "responses": {
+ "201": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "verification",
+ "demo": "account\/create-email-verification.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},userId:{userId}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "methods": [
+ {
+ "name": "createEmailVerification",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "url"
+ ],
+ "required": [
+ "url"
+ ],
+ "responses": [
+ {
+ "code": 201,
+ "model": "#\/components\/schemas\/token"
+ }
+ ],
+ "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n",
+ "demo": "account\/create-email-verification.md",
+ "public": true
+ },
+ {
+ "name": "createVerification",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "url"
+ ],
+ "required": [
+ "url"
+ ],
+ "responses": [
+ {
+ "code": 201,
+ "model": "#\/components\/schemas\/token"
+ }
+ ],
+ "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n",
+ "demo": "account\/create-verification.md",
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.createEmailVerification"
+ }
+ }
+ ],
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "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.",
+ "type": "string",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ }
+ },
+ "required": [
+ "url"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "put": {
+ "summary": "Update email verification (confirmation)",
+ "operationId": "accountUpdateEmailVerification",
+ "tags": [
+ "account"
+ ],
+ "description": "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.",
+ "responses": {
+ "200": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "verification",
+ "demo": "account\/update-email-verification.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},userId:{param-userId}",
+ "scope": "public",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "methods": [
+ {
+ "name": "updateEmailVerification",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "userId",
+ "secret"
+ ],
+ "required": [
+ "userId",
+ "secret"
+ ],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/token"
+ }
+ ],
+ "description": "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.",
+ "demo": "account\/update-email-verification.md",
+ "public": true
+ },
+ {
+ "name": "updateVerification",
+ "namespace": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "summary": "",
+ "auth": {
+ "Project": []
+ },
+ "parameters": [
+ "userId",
+ "secret"
+ ],
+ "required": [
+ "userId",
+ "secret"
+ ],
+ "responses": [
+ {
+ "code": 200,
+ "model": "#\/components\/schemas\/token"
+ }
+ ],
+ "description": "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.",
+ "demo": "account\/update-verification.md",
+ "public": false,
+ "deprecated": {
+ "since": "1.8.0",
+ "replaceWith": "account.updateEmailVerification"
+ }
+ }
+ ],
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "description": "User ID.",
+ "type": "string",
+ "example": ""
+ },
+ "secret": {
+ "description": "Valid verification token.",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "userId",
+ "secret"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/verifications\/email\/otp": {
+ "post": {
+ "summary": "Create email verification (OTP)",
+ "operationId": "accountCreateEmailVerificationOTP",
+ "tags": [
+ "account"
+ ],
+ "description": "Use this endpoint to send a 6-digit verification code to the currently logged in user's email address. Unlike [createEmailVerification](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailVerification), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a verification page. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmailVerificationOTP). The code sent to the user's email address is valid for 15 minutes.\n\nEnable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing.\n",
+ "responses": {
+ "201": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "verification",
+ "demo": "account\/create-email-verification-otp.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},userId:{userId}",
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "phrase": {
+ "description": "Toggle for security phrase. If enabled, email will be sent 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.",
+ "type": "boolean",
+ "default": false,
+ "example": false
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "put": {
+ "summary": "Update email verification (OTP)",
+ "operationId": "accountUpdateEmailVerificationOTP",
+ "tags": [
+ "account"
+ ],
+ "description": "Use this endpoint to complete the user email verification process using the 6-digit code that was emailed by [createEmailVerificationOTP](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailVerificationOTP). Pass the **userId** of the user being verified along with the **secret** code from the email. If confirmed, this route will return a 200 status code and the code is consumed.\n",
+ "responses": {
+ "200": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "verification",
+ "demo": "account\/update-email-verification-otp.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},userId:{param-userId}",
+ "scope": "public",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "description": "User ID.",
+ "type": "string",
+ "example": ""
+ },
+ "secret": {
+ "description": "Valid verification OTP code.",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "userId",
+ "secret"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/account\/verifications\/phone": {
+ "post": {
+ "summary": "Create phone verification",
+ "operationId": "accountCreatePhoneVerification",
+ "tags": [
+ "account"
+ ],
+ "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.",
+ "responses": {
+ "201": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "verification",
+ "demo": "account\/create-phone-verification.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": [
+ "url:{url},userId:{userId}",
+ "url:{url},ip:{ip}"
+ ],
+ "scope": "account",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ]
+ },
+ "put": {
+ "summary": "Update phone verification (confirmation)",
+ "operationId": "accountUpdatePhoneVerification",
+ "tags": [
+ "account"
+ ],
+ "description": "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.",
+ "responses": {
+ "200": {
+ "description": "Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "verification",
+ "demo": "account\/update-phone-verification.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "userId:{param-userId}",
+ "scope": "public",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "description": "User ID.",
+ "type": "string",
+ "example": ""
+ },
+ "secret": {
+ "description": "Valid verification token.",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "userId",
+ "secret"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/activities\/events": {
+ "get": {
+ "summary": "List events",
+ "operationId": "activitiesListEvents",
+ "tags": [
+ "activities"
+ ],
+ "description": "List all events for selected filters.",
+ "responses": {
+ "200": {
+ "description": "Activity event list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/activityEventList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": null,
+ "demo": "activities\/list-events.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "events.read",
+ "platforms": [
+ "console",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Key": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as userId, teamId, etc.",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/activities\/events\/{eventId}": {
+ "get": {
+ "summary": "Get event",
+ "operationId": "activitiesGetEvent",
+ "tags": [
+ "activities"
+ ],
+ "description": "Get event by ID.\n",
+ "responses": {
+ "200": {
+ "description": "ActivityEvent",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/activityEvent"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "events",
+ "demo": "activities\/get-event.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "events.read",
+ "platforms": [
+ "console",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Key": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "eventId",
+ "description": "Event ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/admin\/cache\/platform": {
+ "delete": {
+ "summary": "Delete platform cache",
+ "operationId": "adminDeletePlatformCache",
+ "tags": [
+ "admin"
+ ],
+ "description": "Delete everything cached from the platform database in the region serving the request.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "cache",
+ "demo": "admin\/delete-platform-cache.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "console",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ]
+ }
+ },
+ "\/admin\/cache\/platform\/resources": {
+ "delete": {
+ "summary": "Delete platform resource cache",
+ "operationId": "adminDeletePlatformResourceCache",
+ "tags": [
+ "admin"
+ ],
+ "description": "Delete the cache of one platform resource, or of every resource of a type, in the region serving the request.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "cache",
+ "demo": "admin\/delete-platform-resource-cache.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "console",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "resourceType",
+ "description": "Resource type.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "projects",
+ "title": "PlatformResourceType",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "projects"
+ ],
+ "title": "projects"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "organizations"
+ ],
+ "title": "organizations"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "users"
+ ],
+ "title": "users"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "memberships"
+ ],
+ "title": "memberships"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "rules"
+ ],
+ "title": "rules"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "keys"
+ ],
+ "title": "keys"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "platforms"
+ ],
+ "title": "platforms"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "webhooks"
+ ],
+ "title": "webhooks"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "certificates"
+ ],
+ "title": "certificates"
+ }
+ ]
+ },
+ "in": "query"
+ },
+ {
+ "name": "resourceId",
+ "description": "Resource ID. Leave empty to delete the cache of every resource of this type.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "example": "",
+ "default": ""
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/admin\/cache\/project": {
+ "delete": {
+ "summary": "Delete project cache",
+ "operationId": "adminDeleteProjectCache",
+ "tags": [
+ "admin"
+ ],
+ "description": "Delete everything cached for a project. Send the request to the project's region.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "cache",
+ "demo": "admin\/delete-project-cache.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "console",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "projectId",
+ "description": "Project ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/admin\/cache\/project\/resources": {
+ "delete": {
+ "summary": "Delete project resource cache",
+ "operationId": "adminDeleteProjectResourceCache",
+ "tags": [
+ "admin"
+ ],
+ "description": "Delete the cache of one project resource, or of every resource of a type. Send the request to the project's region.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "cache",
+ "demo": "admin\/delete-project-resource-cache.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "console",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "projectId",
+ "description": "Project ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "query"
+ },
+ {
+ "name": "resourceType",
+ "description": "Resource type.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "users",
+ "title": "ProjectResourceType",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "users"
+ ],
+ "title": "users"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "teams"
+ ],
+ "title": "teams"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "memberships"
+ ],
+ "title": "memberships"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "databases"
+ ],
+ "title": "databases"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "buckets"
+ ],
+ "title": "buckets"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "functions"
+ ],
+ "title": "functions"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "sites"
+ ],
+ "title": "sites"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "deployments"
+ ],
+ "title": "deployments"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "topics"
+ ],
+ "title": "topics"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "providers"
+ ],
+ "title": "providers"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "messages"
+ ],
+ "title": "messages"
+ }
+ ]
+ },
+ "in": "query"
+ },
+ {
+ "name": "resourceId",
+ "description": "Resource ID. Leave empty to delete the cache of every resource of this type.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "example": "",
+ "default": ""
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/admin\/threats": {
+ "get": {
+ "summary": "List threats",
+ "operationId": "adminListThreats",
+ "tags": [
+ "admin"
+ ],
+ "description": "List threats recorded across the platform. Use queries to narrow the list to a project, a resource type, a threat type or a triage status.",
+ "responses": {
+ "200": {
+ "description": "Threats list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/threatList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "threats",
+ "demo": "admin\/list-threats.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "console",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: projectId, teamId, region, resourceType, resourceId, type, status",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "total",
+ "description": "When set to false, the total count returned will be 0 and will not be calculated.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "example": false,
+ "default": true
+ },
+ "in": "query"
+ }
+ ]
+ },
+ "post": {
+ "summary": "Create threat",
+ "operationId": "adminCreateThreat",
+ "tags": [
+ "admin"
+ ],
+ "description": "Record a threat an operator found on a project resource. The record is of type `manual`; the other types are written by the threats worker's detectors.",
+ "responses": {
+ "201": {
+ "description": "Threat",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/threat"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "threats",
+ "demo": "admin\/create-threat.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "console",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "projectId": {
+ "description": "Project ID.",
+ "type": "string",
+ "example": ""
+ },
+ "resourceType": {
+ "description": "Type of the flagged resource.",
+ "type": "string",
+ "example": "projects",
+ "title": "ThreatResourceType",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "projects"
+ ],
+ "title": "projects"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "functions"
+ ],
+ "title": "functions"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "sites"
+ ],
+ "title": "sites"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "deployments"
+ ],
+ "title": "deployments"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "databases"
+ ],
+ "title": "databases"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "buckets"
+ ],
+ "title": "buckets"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "files"
+ ],
+ "title": "files"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "users"
+ ],
+ "title": "users"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "mails"
+ ],
+ "title": "mails"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "platforms"
+ ],
+ "title": "platforms"
+ }
+ ]
+ },
+ "resourceId": {
+ "description": "ID of the flagged resource.",
+ "type": "string",
+ "example": ""
+ },
+ "description": {
+ "description": "What was found, in the operator's words.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "status": {
+ "description": "Triage status to record the threat with. `open` by default; `resolved` or `dismissed` for a threat already dealt with.",
+ "type": "string",
+ "default": "open",
+ "example": "open",
+ "title": "ThreatStatus",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "open"
+ ],
+ "title": "open"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "resolved"
+ ],
+ "title": "resolved"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "dismissed"
+ ],
+ "title": "dismissed"
+ }
+ ]
+ }
+ },
+ "required": [
+ "projectId",
+ "resourceType",
+ "resourceId"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/admin\/threats\/{threatId}": {
+ "get": {
+ "summary": "Get threat",
+ "operationId": "adminGetThreat",
+ "tags": [
+ "admin"
+ ],
+ "description": "Get a threat by its unique ID, including the detection details.",
+ "responses": {
+ "200": {
+ "description": "Threat",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/threat"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "threats",
+ "demo": "admin\/get-threat.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "console",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "threatId",
+ "description": "Threat ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "delete": {
+ "summary": "Delete threat",
+ "operationId": "adminDeleteThreat",
+ "tags": [
+ "admin"
+ ],
+ "description": "Delete a threat record.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "threats",
+ "demo": "admin\/delete-threat.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "console",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "threatId",
+ "description": "Threat ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/admin\/threats\/{threatId}\/status": {
+ "patch": {
+ "summary": "Update threat status",
+ "operationId": "adminUpdateThreatStatus",
+ "tags": [
+ "admin"
+ ],
+ "description": "Triage a threat: mark it resolved once the resource was dealt with, dismissed for a false positive, or open to revisit it.",
+ "responses": {
+ "200": {
+ "description": "Threat",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/threat"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "threats",
+ "demo": "admin\/update-threat-status.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "console",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "threatId",
+ "description": "Threat ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "description": "Triage status. `resolved` once the resource was dealt with, `dismissed` for a false positive, `open` to reopen.",
+ "type": "string",
+ "example": "open",
+ "title": "ThreatStatus",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "open"
+ ],
+ "title": "open"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "resolved"
+ ],
+ "title": "resolved"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "dismissed"
+ ],
+ "title": "dismissed"
+ }
+ ]
+ }
+ },
+ "required": [
+ "status"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/affiliates\/links": {
+ "get": {
+ "summary": "List affiliate links",
+ "operationId": "affiliatesListLinks",
+ "tags": [
+ "affiliates"
+ ],
+ "description": "List affiliate links for the current account.\n",
+ "responses": {
+ "200": {
+ "description": "Affiliate links list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/affiliateLinkList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "links",
+ "demo": "affiliates\/list-links.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, status",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ }
+ ]
+ },
+ "post": {
+ "summary": "Create affiliate link",
+ "operationId": "affiliatesCreateLink",
+ "tags": [
+ "affiliates"
+ ],
+ "description": "Create a shareable affiliate link for the current account. Every console user is automatically in the affiliates program.\n",
+ "responses": {
+ "201": {
+ "description": "AffiliateLink",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/affiliateLink"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "links",
+ "demo": "affiliates\/create-link.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "linkId": {
+ "description": "Link 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. This ID is the shareable referral code.",
+ "type": "string",
+ "example": ""
+ },
+ "name": {
+ "description": "Link name. Max length: 128 chars.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ }
+ },
+ "required": [
+ "linkId"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/affiliates\/links\/{linkId}": {
+ "get": {
+ "summary": "Get affiliate link",
+ "operationId": "affiliatesGetLink",
+ "tags": [
+ "affiliates"
+ ],
+ "description": "Get a single affiliate link owned by the current account.\n",
+ "responses": {
+ "200": {
+ "description": "AffiliateLink",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/affiliateLink"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "links",
+ "demo": "affiliates\/get-link.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "linkId",
+ "description": "Link ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "delete": {
+ "summary": "Delete affiliate link",
+ "operationId": "affiliatesDeleteLink",
+ "tags": [
+ "affiliates"
+ ],
+ "description": "Delete an affiliate link owned by the current account. Existing referrals and rewards keep their stored link IDs for history.\n",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "links",
+ "demo": "affiliates\/delete-link.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "linkId",
+ "description": "Link ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/affiliates\/referrals": {
+ "get": {
+ "summary": "List affiliate referrals",
+ "operationId": "affiliatesListReferrals",
+ "tags": [
+ "affiliates"
+ ],
+ "description": "List referrals attributed to the current account's affiliate links. Responses include privacy-safe metadata only (truncated user ID and signup country), never email or name. Referrals are created automatically on signup when the invite cookie is present.\n",
+ "responses": {
+ "200": {
+ "description": "Affiliate referrals list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/affiliateReferralList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "referrals",
+ "demo": "affiliates\/list-referrals.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referredUserMaskedId, referredUserCountry, status, attributedAt, expiresAt, convertedAt",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/affiliates\/rewards": {
+ "get": {
+ "summary": "List affiliate rewards",
+ "operationId": "affiliatesListRewards",
+ "tags": [
+ "affiliates"
+ ],
+ "description": "List rewards earned by the current account from affiliate link conversions.\n",
+ "responses": {
+ "200": {
+ "description": "Affiliate rewards list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/affiliateRewardList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "rewards",
+ "demo": "affiliates\/list-rewards.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referralId, amount, status, teamId, creditId",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/affiliates\/rewards\/{rewardId}": {
+ "patch": {
+ "summary": "Update affiliate reward",
+ "operationId": "affiliatesUpdateReward",
+ "tags": [
+ "affiliates"
+ ],
+ "description": "Claim a pending affiliate reward by setting its status to `claimed`. Creates organization credits for the target organization. The current user must be an owner of that organization.\n",
+ "responses": {
+ "200": {
+ "description": "AffiliateReward",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/affiliateReward"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "rewards",
+ "demo": "affiliates\/update-reward.md",
+ "rate-limit": 10,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "account",
+ "platforms": [
+ "console"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "rewardId",
+ "description": "Reward ID",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "description": "New reward status. Use `claimed` to claim the reward as organization credits.",
+ "type": "string",
+ "example": "claimed"
+ },
+ "organizationId": {
+ "description": "Organization ID to apply credits to when claiming.",
+ "type": "string",
+ "example": ""
+ }
+ },
+ "required": [
+ "status",
+ "organizationId"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/analytics\/properties": {
+ "get": {
+ "summary": "List analytics properties",
+ "operationId": "analyticsListProperties",
+ "tags": [
+ "analytics"
+ ],
+ "description": "List analytics properties for the current project.",
+ "responses": {
+ "200": {
+ "description": "Analytics properties list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/analyticsPropertyList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "properties",
+ "demo": "analytics\/list-properties.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "analytics.read",
+ "platforms": [
+ "console",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Key": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, domain, enabled",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "search",
+ "description": "Search term to filter your list results. Matches the property ID, name and domain. Max length: 256 chars.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "example": "",
+ "default": ""
+ },
+ "in": "query"
+ },
+ {
+ "name": "total",
+ "description": "When set to false, the total count returned will be 0 and will not be calculated.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "example": false,
+ "default": true
+ },
+ "in": "query"
+ }
+ ]
+ },
+ "post": {
+ "summary": "Create analytics property",
+ "operationId": "analyticsCreateProperty",
+ "tags": [
+ "analytics"
+ ],
+ "description": "Create a new analytics property to track a website or application.",
+ "responses": {
+ "201": {
+ "description": "AnalyticsProperty",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/analyticsProperty"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "properties",
+ "demo": "analytics\/create-property.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "analytics.write",
+ "platforms": [
+ "console",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Key": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "propertyId": {
+ "description": "Unique ID. Choose a custom ID or generate a random ID with `ID.unique()`. Max length is 36 chars.",
+ "type": "string",
+ "example": ""
+ },
+ "name": {
+ "description": "Human-readable name for this property.",
+ "type": "string",
+ "example": ""
+ },
+ "domain": {
+ "description": "Primary domain to track (e.g. example.com). Optional for native apps.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "enabled": {
+ "description": "Whether the property accepts events. Events sent to a disabled property are rejected as not found.",
+ "type": "boolean",
+ "default": true,
+ "example": false
+ },
+ "allowedOrigins": {
+ "description": "Allowed origins for tracking. Use [\"*\"] to allow all.",
+ "type": "array",
+ "default": [
+ "*"
+ ],
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "propertyId",
+ "name"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/analytics\/properties\/{propertyId}": {
+ "get": {
+ "summary": "Get analytics property",
+ "operationId": "analyticsGetProperty",
+ "tags": [
+ "analytics"
+ ],
+ "description": "Get an analytics property by ID.",
+ "responses": {
+ "200": {
+ "description": "AnalyticsProperty",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/analyticsProperty"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "properties",
+ "demo": "analytics\/get-property.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "analytics.read",
+ "platforms": [
+ "console",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Key": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "propertyId",
+ "description": "Analytics property unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "patch": {
+ "summary": "Update analytics property",
+ "operationId": "analyticsUpdateProperty",
+ "tags": [
+ "analytics"
+ ],
+ "description": "Update an analytics property. Only the attributes you pass are changed; omitted attributes keep their current value.",
+ "responses": {
+ "200": {
+ "description": "AnalyticsProperty",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/analyticsProperty"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "properties",
+ "demo": "analytics\/update-property.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "analytics.write",
+ "platforms": [
+ "console",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Key": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "propertyId",
+ "description": "Analytics property unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "Human-readable name for this property.",
+ "type": "string",
+ "example": "",
+ "nullable": true
+ },
+ "domain": {
+ "description": "Primary domain to track (e.g. example.com). Pass an empty string to clear it.",
+ "type": "string",
+ "example": "",
+ "nullable": true
+ },
+ "enabled": {
+ "description": "Whether the property accepts events. Events sent to a disabled property are rejected as not found.",
+ "type": "boolean",
+ "example": false,
+ "nullable": true
+ },
+ "allowedOrigins": {
+ "description": "Allowed origins for tracking. Use [\"*\"] to allow all.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete analytics property",
+ "operationId": "analyticsDeleteProperty",
+ "tags": [
+ "analytics"
+ ],
+ "description": "Delete an analytics property along with every event and session collected for it. This cannot be undone.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "properties",
+ "demo": "analytics\/delete-property.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "analytics.write",
+ "platforms": [
+ "console",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Key": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "propertyId",
+ "description": "Analytics property unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/analytics\/properties\/{propertyId}\/events": {
+ "post": {
+ "summary": "Track analytics event",
+ "operationId": "analyticsCreateEvent",
+ "tags": [
+ "analytics"
+ ],
+ "description": "Send a tracking event from a browser, native app, or server-side SDK.",
+ "responses": {
+ "202": {
+ "description": "File",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "string",
+ "format": "binary"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "events",
+ "demo": "analytics\/create-event.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": [
+ "public",
+ "global"
+ ],
+ "platforms": [
+ "client",
+ "console",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "propertyId",
+ "description": "Analytics property ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "Event name. \"pageview\" is just a conventional event name; events are not modeled specially.",
+ "type": "string",
+ "example": ""
+ },
+ "url": {
+ "description": "Full page URL or screen identifier.",
+ "type": "string",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "domain": {
+ "description": "Hostname (e.g. example.com).",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "referrer": {
+ "description": "Referrer URL.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "screenWidth": {
+ "description": "Viewport width in CSS pixels.",
+ "type": "integer",
+ "default": 0,
+ "format": "int32"
+ },
+ "sessionHash": {
+ "description": "Optional session hash (provided by SDK).",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "scrollDepth": {
+ "description": "Scroll depth percentage 0-100.",
+ "type": "integer",
+ "default": 0,
+ "example": 0,
+ "format": "int32"
+ },
+ "engagementTime": {
+ "description": "Engagement time in seconds, 0-4294967295.",
+ "type": "integer",
+ "default": 0,
+ "example": 0,
+ "format": "int32"
+ },
+ "props": {
+ "description": "Custom string properties as a flat key=value list (max 32 entries, alternating key,value).",
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "string"
+ }
+ },
+ "userId": {
+ "description": "Override user ID. Requires API-key auth with analytics.write scope.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "ip": {
+ "description": "Override IP address. Requires API-key auth with analytics.write scope.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "userAgent": {
+ "description": "Override user agent. Requires API-key auth with analytics.write scope.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ }
+ },
+ "required": [
+ "name",
+ "url"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/analytics\/properties\/{propertyId}\/metrics": {
+ "get": {
+ "summary": "List analytics metrics for a property",
+ "operationId": "analyticsListMetrics",
+ "tags": [
+ "analytics"
+ ],
+ "description": "Read analytics metrics (visitors, sessions, pageviews, events, bounceRate, \u2026) for a property over a date range.\n\n**Three response shapes**, chosen by `dimensions[]` and `interval`:\n- Neither: one row aggregating the whole window, with `value` and `date` null. Only this shape carries `pageviews`, `visits`, `bounceRate`, `visitDuration`, `viewsPerVisit`, `scrollDepth` and `engagementTime`.\n- `dimensions[]`: one row per dimension value, ranked by visitors, with `value` set and `date` null.\n- `interval`: one row per time bucket in chronological order, with `date` set and `value` null.\n\nCombining `dimensions[]` with `interval` is not supported yet. `queries[]` filters the underlying events using standard Utopia query syntax.",
+ "responses": {
+ "200": {
+ "description": "AnalyticsMetricList",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/analyticsMetricList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "metrics",
+ "demo": "analytics\/list-metrics.md",
+ "rate-limit": 0,
+ "rate-time": 3600,
+ "rate-key": "url:{url},ip:{ip}",
+ "scope": "analytics.read",
+ "platforms": [
+ "console",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Key": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "propertyId",
+ "description": "Analytics property unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ },
+ {
+ "name": "queries",
+ "description": "Up to 10 filter queries in Utopia syntax. Allowed attributes: country, region, city, browser, operatingSystem, device, screenSize, referrerSource, channel, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, page, hostname, botName, botCategory, eventName. page, eventName are only accepted alongside `interval`, or with a breakdown on a dimension other than entryPage, exitPage. Allowed methods: equal, notEqual, contains, startsWith, endsWith. Example: `queries[]=equal(\"country\", [\"US\"])`.",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "interval",
+ "description": "Time bucket size. Omit (null) for a flat aggregate over the whole window. Allowed: 1h, 1d, 1w, 1m.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "example": "1h",
+ "title": "AnalyticsInterval",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "1h"
+ ],
+ "title": "One Hour"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "1d"
+ ],
+ "title": "One Day"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "1w"
+ ],
+ "title": "One Week"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "1m"
+ ],
+ "title": "One Month"
+ }
+ ]
+ },
+ "in": "query"
+ },
+ {
+ "name": "dimensions",
+ "description": "Dimension to break the metrics down by. One at most for now; the parameter is a list so that cap can be raised without a breaking change. Allowed: country, region, city, browser, operatingSystem, device, screenSize, referrerSource, channel, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, page, hostname, entryPage, exitPage, trafficType, botName, botCategory, eventName.",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "title": "AnalyticsDimension",
+ "type": "string",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "country"
+ ],
+ "title": "country"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "region"
+ ],
+ "title": "region"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "city"
+ ],
+ "title": "city"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "browser"
+ ],
+ "title": "browser"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "operatingSystem"
+ ],
+ "title": "operatingSystem"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "device"
+ ],
+ "title": "device"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "screenSize"
+ ],
+ "title": "screenSize"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "referrerSource"
+ ],
+ "title": "referrerSource"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "channel"
+ ],
+ "title": "channel"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "utmSource"
+ ],
+ "title": "utmSource"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "utmMedium"
+ ],
+ "title": "utmMedium"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "utmCampaign"
+ ],
+ "title": "utmCampaign"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "utmContent"
+ ],
+ "title": "utmContent"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "utmTerm"
+ ],
+ "title": "utmTerm"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "page"
+ ],
+ "title": "page"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "hostname"
+ ],
+ "title": "hostname"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "entryPage"
+ ],
+ "title": "entryPage"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "exitPage"
+ ],
+ "title": "exitPage"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "trafficType"
+ ],
+ "title": "trafficType"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "botName"
+ ],
+ "title": "botName"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "botCategory"
+ ],
+ "title": "botCategory"
+ },
+ {
+ "type": "string",
+ "enum": [
+ "eventName"
+ ],
+ "title": "eventName"
+ }
+ ]
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "dateRange",
+ "description": "Date range shorthand (e.g. 7d, 30d). Ignored for any bound you supply explicitly via startAt\/endAt.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "example": "",
+ "default": "30d"
+ },
+ "in": "query"
+ },
+ {
+ "name": "startAt",
+ "description": "Explicit window start in ISO 8601. Defaults to endAt minus dateRange.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "format": "datetime",
+ "example": "2020-10-15T06:38:00.000+00:00",
+ "default": ""
+ },
+ "in": "query"
+ },
+ {
+ "name": "endAt",
+ "description": "Explicit window end in ISO 8601. Defaults to the current time.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "format": "datetime",
+ "example": "2020-10-15T06:38:00.000+00:00",
+ "default": ""
+ },
+ "in": "query"
+ },
+ {
+ "name": "limit",
+ "description": "Maximum number of ranked values to return.",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "format": "int32",
+ "example": 1,
+ "default": 100
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/apps": {
+ "get": {
+ "summary": "List Applications",
+ "operationId": "appsList",
+ "tags": [
+ "apps"
+ ],
+ "description": "List applications.",
+ "responses": {
+ "200": {
+ "description": "Apps list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/appsList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "apps",
+ "demo": "apps\/list.md",
+ "rate-limit": 120,
+ "rate-time": 60,
+ "rate-key": "ip:{ip},userId:{userId}",
+ "scope": "apps.read",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "total",
+ "description": "When set to false, the total count returned will be 0 and will not be calculated.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "example": false,
+ "default": true
+ },
+ "in": "query"
+ }
+ ]
+ },
+ "post": {
+ "summary": "Create Application",
+ "operationId": "appsCreate",
+ "tags": [
+ "apps"
+ ],
+ "description": "Create a new application.",
+ "responses": {
+ "201": {
+ "description": "App",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/app"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "apps",
+ "demo": "apps\/create.md",
+ "rate-limit": 10,
+ "rate-time": 60,
+ "rate-key": "ip:{ip},userId:{userId}",
+ "scope": "apps.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appId": {
+ "description": "Application 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.",
+ "type": "string",
+ "example": ""
+ },
+ "name": {
+ "description": "Application name.",
+ "type": "string",
+ "example": ""
+ },
+ "description": {
+ "description": "Application description shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "clientUri": {
+ "description": "Application homepage URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "logoUri": {
+ "description": "Application logo URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "privacyPolicyUrl": {
+ "description": "Application privacy policy URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "termsUrl": {
+ "description": "Application terms of service URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "contacts": {
+ "description": "Application support or security contact emails. Maximum of 100 contacts are allowed.",
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "string"
+ }
+ },
+ "tagline": {
+ "description": "Application tagline shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "tags": {
+ "description": "Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long.",
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "string"
+ }
+ },
+ "images": {
+ "description": "Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.",
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "string"
+ }
+ },
+ "supportUrl": {
+ "description": "Application support URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "dataDeletionUrl": {
+ "description": "Application data deletion URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "redirectUris": {
+ "description": "Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:\/oauth), and must not contain a fragment.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "postLogoutRedirectUris": {
+ "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.",
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "string"
+ }
+ },
+ "enabled": {
+ "description": "Is application enabled?",
+ "type": "boolean",
+ "default": true,
+ "example": false
+ },
+ "type": {
+ "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.",
+ "type": "string",
+ "default": "confidential",
+ "example": "public"
+ },
+ "deviceFlow": {
+ "description": "Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.",
+ "type": "boolean",
+ "default": false,
+ "example": false
+ },
+ "teamId": {
+ "description": "Team unique ID.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ }
+ },
+ "required": [
+ "appId",
+ "name",
+ "redirectUris"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "\/apps\/scopes\/installations": {
+ "get": {
+ "summary": "List Installation Scopes",
+ "operationId": "appsListInstallationScopes",
+ "tags": [
+ "apps"
+ ],
+ "description": "List scopes an application can request when installed on a team.",
+ "responses": {
+ "200": {
+ "description": "App scopes list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/appScopeList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "scopes",
+ "demo": "apps\/list-installation-scopes.md",
+ "rate-limit": 120,
+ "rate-time": 60,
+ "rate-key": "ip:{ip},userId:{userId}",
+ "scope": "apps.read",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ]
+ }
+ },
+ "\/apps\/scopes\/oauth2": {
+ "get": {
+ "summary": "List OAuth2 Scopes",
+ "operationId": "appsListOAuth2Scopes",
+ "tags": [
+ "apps"
+ ],
+ "description": "List scopes an application can request during the OAuth2 flow.",
+ "responses": {
+ "200": {
+ "description": "App scopes list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/appScopeList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "scopes",
+ "demo": "apps\/list-o-auth-2-scopes.md",
+ "rate-limit": 120,
+ "rate-time": 60,
+ "rate-key": "ip:{ip},userId:{userId}",
+ "scope": "apps.read",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ]
+ }
+ },
+ "\/apps\/{appId}": {
+ "get": {
+ "summary": "Get Application",
+ "operationId": "appsGet",
+ "tags": [
+ "apps"
+ ],
+ "description": "Get an application by its unique ID.",
+ "responses": {
+ "200": {
+ "description": "App",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/app"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "apps",
+ "demo": "apps\/get.md",
+ "rate-limit": 120,
+ "rate-time": 60,
+ "rate-key": "ip:{ip},userId:{userId}",
+ "scope": "apps.read",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "appId",
+ "description": "Application unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "put": {
+ "summary": "Update Application",
+ "operationId": "appsUpdate",
+ "tags": [
+ "apps"
+ ],
+ "description": "Update an application by its unique ID.",
+ "responses": {
+ "200": {
+ "description": "App",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/app"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "apps",
+ "demo": "apps\/update.md",
+ "rate-limit": 60,
+ "rate-time": 60,
+ "rate-key": "ip:{ip},userId:{userId}",
+ "scope": "apps.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "appId",
+ "description": "Application unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "Application name.",
+ "type": "string",
+ "example": ""
+ },
+ "description": {
+ "description": "Application description shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "clientUri": {
+ "description": "Application homepage URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "logoUri": {
+ "description": "Application logo URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "privacyPolicyUrl": {
+ "description": "Application privacy policy URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "termsUrl": {
+ "description": "Application terms of service URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "contacts": {
+ "description": "Application support or security contact emails. Maximum of 100 contacts are allowed.",
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "string"
+ }
+ },
+ "tagline": {
+ "description": "Application tagline shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": ""
+ },
+ "tags": {
+ "description": "Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long.",
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "string"
+ }
+ },
+ "images": {
+ "description": "Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.",
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "string"
+ }
+ },
+ "supportUrl": {
+ "description": "Application support URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "dataDeletionUrl": {
+ "description": "Application data deletion URL shown to users during OAuth2 consent.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ },
+ "enabled": {
+ "description": "Is application enabled?",
+ "type": "boolean",
+ "default": true,
+ "example": false
+ },
+ "redirectUris": {
+ "description": "Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:\/oauth), and must not contain a fragment.",
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "string"
+ }
+ },
+ "postLogoutRedirectUris": {
+ "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.",
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "string"
+ }
+ },
+ "type": {
+ "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.",
+ "type": "string",
+ "default": "confidential",
+ "example": "public"
+ },
+ "deviceFlow": {
+ "description": "Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.",
+ "type": "boolean",
+ "default": false,
+ "example": false
+ },
+ "installationScopes": {
+ "description": "Scopes the application requests when installed on a team. Only scopes allowed by the project's OAuth2 server installation scopes configuration are accepted; use the list installation scopes endpoint to discover available values. Maximum of 100 scopes are allowed.",
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "string"
+ }
+ },
+ "installationRedirectUrl": {
+ "description": "URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect.",
+ "type": "string",
+ "default": "",
+ "example": "https:\/\/example.com",
+ "format": "url"
+ }
+ },
+ "required": [
+ "name"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete Application",
+ "operationId": "appsDelete",
+ "tags": [
+ "apps"
+ ],
+ "description": "Delete an application by its unique ID.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "apps",
+ "demo": "apps\/delete.md",
+ "rate-limit": 60,
+ "rate-time": 60,
+ "rate-key": "ip:{ip},userId:{userId}",
+ "scope": "apps.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "appId",
+ "description": "Application unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/apps\/{appId}\/installations": {
+ "get": {
+ "summary": "List Installations",
+ "operationId": "appsListInstallations",
+ "tags": [
+ "apps"
+ ],
+ "description": "List installations of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.",
+ "responses": {
+ "200": {
+ "description": "App installations list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/appInstallationList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "installations",
+ "demo": "apps\/list-installations.md",
+ "rate-limit": 120,
+ "rate-time": 60,
+ "rate-key": "ip:{ip}",
+ "scope": [
+ "apps.read",
+ "apps.installations.read"
+ ],
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "appId",
+ "description": "Application unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ },
+ {
+ "name": "queries",
+ "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "in": "query"
+ },
+ {
+ "name": "total",
+ "description": "When set to false, the total count returned will be 0 and will not be calculated.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "example": false,
+ "default": true
+ },
+ "in": "query"
+ }
+ ]
+ }
+ },
+ "\/apps\/{appId}\/installations\/{installationId}": {
+ "get": {
+ "summary": "Get Installation",
+ "operationId": "appsGetInstallation",
+ "tags": [
+ "apps"
+ ],
+ "description": "Get an installation of an application by its unique ID. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.",
+ "responses": {
+ "200": {
+ "description": "AppInstallation",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/appInstallation"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "installations",
+ "demo": "apps\/get-installation.md",
+ "rate-limit": 120,
+ "rate-time": 60,
+ "rate-key": "ip:{ip}",
+ "scope": [
+ "apps.read",
+ "apps.installations.read"
+ ],
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "appId",
+ "description": "Application unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ },
+ {
+ "name": "installationId",
+ "description": "Installation unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ },
+ "delete": {
+ "summary": "Delete Installation",
+ "operationId": "appsDeleteInstallation",
+ "tags": [
+ "apps"
+ ],
+ "description": "Delete an installation of an application by its unique ID. Requires a caller with update access to the app. Previously issued installation access tokens are revoked.",
+ "responses": {
+ "204": {
+ "description": "No content"
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "installations",
+ "demo": "apps\/delete-installation.md",
+ "rate-limit": 60,
+ "rate-time": 60,
+ "rate-key": "ip:{ip},userId:{userId}",
+ "scope": "apps.write",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "appId",
+ "description": "Application unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ },
+ {
+ "name": "installationId",
+ "description": "Installation unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/apps\/{appId}\/installations\/{installationId}\/tokens": {
+ "post": {
+ "summary": "Create Installation Token",
+ "operationId": "appsCreateInstallationToken",
+ "tags": [
+ "apps"
+ ],
+ "description": "Create a token for an installation of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. The returned token carries the scopes and authorization details granted to the installation, and can be used as an `Authorization: Bearer` header everywhere OAuth2 access tokens are accepted. Multiple tokens can be active for the same installation at once; each token stays valid until it expires or the installation is updated or deleted.",
+ "responses": {
+ "201": {
+ "description": "OAuth2 Token",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/oauth2Token"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "installations",
+ "demo": "apps\/create-installation-token.md",
+ "rate-limit": 60,
+ "rate-time": 60,
+ "rate-key": "ip:{ip}",
+ "scope": [
+ "apps.write",
+ "apps.tokens.write"
+ ],
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "appId",
+ "description": "Application unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ },
+ {
+ "name": "installationId",
+ "description": "Installation unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": ""
+ },
+ "in": "path"
+ }
+ ]
+ }
+ },
+ "\/apps\/{appId}\/keys": {
+ "get": {
+ "summary": "List App Keys",
+ "operationId": "appsListKeys",
+ "tags": [
+ "apps"
+ ],
+ "description": "List app keys for an application.",
+ "responses": {
+ "200": {
+ "description": "App keys list",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/appKeyList"
+ }
+ }
+ }
+ }
+ },
+ "deprecated": false,
+ "x-appwrite": {
+ "group": "keys",
+ "demo": "apps\/list-keys.md",
+ "rate-limit": 120,
+ "rate-time": 60,
+ "rate-key": "ip:{ip},userId:{userId}",
+ "scope": "apps.read",
+ "platforms": [
+ "console",
+ "client",
+ "server"
+ ],
+ "packaging": false,
+ "public": true,
+ "auth": {
+ "Project": []
+ }
+ },
+ "security": [
+ {
+ "Project": [],
+ "Session": [],
+ "Key": [],
+ "JWT": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "appId",
+ "description": "Application unique ID.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "