Docs
Contents

Sites API

Full lifecycle interfaces for sites: create sites (multiple frontend frameworks, dual static/SSR rendering strategy), code/template/VCS deployment, build and runtime status, SSR runtime logs, and site variables. Isomorphic in shape to the deployment/execution interfaces of functions.

Service and resource boundaries

The Sites API (/v1/sites/*) provides build, hosting, and server-side rendering (SSR) management capabilities for modern web frontends and full-stack applications (Next.js, Nuxt, SvelteKit, Astro, Remix, React/Vue SPAs, and static sites): it supports code archive upload, official template initialization, and Git VCS automatic builds, with built-in atomic cutover of deployment versions, SSR runtime replica monitoring, site-level environment variables, and edge access request log auditing.

Resources and Base Paths

Authentication and Permissions

For authentication and request header conventions, see General conventions. Scope of this domain: sites.read / sites.write (sites, deployments, variables, specs), log.read / log.write (request logs), public (frameworks list).

Endpoint overview

The Sites module provides 27 endpoints in total, covering: site CRUD and active deployment cutover (6), deployment build package management and artifact download (9), SSR request log query and cleanup (3), runtime status and site environment variable management (6), and enumeration of supported frontend frameworks, build specs, and execution plans (3).

Endpoint List

Method + pathPurpose
GET /sitesList Sites
POST /sitesCreate Site
GET /sites/{siteId}Get Site
PUT /sites/{siteId}Update Site Configuration
DELETE /sites/{siteId}Delete Site
PATCH /sites/{siteId}/deploymentSwitch the active deployment
GET /sites/{siteId}/deploymentsList deployments
POST /sites/{siteId}/deploymentsCreate a deployment by uploading code
POST /sites/{siteId}/deployments/duplicateDuplicate an existing deployment
POST /sites/{siteId}/deployments/templateCreate a deployment from a template
POST /sites/{siteId}/deployments/vcsCreate a deployment from a VCS branch/commit
GET /sites/{siteId}/deployments/{deploymentId}Get a deployment
GET /sites/{siteId}/deployments/{deploymentId}/downloadDownload the deployment artifact
PATCH /sites/{siteId}/deployments/{deploymentId}/statusManually mark deployment status
DELETE /sites/{siteId}/deployments/{deploymentId}Delete a deployment
GET /sites/{siteId}/logsSSR Request Log List
GET /sites/{siteId}/logs/{logId}Get Single Log
DELETE /sites/{siteId}/logs/{logId}Delete Log
GET /sites/{siteId}/runtime-statusSSR Runtime Status
GET /sites/{siteId}/variablesList Site Variables
POST /sites/{siteId}/variablesCreate a variable
GET /sites/{siteId}/variables/{variableId}Get a variable
PUT /sites/{siteId}/variables/{variableId}Update a variable
DELETE /sites/{siteId}/variables/{variableId}Delete a variable
GET /sites/frameworksList Supported Frameworks (public)
GET /sites/specificationsList build/run specifications
GET /sites/execution-plansList execution plans

Endpoint details

Site deployment (POST /v1/sites/{siteId}/deployments*) uses an asynchronous build pipeline; after uploading code, it returns a deployment object with a waiting / building status. When activate=true is provided, the build automatically cutover to the site's live production version once it reaches the ready terminal state, without a second call to PATCH /v1/sites/{siteId}/deployment.

Requests and Responses

The following sections give the input/output specifications, copyable curl call examples, and response examples for each endpoint. Path prefix /v1; the request headers X-Appwrite-Project: <YOUR_PROJECT_ID> and X-Appwrite-Key: <YOUR_API_KEY> are consistent across all endpoints and are not explained individually in the examples.

Site CRUD

GET /v1/sites

List all sites in a project with pagination, supporting filtering by name, framework, enabled status, and other attributes, plus keyword search (scope sites.read. SDK: Sites.list.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
queriesquerystring[]NoDefault []Query string array constructed by the SDK's Query builder (in the form limit(25), equal("name","x")); supports filtering, sorting, and pagination (limit / cursorAfter / cursorBefore); filterable attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId. At most 100 entries, each at most 4096 characters.
searchquerystringNo—Search term that fuzzily filters list results. Up to 256 characters.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model siteList: total (total number of matches, not calculated when total=false) + sites[] (current page of data).

Key fields of the element model site:

FieldTypeDescription
$idstringSite ID.
$createdAtstringSite creation time (ISO 8601).
$updatedAtstringSite update time (ISO 8601).
namestringSite name.
enabledbooleanWhether the site is enabled.
livebooleanWhether the site has been deployed with the latest configuration. After modifying configuration such as variables/build commands, it becomes false; redeployment is required for changes to take effect.
loggingbooleanWhen disabled, request logs no longer record content and errors, and site responses are slightly faster.
frameworkstringSite framework.
deploymentIdstringID of the currently active deployment.
latestDeploymentIdstringID of the latest (not necessarily active) deployment.
timeoutintegerMaximum request duration (seconds).
outputDirectorystringDirectory containing the site's build artifacts.
adapterstringSite framework adapter.
fallbackFilestringFallback filename replacing the 404 page. When null, the platform default 404 page is shown.

Call example:

curl -G "https://<your-endpoint>/v1/sites" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)" \
  --data-urlencode "search=landing"

Response example:

{
  "total": 5,
  "sites": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "name": "My Site",
      "enabled": true,
      "live": true,
      "logging": true,
      "framework": "nextjs",
      "deploymentRetention": 7,
      "deploymentId": "5e5ea5c16897e",
      "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00",
      "deploymentScreenshotLight": "5e5ea5c16897e",
      "deploymentScreenshotDark": "5e5ea5c16897e",
      "latestDeploymentId": "5e5ea5c16897e",
      "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00",
      "latestDeploymentStatus": "ready",
      "vars": [
        {
          "$id": "66f1a2b3c4d5e6f7",
          "$createdAt": "2020-10-15T06:38:00.000+00:00",
          "$updatedAt": "2020-10-15T06:38:00.000+00:00",
          "key": "APP_ENV",
          "value": "development",
          "secret": false,
          "resourceType": "site",
          "resourceId": "marketing-site"
        }
      ],
      "timeout": 300,
      "installCommand": "npm install",
      "buildCommand": "npm run build",
      "startCommand": "node custom-server.mjs",
      "outputDirectory": "build",
      "installationId": "6m40at4ejk5h2u9s1hboo",
      "providerRepositoryId": "appbase",
      "providerBranch": "main",
      "providerRootDirectory": "sites/helloWorld",
      "providerSilentMode": false,
      "buildSpecification": "s-1vcpu-512mb",
      "runtimeSpecification": "s-1vcpu-512mb",
      "buildExecutionPlan": "standard-build",
      "runtimeExecutionPlan": "standard-runtime",
      "buildRuntime": "node-22",
      "adapter": "static",
      "fallbackFile": "index.html"
    }
  ]
}

POST /v1/sites

Create a site: choose the frontend framework and rendering strategy (static/ssr), build/start commands, build/SSR specs, and execution plan (scope sites.write. SDK: Sites.create.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
siteIdbodystringYes—Site ID. Can be customized or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Site name. At most 128 characters.
frameworkbodystringYesanalog / angular / nextjs / react / nuxt / vue / sveltekit / astro …… (see GET /sites/frameworks for the full list)Site framework.
enabledbodybooleanNo—Whether to enable the site. When disabled, it is inaccessible to users, but a Server SDK with an API Key can still access it; switching does not lose data.
loggingbodybooleanNo—When disabled, request logs no longer record content and errors, and site responses are slightly faster.
timeoutbodyintegerNo—Maximum request duration (seconds).
installCommandbodystringNo—Install command.
buildCommandbodystringNo—Build command.
startCommandbodystringNo—Custom start command. Leave empty to use the default.
outputDirectorybodystringNo—Site build artifact directory.
buildRuntimebodystringYesnode-14.5 / node-16.0 / node-18.0 / node-19.0 / node-20.0 / node-21.0 / node-22 / node-23 …… (see GET /functions/runtimes for the full list)Runtime used by the build step.
adapterbodystringNostatic / ssrRendering strategy adapter: static (pure static) / ssr (server-side rendering).
installationIdbodystringNo—AppBase installation ID used for VCS deployment.
fallbackFilebodystringNo—Fallback file for SPA sites.
providerRepositoryIdbodystringNo—ID of the VCS repository associated with the site.
providerBranchbodystringNo—Production branch of the repository associated with the site.
providerSilentModebodybooleanNo—Whether the VCS connection for the associated repository is in silent mode. In silent mode, no comments are posted on commits and PRs.
providerRootDirectorybodystringNo—Path of the site's code within the associated repository.
buildSpecificationbodystringNo—Build spec for the site deployment.
runtimeSpecificationbodystringNo—Runtime spec for SSR execution.
buildExecutionPlanbodystringNoCan be nullExecution plan used for the site deployment build. If omitted, the legacy default is used.
runtimeExecutionPlanbodystringNoCan be nullExecution plan used for SSR execution. If omitted, the legacy default is used.
deploymentRetentionbodyintegerNo—Number of retention days before non-active deployments are deleted. 0 means retain all.

Output: 201, model site, fields:

FieldTypeDescription
$idstringSite ID.
$createdAtstringSite creation time (ISO 8601).
$updatedAtstringSite update time (ISO 8601).
namestringSite name.
enabledbooleanWhether the site is enabled.
livebooleanWhether the site has been deployed with the latest configuration. After modifying configuration such as variables/build commands, it becomes false; redeployment is required for changes to take effect.
loggingbooleanWhen disabled, request logs no longer record content and errors, and site responses are slightly faster.
frameworkstringSite framework.
deploymentRetentionintegerRetention days for non-active deployments; they are automatically deleted upon expiry.
deploymentIdstringID of the currently active deployment.
deploymentCreatedAtstringCreation time of the active deployment (ISO 8601).
deploymentScreenshotLightstringScreenshot file ID of the active deployment in light theme.
deploymentScreenshotDarkstringScreenshot file ID of the active deployment in dark theme.
latestDeploymentIdstringID of the latest (not necessarily active) deployment.
latestDeploymentCreatedAtstringCreation time of the latest deployment (ISO 8601).
latestDeploymentStatusstringStatus of the latest deployment: waiting / processing / building / ready / failed.
varsvariable[]List of site variables.
timeoutintegerMaximum request duration (seconds).
installCommandstringCommand to install site dependencies.
buildCommandstringCommand to build the site.
startCommandstringCustom command to start the site runtime.
outputDirectorystringDirectory containing the site's build artifacts.
installationIdstringVCS installation ID associated with the site.
providerRepositoryIdstringVCS (version control system) repository ID.
providerBranchstringVCS (version control system) branch name.
providerRootDirectorystringPath of the site's code in the VCS repository.
providerSilentModebooleanWhether the VCS connection is in silent mode. In silent mode, no comments are posted on the repository's PRs / MRs.
buildSpecificationstringMachine spec used for builds (CPU/memory tier).
runtimeSpecificationstringMachine spec used for SSR runtime (CPU/memory tier).
buildExecutionPlanstringExecution plan used for deployment builds.
runtimeExecutionPlanstringExecution plan used for SSR execution.
buildRuntimestringSite build runtime.
adapterstringSite framework adapter.
fallbackFilestringFallback filename replacing the 404 page. When null, the platform default 404 page is shown.

Call example:

curl -X POST "https://<your-endpoint>/v1/sites" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "siteId": "marketing-site",
  "name": "Marketing Site",
  "framework": "nextjs",
  "buildRuntime": "node-22",
  "adapter": "static",
  "installCommand": "npm install",
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "timeout": 15,
  "logging": true
}'

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "My Site",
  "enabled": true,
  "live": true,
  "logging": true,
  "framework": "nextjs",
  "deploymentRetention": 7,
  "deploymentId": "5e5ea5c16897e",
  "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00",
  "deploymentScreenshotLight": "5e5ea5c16897e",
  "deploymentScreenshotDark": "5e5ea5c16897e",
  "latestDeploymentId": "5e5ea5c16897e",
  "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00",
  "latestDeploymentStatus": "ready",
  "vars": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "key": "APP_ENV",
      "value": "development",
      "secret": false,
      "resourceType": "site",
      "resourceId": "marketing-site"
    }
  ],
  "timeout": 300,
  "installCommand": "npm install",
  "buildCommand": "npm run build",
  "startCommand": "node custom-server.mjs",
  "outputDirectory": "build",
  "installationId": "6m40at4ejk5h2u9s1hboo",
  "providerRepositoryId": "appbase",
  "providerBranch": "main",
  "providerRootDirectory": "sites/helloWorld",
  "providerSilentMode": false,
  "buildSpecification": "s-1vcpu-512mb",
  "runtimeSpecification": "s-1vcpu-512mb",
  "buildExecutionPlan": "standard-build",
  "runtimeExecutionPlan": "standard-runtime",
  "buildRuntime": "node-22",
  "adapter": "static",
  "fallbackFile": "index.html"
}

GET /v1/sites/{siteId}

Read the full configuration of a single site by ID, including active/latest deployment pointers and the live flag (scope sites.read. SDK: Sites.get.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.

Output: 200, model site (full fields described above), key fields:

FieldTypeDescription
$idstringSite ID.
$createdAtstringSite creation time (ISO 8601).
$updatedAtstringSite update time (ISO 8601).
namestringSite name.
enabledbooleanWhether the site is enabled.
livebooleanWhether the site has been deployed with the latest configuration. After modifying configuration such as variables/build commands, it becomes false; redeployment is required for changes to take effect.
loggingbooleanWhen disabled, request logs no longer record content and errors, and site responses are slightly faster.
frameworkstringSite framework.
deploymentIdstringID of the currently active deployment.
latestDeploymentIdstringID of the latest (not necessarily active) deployment.
timeoutintegerMaximum request duration (seconds).
outputDirectorystringDirectory containing the site's build artifacts.
adapterstringSite framework adapter.
fallbackFilestringFallback filename replacing the 404 page. When null, the platform default 404 page is shown.

Call example:

curl "https://<your-endpoint>/v1/sites/<SITE_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "My Site",
  "enabled": true,
  "live": true,
  "logging": true,
  "framework": "nextjs",
  "deploymentRetention": 7,
  "deploymentId": "5e5ea5c16897e",
  "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00",
  "deploymentScreenshotLight": "5e5ea5c16897e",
  "deploymentScreenshotDark": "5e5ea5c16897e",
  "latestDeploymentId": "5e5ea5c16897e",
  "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00",
  "latestDeploymentStatus": "ready",
  "vars": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "key": "APP_ENV",
      "value": "development",
      "secret": false,
      "resourceType": "site",
      "resourceId": "marketing-site"
    }
  ],
  "timeout": 300,
  "installCommand": "npm install",
  "buildCommand": "npm run build",
  "startCommand": "node custom-server.mjs",
  "outputDirectory": "build",
  "installationId": "6m40at4ejk5h2u9s1hboo",
  "providerRepositoryId": "appbase",
  "providerBranch": "main",
  "providerRootDirectory": "sites/helloWorld",
  "providerSilentMode": false,
  "buildSpecification": "s-1vcpu-512mb",
  "runtimeSpecification": "s-1vcpu-512mb",
  "buildExecutionPlan": "standard-build",
  "runtimeExecutionPlan": "standard-runtime",
  "buildRuntime": "node-22",
  "adapter": "static",
  "fallbackFile": "index.html"
}

PUT /v1/sites/{siteId}

Update site configuration (scope sites.write; SDK: Sites.update). Some omitted fields are written using API defaults; for example, enabled may return to true, while startCommand and repository connection fields may be cleared. Read the current configuration first (scope sites.read) and explicitly submit the settings that must be retained. See the table for fields such as execution plans that have different omission behavior. Configuration changes may require redeployment.

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringYes—Site name. At most 128 characters.
frameworkbodystringYesanalog / angular / nextjs / react / nuxt / vue / sveltekit / astro …… (see GET /sites/frameworks for the full list)Site framework.
enabledbodybooleanNotrueWhether to enable the site. When disabled, it is inaccessible to users, but a Server SDK with an API Key can still access it; switching does not lose data.
loggingbodybooleanNotrueWhen disabled, request logs no longer record content and errors, and site responses are slightly faster.
timeoutbodyintegerNo30Maximum request duration (seconds).
installCommandbodystringNo""Install command.
buildCommandbodystringNo""Build command.
startCommandbodystringNo""Custom start command. Leave empty to use the default.
outputDirectorybodystringNo""Site build artifact directory.
buildRuntimebodystringNonode-14.5 / node-16.0 / node-18.0 / node-19.0 / node-20.0 / node-21.0 / node-22 / node-23 …… (see GET /functions/runtimes for the full list);""Runtime used by the build step.
adapterbodystringNostatic / ssr;""Rendering strategy adapter: static (pure static) / ssr (server-side rendering).
fallbackFilebodystringNo""Fallback file for SPA sites.
installationIdbodystringNo""AppBase installation ID used for VCS deployment.
providerRepositoryIdbodystringNo""ID of the VCS repository associated with the site.
providerBranchbodystringNo""Production branch of the repository associated with the site.
providerSilentModebodybooleanNofalseWhether the VCS connection for the associated repository is in silent mode. In silent mode, no comments are posted on commits and PRs.
providerRootDirectorybodystringNo""Path of the site's code within the associated repository.
buildSpecificationbodystringNoPlan defaultBuild spec for the site deployment.
runtimeSpecificationbodystringNoPlan defaultRuntime spec for SSR execution.
buildExecutionPlanbodystringNoOmission preserves current valueExecution plan used for the site deployment build. If omitted, the current value is kept.
runtimeExecutionPlanbodystringNoOmission preserves current valueExecution plan used for SSR execution. If omitted, the current value is kept.
deploymentRetentionbodyintegerNo0Number of retention days before non-active deployments are deleted. 0 means retain all.
siteIdpathstringYes—Site ID.

Output: 200, model site (full fields described above), key fields:

FieldTypeDescription
$idstringSite ID.
$createdAtstringSite creation time (ISO 8601).
$updatedAtstringSite update time (ISO 8601).
namestringSite name.
enabledbooleanWhether the site is enabled.
livebooleanWhether the site has been deployed with the latest configuration. After modifying configuration such as variables/build commands, it becomes false; redeployment is required for changes to take effect.
loggingbooleanWhen disabled, request logs no longer record content and errors, and site responses are slightly faster.
frameworkstringSite framework.
deploymentIdstringID of the currently active deployment.
latestDeploymentIdstringID of the latest (not necessarily active) deployment.
timeoutintegerMaximum request duration (seconds).
outputDirectorystringDirectory containing the site's build artifacts.
adapterstringSite framework adapter.
fallbackFilestringFallback filename replacing the 404 page. When null, the platform default 404 page is shown.

Request guidance: Read the current configuration and check the update defaults before submitting the settings that must be retained. Do not send a partial update request without reviewing those defaults.

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "My Site",
  "enabled": true,
  "live": true,
  "logging": true,
  "framework": "nextjs",
  "deploymentRetention": 7,
  "deploymentId": "5e5ea5c16897e",
  "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00",
  "deploymentScreenshotLight": "5e5ea5c16897e",
  "deploymentScreenshotDark": "5e5ea5c16897e",
  "latestDeploymentId": "5e5ea5c16897e",
  "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00",
  "latestDeploymentStatus": "ready",
  "vars": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "key": "APP_ENV",
      "value": "development",
      "secret": false,
      "resourceType": "site",
      "resourceId": "marketing-site"
    }
  ],
  "timeout": 300,
  "installCommand": "npm install",
  "buildCommand": "npm run build",
  "startCommand": "node custom-server.mjs",
  "outputDirectory": "build",
  "installationId": "6m40at4ejk5h2u9s1hboo",
  "providerRepositoryId": "appbase",
  "providerBranch": "main",
  "providerRootDirectory": "sites/helloWorld",
  "providerSilentMode": false,
  "buildSpecification": "s-1vcpu-512mb",
  "runtimeSpecification": "s-1vcpu-512mb",
  "buildExecutionPlan": "standard-build",
  "runtimeExecutionPlan": "standard-runtime",
  "buildRuntime": "node-22",
  "adapter": "static",
  "fallbackFile": "index.html"
}

DELETE /v1/sites/{siteId}

Delete a site by ID (its deployments and variables become unavailable as well) (scope sites.write. SDK: Sites.delete.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.

Output: 204 No response body.

Call example:

curl -X DELETE "https://<your-endpoint>/v1/sites/<SITE_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

_Binary stream or no response body (see output description)._

PATCH /v1/sites/{siteId}/deployment

Cut over the site's active deployment: visitors will henceforth access the build artifacts of the newly activated deployment (scope sites.write. SDK: Sites.updateSiteDeployment.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
deploymentIdbodystringYes—Deployment ID.
siteIdpathstringYes—Site ID.

Output: 200, model site (full fields described above), key fields:

FieldTypeDescription
$idstringSite ID.
$createdAtstringSite creation time (ISO 8601).
$updatedAtstringSite update time (ISO 8601).
namestringSite name.
enabledbooleanWhether the site is enabled.
livebooleanWhether the site has been deployed with the latest configuration. After modifying configuration such as variables/build commands, it becomes false; redeployment is required for changes to take effect.
loggingbooleanWhen disabled, request logs no longer record content and errors, and site responses are slightly faster.
frameworkstringSite framework.
deploymentIdstringID of the currently active deployment.
latestDeploymentIdstringID of the latest (not necessarily active) deployment.
timeoutintegerMaximum request duration (seconds).
outputDirectorystringDirectory containing the site's build artifacts.
adapterstringSite framework adapter.
fallbackFilestringFallback filename replacing the 404 page. When null, the platform default 404 page is shown.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/sites/<SITE_ID>/deployment" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "deploymentId": "5e5ea5c16897e"
}'

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "My Site",
  "enabled": true,
  "live": true,
  "logging": true,
  "framework": "nextjs",
  "deploymentRetention": 7,
  "deploymentId": "5e5ea5c16897e",
  "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00",
  "deploymentScreenshotLight": "5e5ea5c16897e",
  "deploymentScreenshotDark": "5e5ea5c16897e",
  "latestDeploymentId": "5e5ea5c16897e",
  "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00",
  "latestDeploymentStatus": "ready",
  "vars": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "key": "APP_ENV",
      "value": "development",
      "secret": false,
      "resourceType": "site",
      "resourceId": "marketing-site"
    }
  ],
  "timeout": 300,
  "installCommand": "npm install",
  "buildCommand": "npm run build",
  "startCommand": "node custom-server.mjs",
  "outputDirectory": "build",
  "installationId": "6m40at4ejk5h2u9s1hboo",
  "providerRepositoryId": "appbase",
  "providerBranch": "main",
  "providerRootDirectory": "sites/helloWorld",
  "providerSilentMode": false,
  "buildSpecification": "s-1vcpu-512mb",
  "runtimeSpecification": "s-1vcpu-512mb",
  "buildExecutionPlan": "standard-build",
  "runtimeExecutionPlan": "standard-runtime",
  "buildRuntime": "node-22",
  "adapter": "static",
  "fallbackFile": "index.html"
}

Deployment

GET /v1/sites/{siteId}/deployments

List all deployments of the site with pagination (scope sites.read. SDK: Deployments.listDeployments.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.
queriesquerystring[]NoDefault []Query string array, generated by the SDK's Query builder (of the form limit(25), equal("name","x")); supports filtering, sorting, and pagination (limit / cursorAfter / cursorBefore); filterable attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type. At most 100 entries, each at most 4096 characters.
searchquerystringNo—Search term that fuzzily filters list results. Up to 256 characters.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model deploymentList: total (total number of matches, not calculated when total=false) + deployments[] (current page of data).

Key fields of the element model deployment:

FieldTypeDescription
$idstringDeployment ID.
$createdAtstringDeployment creation time (ISO 8601).
typestringDeployment type.
resourceIdstringID of the owning resource.
resourceTypestringType of the owning resource.
entrypointstringEntry file used by the deployment to execute code.
sourceSizeintegerSource package size (bytes).
buildSizeintegerBuild artifact size (bytes).
totalSizeintegerTotal size (source + build artifact, bytes).
buildIdstringCurrent build ID.
activatebooleanWhether to automatically activate after the build completes.
statusstringDeployment status: waiting / processing / building / ready / canceled / failed.
buildDurationintegerCurrent build duration (seconds).

Call example:

curl -G "https://<your-endpoint>/v1/sites/<SITE_ID>/deployments" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)" \
  --data-urlencode "search=landing"

Response example:

{
  "total": 5,
  "deployments": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "type": "upload",
      "resourceId": "marketing-site",
      "resourceType": "site",
      "entrypoint": "index.js",
      "sourceSize": 128,
      "buildSize": 128,
      "totalSize": 128,
      "buildId": "6aa2d1b8c2e8f",
      "activate": true,
      "screenshotLight": "5e5ea5c16897e",
      "screenshotDark": "5e5ea5c16897e",
      "status": "ready",
      "buildLogs": "Compiling source files...",
      "buildDuration": 128,
      "providerRepositoryName": "database",
      "providerRepositoryOwner": "utopia",
      "providerRepositoryUrl": "https://github.com/vermakhushboo/g4-node-function",
      "providerCommitHash": "7c3f25d",
      "providerCommitAuthorUrl": "https://github.com/vermakhushboo",
      "providerCommitAuthor": "Khushboo Verma",
      "providerCommitMessage": "Update index.js",
      "providerCommitUrl": "https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb",
      "providerBranch": "0.7.x",
      "providerBranchUrl": "https://github.com/vermakhushboo/appwrite/tree/0.7.x"
    }
  ]
}

POST /v1/sites/{siteId}/deployments

Upload a site code package to create a new deployment (multipart/form-data); install/build commands and the artifact directory can be overridden at the deployment level. The build runs asynchronously and returns 202 (scope sites.write. SDK: Deployments.createDeployment.)

Input (multipart/form-data; file fields uploaded via -F "code=@./code.tgz")

ParameterLocationTypeRequiredDefault/enumDescription
installCommandbody (form)stringNoCan be nullInstall command.
buildCommandbody (form)stringNoNullable nullBuild command.
outputDirectorybody (form)stringNoMay be nulloutput directory.
codebody (form)stringYes—gzip-compressed code package. When using the AppBase CLI, pass the code directory path and the CLI packages it automatically; the path must be inside the current directory.
activatebody (form)booleanNo—Whether to automatically activate the deployment after the build completes.
siteIdpathstringYes—Site ID.

Output: 202, model deployment, fields:

FieldTypeDescription
$idstringDeployment ID.
$createdAtstringDeployment creation time (ISO 8601).
$updatedAtstringDeployment update time (ISO 8601).
typestringDeployment type.
resourceIdstringID of the owning resource.
resourceTypestringType of the owning resource.
entrypointstringEntry file used by the deployment to execute code.
sourceSizeintegerSource package size (bytes).
buildSizeintegerBuild artifact size (bytes).
totalSizeintegerTotal size (source + build artifact, bytes).
buildIdstringCurrent build ID.
activatebooleanWhether to automatically activate after the build completes.
screenshotLightstringFile ID of the light-theme screenshot.
screenshotDarkstringFile ID of the dark-theme screenshot.
statusstringDeployment status: waiting / processing / building / ready / canceled / failed.
buildLogsstringBuild logs.
buildDurationintegerCurrent build duration (seconds).
providerRepositoryNamestringVCS provider repository name.
providerRepositoryOwnerstringVCS repository owner name.
providerRepositoryUrlstringVCS repository URL.
providerCommitHashstringVCS commit hash.
providerCommitAuthorUrlstringVCS commit author profile page.
providerCommitAuthorstringVCS commit author name.
providerCommitMessagestringCommit message.
providerCommitUrlstringVCS commit URL.
providerBranchstringVCS repository branch.
providerBranchUrlstringVCS repository branch.

Call example:

curl -X POST "https://<your-endpoint>/v1/sites/<SITE_ID>/deployments" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -F "installCommand=npm install" \
  -F "buildCommand=npm run build" \
  -F "outputDirectory=dist" \
  -F "code=@./code.tgz" \
  -F "activate=true"

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "type": "upload",
  "resourceId": "marketing-site",
  "resourceType": "site",
  "entrypoint": "index.js",
  "sourceSize": 128,
  "buildSize": 128,
  "totalSize": 128,
  "buildId": "6aa2d1b8c2e8f",
  "activate": true,
  "screenshotLight": "5e5ea5c16897e",
  "screenshotDark": "5e5ea5c16897e",
  "status": "ready",
  "buildLogs": "Compiling source files...",
  "buildDuration": 128,
  "providerRepositoryName": "database",
  "providerRepositoryOwner": "utopia",
  "providerRepositoryUrl": "https://github.com/vermakhushboo/g4-node-function",
  "providerCommitHash": "7c3f25d",
  "providerCommitAuthorUrl": "https://github.com/vermakhushboo",
  "providerCommitAuthor": "Khushboo Verma",
  "providerCommitMessage": "Update index.js",
  "providerCommitUrl": "https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb",
  "providerBranch": "0.7.x",
  "providerBranchUrl": "https://github.com/vermakhushboo/appwrite/tree/0.7.x"
}

POST /v1/sites/{siteId}/deployments/duplicate

Start a new build from an existing deployment: rebuilds according to the site's current configuration (including the modified build command/output directory) without re-uploading source code (scope sites.write. SDK: Deployments.createDuplicateDeployment.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
deploymentIdbodystringYes—Deployment ID.
siteIdpathstringYes—Site ID.

Output: 202, model deployment (full fields described above), key fields:

FieldTypeDescription
$idstringDeployment ID.
$createdAtstringDeployment creation time (ISO 8601).
typestringDeployment type.
resourceIdstringID of the owning resource.
resourceTypestringType of the owning resource.
entrypointstringEntry file used by the deployment to execute code.
sourceSizeintegerSource package size (bytes).
buildSizeintegerBuild artifact size (bytes).
totalSizeintegerTotal size (source + build artifact, bytes).
buildIdstringCurrent build ID.
activatebooleanWhether to automatically activate after the build completes.
statusstringDeployment status: waiting / processing / building / ready / canceled / failed.
buildDurationintegerCurrent build duration (seconds).

Call example:

curl -X POST "https://<your-endpoint>/v1/sites/<SITE_ID>/deployments/duplicate" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "deploymentId": "5e5ea5c16897e"
}'

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "type": "upload",
  "resourceId": "marketing-site",
  "resourceType": "site",
  "entrypoint": "index.js",
  "sourceSize": 128,
  "buildSize": 128,
  "totalSize": 128,
  "buildId": "6aa2d1b8c2e8f",
  "activate": true,
  "screenshotLight": "5e5ea5c16897e",
  "screenshotDark": "5e5ea5c16897e",
  "status": "ready",
  "buildLogs": "Compiling source files...",
  "buildDuration": 128,
  "providerRepositoryName": "database",
  "providerRepositoryOwner": "utopia",
  "providerRepositoryUrl": "https://github.com/vermakhushboo/g4-node-function",
  "providerCommitHash": "7c3f25d",
  "providerCommitAuthorUrl": "https://github.com/vermakhushboo",
  "providerCommitAuthor": "Khushboo Verma",
  "providerCommitMessage": "Update index.js",
  "providerCommitUrl": "https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb",
  "providerBranch": "0.7.x",
  "providerBranchUrl": "https://github.com/vermakhushboo/appwrite/tree/0.7.x"
}

POST /v1/sites/{siteId}/deployments/template

Create a site deployment from a template repository: specify the repository, owner, directory, and reference (commit/branch/tag) (scope sites.write. SDK: Deployments.createTemplateDeployment.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
repositorybodystringYes—Template repository name.
ownerbodystringYes—Template repository owner.
rootDirectorybodystringYes—Path of the site code within the template repository.
typebodystringYesbranch / commit / tagType of the reference: commit / branch / tag.
referencebodystringYes—Value of the reference: commit hash, branch name, or release tag.
activatebodybooleanNo—Whether to automatically activate this deployment after the build completes.
siteIdpathstringYes—Site ID.

Output: 202, model deployment (full fields described above), key fields:

FieldTypeDescription
$idstringDeployment ID.
$createdAtstringDeployment creation time (ISO 8601).
typestringDeployment type.
resourceIdstringID of the owning resource.
resourceTypestringType of the owning resource.
entrypointstringEntry file used by the deployment to execute code.
sourceSizeintegerSource package size (bytes).
buildSizeintegerBuild artifact size (bytes).
totalSizeintegerTotal size (source + build artifact, bytes).
buildIdstringCurrent build ID.
activatebooleanWhether to automatically activate after the build completes.
statusstringDeployment status: waiting / processing / building / ready / canceled / failed.
buildDurationintegerCurrent build duration (seconds).

Call example:

curl -X POST "https://<your-endpoint>/v1/sites/<SITE_ID>/deployments/template" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "repository": "agentbase/function-templates",
  "owner": "agentbase",
  "rootDirectory": "hello-world",
  "type": "commit",
  "reference": "prod",
  "activate": true
}'

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "type": "upload",
  "resourceId": "marketing-site",
  "resourceType": "site",
  "entrypoint": "index.js",
  "sourceSize": 128,
  "buildSize": 128,
  "totalSize": 128,
  "buildId": "6aa2d1b8c2e8f",
  "activate": true,
  "screenshotLight": "5e5ea5c16897e",
  "screenshotDark": "5e5ea5c16897e",
  "status": "ready",
  "buildLogs": "Compiling source files...",
  "buildDuration": 128,
  "providerRepositoryName": "database",
  "providerRepositoryOwner": "utopia",
  "providerRepositoryUrl": "https://github.com/vermakhushboo/g4-node-function",
  "providerCommitHash": "7c3f25d",
  "providerCommitAuthorUrl": "https://github.com/vermakhushboo",
  "providerCommitAuthor": "Khushboo Verma",
  "providerCommitMessage": "Update index.js",
  "providerCommitUrl": "https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb",
  "providerBranch": "0.7.x",
  "providerBranchUrl": "https://github.com/vermakhushboo/appwrite/tree/0.7.x"
}

POST /v1/sites/{siteId}/deployments/vcs

For sites already connected to a VCS, create a deployment from a branch, commit, or tag of its repository (scope sites.write. SDK: Deployments.createVcsDeployment.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
typebodystringYesbranch / commit / tagType of the reference: branch / commit.
referencebodystringYes—VCS reference used to create the deployment: branch name or commit hash (depending on type).
activatebodybooleanNo—Whether to automatically activate this deployment after the build completes.
siteIdpathstringYes—Site ID.

Output: 202, model deployment (full fields described above), key fields:

FieldTypeDescription
$idstringDeployment ID.
$createdAtstringDeployment creation time (ISO 8601).
typestringDeployment type.
resourceIdstringID of the owning resource.
resourceTypestringType of the owning resource.
entrypointstringEntry file used by the deployment to execute code.
sourceSizeintegerSource package size (bytes).
buildSizeintegerBuild artifact size (bytes).
totalSizeintegerTotal size (source + build artifact, bytes).
buildIdstringCurrent build ID.
activatebooleanWhether to automatically activate after the build completes.
statusstringDeployment status: waiting / processing / building / ready / canceled / failed.
buildDurationintegerCurrent build duration (seconds).

Call example:

curl -X POST "https://<your-endpoint>/v1/sites/<SITE_ID>/deployments/vcs" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "commit",
  "reference": "prod",
  "activate": true
}'

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "type": "upload",
  "resourceId": "marketing-site",
  "resourceType": "site",
  "entrypoint": "index.js",
  "sourceSize": 128,
  "buildSize": 128,
  "totalSize": 128,
  "buildId": "6aa2d1b8c2e8f",
  "activate": true,
  "screenshotLight": "5e5ea5c16897e",
  "screenshotDark": "5e5ea5c16897e",
  "status": "ready",
  "buildLogs": "Compiling source files...",
  "buildDuration": 128,
  "providerRepositoryName": "database",
  "providerRepositoryOwner": "utopia",
  "providerRepositoryUrl": "https://github.com/vermakhushboo/g4-node-function",
  "providerCommitHash": "7c3f25d",
  "providerCommitAuthorUrl": "https://github.com/vermakhushboo",
  "providerCommitAuthor": "Khushboo Verma",
  "providerCommitMessage": "Update index.js",
  "providerCommitUrl": "https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb",
  "providerBranch": "0.7.x",
  "providerBranchUrl": "https://github.com/vermakhushboo/appwrite/tree/0.7.x"
}

GET /v1/sites/{siteId}/deployments/{deploymentId}

Read a single deployment's details, used for polling build status (scope sites.read. SDK: Deployments.getDeployment.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.
deploymentIdpathstringYes—Deployment ID.

Output: 200, model deployment (full fields described above), key fields:

FieldTypeDescription
$idstringDeployment ID.
$createdAtstringDeployment creation time (ISO 8601).
typestringDeployment type.
resourceIdstringID of the owning resource.
resourceTypestringType of the owning resource.
entrypointstringEntry file used by the deployment to execute code.
sourceSizeintegerSource package size (bytes).
buildSizeintegerBuild artifact size (bytes).
totalSizeintegerTotal size (source + build artifact, bytes).
buildIdstringCurrent build ID.
activatebooleanWhether to automatically activate after the build completes.
statusstringDeployment status: waiting / processing / building / ready / canceled / failed.
buildDurationintegerCurrent build duration (seconds).

Call example:

curl "https://<your-endpoint>/v1/sites/<SITE_ID>/deployments/<DEPLOYMENT_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "type": "upload",
  "resourceId": "marketing-site",
  "resourceType": "site",
  "entrypoint": "index.js",
  "sourceSize": 128,
  "buildSize": 128,
  "totalSize": 128,
  "buildId": "6aa2d1b8c2e8f",
  "activate": true,
  "screenshotLight": "5e5ea5c16897e",
  "screenshotDark": "5e5ea5c16897e",
  "status": "ready",
  "buildLogs": "Compiling source files...",
  "buildDuration": 128,
  "providerRepositoryName": "database",
  "providerRepositoryOwner": "utopia",
  "providerRepositoryUrl": "https://github.com/vermakhushboo/g4-node-function",
  "providerCommitHash": "7c3f25d",
  "providerCommitAuthorUrl": "https://github.com/vermakhushboo",
  "providerCommitAuthor": "Khushboo Verma",
  "providerCommitMessage": "Update index.js",
  "providerCommitUrl": "https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb",
  "providerBranch": "0.7.x",
  "providerBranchUrl": "https://github.com/vermakhushboo/appwrite/tree/0.7.x"
}

GET /v1/sites/{siteId}/deployments/{deploymentId}/download

Download a deployment's source package or build artifacts; returns the attachment binary stream (scope sites.read. SDK: Deployments.getDeploymentDownload.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.
deploymentIdpathstringYes—Deployment ID.
typequerystringNosource / output; default "source"Content to download: source (source package) or output (build artifact).

Output: 200, binary file stream (Content-Disposition: attachment attachment download; type=source is the source package, type=output is the build artifact).

Call example:

curl -G "https://<your-endpoint>/v1/sites/<SITE_ID>/deployments/<DEPLOYMENT_ID>/download" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -o deployment.tgz \
  --data-urlencode "type=source"

Response example:

_Binary stream or no response body (see output description)._

PATCH /v1/sites/{siteId}/deployments/{deploymentId}/status

Cancel an in-progress or queued site deployment build: in-progress builds are stopped and marked canceled; builds in ready / failed states cannot be canceled (scope sites.write. SDK: Deployments.updateDeploymentStatus.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.
deploymentIdpathstringYes—Deployment ID.

Output: 200, model deployment (full fields described above), key fields:

FieldTypeDescription
$idstringDeployment ID.
$createdAtstringDeployment creation time (ISO 8601).
typestringDeployment type.
resourceIdstringID of the owning resource.
resourceTypestringType of the owning resource.
entrypointstringEntry file used by the deployment to execute code.
sourceSizeintegerSource package size (bytes).
buildSizeintegerBuild artifact size (bytes).
totalSizeintegerTotal size (source + build artifact, bytes).
buildIdstringCurrent build ID.
activatebooleanWhether to automatically activate after the build completes.
statusstringDeployment status: waiting / processing / building / ready / canceled / failed.
buildDurationintegerCurrent build duration (seconds).

Call example:

curl -X PATCH "https://<your-endpoint>/v1/sites/<SITE_ID>/deployments/<DEPLOYMENT_ID>/status" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "type": "upload",
  "resourceId": "marketing-site",
  "resourceType": "site",
  "entrypoint": "index.js",
  "sourceSize": 128,
  "buildSize": 128,
  "totalSize": 128,
  "buildId": "6aa2d1b8c2e8f",
  "activate": true,
  "screenshotLight": "5e5ea5c16897e",
  "screenshotDark": "5e5ea5c16897e",
  "status": "ready",
  "buildLogs": "Compiling source files...",
  "buildDuration": 128,
  "providerRepositoryName": "database",
  "providerRepositoryOwner": "utopia",
  "providerRepositoryUrl": "https://github.com/vermakhushboo/g4-node-function",
  "providerCommitHash": "7c3f25d",
  "providerCommitAuthorUrl": "https://github.com/vermakhushboo",
  "providerCommitAuthor": "Khushboo Verma",
  "providerCommitMessage": "Update index.js",
  "providerCommitUrl": "https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb",
  "providerBranch": "0.7.x",
  "providerBranchUrl": "https://github.com/vermakhushboo/appwrite/tree/0.7.x"
}

DELETE /v1/sites/{siteId}/deployments/{deploymentId}

Delete the specified deployment (scope sites.write. SDK: Deployments.deleteDeployment.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.
deploymentIdpathstringYes—Deployment ID.

Output: 204 No response body.

Call example:

curl -X DELETE "https://<your-endpoint>/v1/sites/<SITE_ID>/deployments/<DEPLOYMENT_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

_Binary stream or no response body (see output description)._

SSR Logs and Runtime Status

GET /v1/sites/{siteId}/logs

List a site's SSR request logs with pagination (one execution record per request), controlled by the site's logging switch (scope log.read. SDK: Logs.listLogs.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.
queriesquerystring[]NoDefault []Query string array, generated by the SDK's Query builder (of the form limit(25), equal("name","x")); supports filtering, sorting, and pagination (limit / cursorAfter / cursorBefore); filterable attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId. At most 100 entries, each at most 4096 characters.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model executionList: total (total number of matches, not calculated when total=false) + executions[] (current page of data).

Key fields of the element model execution:

FieldTypeDescription
$idstringExecution record ID.
$createdAtstringExecution record creation time (ISO 8601).
functionIdstringFunction ID.
deploymentIdstringID of the deployment used to trigger this execution.
triggerstringTrigger source: http / schedule / event.
statusstringExecution status: waiting / processing / completed / failed / scheduled.
requestMethodstringHTTP request method.
requestPathstringHTTP request path (may include the query string).
responseStatusCodeintegerHTTP response status code.
responseBodystringHTTP response body returned by the function.
logsstringFunction logs (last 4000 characters). Content is present only when called with an API Key or returned as a webhook payload; otherwise an empty string.
errorsstringFunction error output (last 4000 characters). Content is present only when called with an API Key or returned as a webhook payload; otherwise an empty string.
durationnumberExecution duration of the resource (function/site) in seconds.

Call example:

curl -G "https://<your-endpoint>/v1/sites/<SITE_ID>/logs" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)"

Response example:

{
  "total": 5,
  "executions": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "$permissions": [
        ""
      ],
      "functionId": "hello-world",
      "deploymentId": "5e5ea5c16897e",
      "trigger": "http",
      "status": "completed",
      "requestMethod": "POST",
      "requestPath": "/articles?id=5",
      "requestHeaders": [
        {
          "name": "Content-Type",
          "value": "application/json"
        }
      ],
      "responseStatusCode": 200,
      "responseBody": "Hello from function!",
      "responseHeaders": [
        {
          "name": "Content-Type",
          "value": "application/json"
        }
      ],
      "logs": "",
      "errors": "",
      "duration": 0.4,
      "scheduledAt": null
    }
  ]
}

GET /v1/sites/{siteId}/logs/{logId}

Read the full content of a single SSR request log (including status code, duration, and log/error output) (scope log.read. SDK: Logs.getLog.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.
logIdpathstringYes—Log ID.

Output: 200, model execution, fields:

FieldTypeDescription
$idstringExecution record ID.
$createdAtstringExecution record creation time (ISO 8601).
$updatedAtstringExecution record update time (ISO 8601).
$permissionsstring[]Execution role.
functionIdstringFunction ID.
deploymentIdstringID of the deployment used to trigger this execution.
triggerstringTrigger source: http / schedule / event.
statusstringExecution status: waiting / processing / completed / failed / scheduled.
requestMethodstringHTTP request method.
requestPathstringHTTP request path (may include the query string).
requestHeadersheaders[]HTTP request header key-value object. Only whitelisted headers are returned; executions created synchronously return all request headers.
responseStatusCodeintegerHTTP response status code.
responseBodystringHTTP response body returned by the function.
responseHeadersheaders[]HTTP response header key-value object. Only whitelisted headers are returned; executions created synchronously return all response headers.
logsstringFunction logs (last 4000 characters). Content is present only when called with an API Key or returned as a webhook payload; otherwise an empty string.
errorsstringFunction error output (last 4000 characters). Content is present only when called with an API Key or returned as a webhook payload; otherwise an empty string.
durationnumberExecution duration of the resource (function/site) in seconds.
scheduledAtstringScheduled execution time. If left empty, execution is queued immediately.

Call example:

curl "https://<your-endpoint>/v1/sites/<SITE_ID>/logs/<LOG_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "$permissions": [
    ""
  ],
  "functionId": "hello-world",
  "deploymentId": "5e5ea5c16897e",
  "trigger": "http",
  "status": "completed",
  "requestMethod": "POST",
  "requestPath": "/articles?id=5",
  "requestHeaders": [
    {
      "name": "Content-Type",
      "value": "application/json"
    }
  ],
  "responseStatusCode": 200,
  "responseBody": "Hello from function!",
  "responseHeaders": [
    {
      "name": "Content-Type",
      "value": "application/json"
    }
  ],
  "logs": "",
  "errors": "",
  "duration": 0.4,
  "scheduledAt": null
}

DELETE /v1/sites/{siteId}/logs/{logId}

Delete a single SSR request log (scope log.write. SDK: Logs.deleteLog.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.
logIdpathstringYes—Log ID.

Output: 204 No response body.

Call example:

curl -X DELETE "https://<your-endpoint>/v1/sites/<SITE_ID>/logs/<LOG_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

_Binary stream or no response body (see output description)._

GET /v1/sites/{siteId}/runtime-status

Read the security status summary of the site's SSR resident runtime (scope sites.read. SDK: Sites.getRuntimeStatus.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.

Output: 200, model runtimeStatus, fields:

FieldTypeDescription
statusstringRuntime status summary.
coveragestringCoverage of the status data.
updatedAtstringLast update time of the underlying resource.
messagestringUser-facing safe status message.

Call example:

curl "https://<your-endpoint>/v1/sites/<SITE_ID>/runtime-status" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "status": "healthy",
  "coverage": "configuration-only",
  "updatedAt": "2026-07-12T00:00:00.000+00:00",
  "message": "All runtime replicas are healthy."
}

Site variables

GET /v1/sites/{siteId}/variables

List all variables for the site (secret variable values are not returned in plaintext) (scope sites.read. SDK: Variables.listVariables.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.

Output: 200, model variableList: total (total number of matches, not calculated when total=false) + variables[] (current page of data).

Key fields of the element model variable:

FieldTypeDescription
$idstringVariable ID.
keystringVariable key name.
valuestringVariable value.
secretbooleanWhether it is a secret variable. Secret variables can only be updated or deleted, not read.
resourceTypestringService the variable belongs to: project / function.
resourceIdstringID of the resource the variable belongs to. Empty when resourceType=project; the function ID when resourceType=function.

Call example:

curl "https://<your-endpoint>/v1/sites/<SITE_ID>/variables" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "total": 5,
  "variables": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "key": "APP_ENV",
      "value": "development",
      "secret": false,
      "resourceType": "site",
      "resourceId": "marketing-site"
    }
  ]
}

POST /v1/sites/{siteId}/variables

Create site variables: injected as environment variables into builds and the SSR runtime (scope sites.write. SDK: Variables.createVariable.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
keybodystringYes—Variable key name. Up to 255 characters.
valuebodystringYes—Variable value. Up to 8192 characters.
secretbodybooleanNo—Secret variables can be updated/deleted, but only the site can read them at build and runtime.
siteIdpathstringYes—Site ID.

Output: 201, model variable, fields:

FieldTypeDescription
$idstringVariable ID.
$createdAtstringVariable creation time (ISO 8601).
$updatedAtstringVariable creation time (ISO 8601).
keystringVariable key name.
valuestringVariable value.
secretbooleanWhether it is a secret variable. Secret variables can only be updated or deleted, not read.
resourceTypestringService the variable belongs to: project / function.
resourceIdstringID of the resource the variable belongs to. Empty when resourceType=project; the function ID when resourceType=function.

Call example:

(
  set +x
  set -o pipefail
  : "${APPBASE_API_KEY:?Set APPBASE_API_KEY}"
  builtin printf 'X-Appwrite-Key: %s\n' "$APPBASE_API_KEY" | curl --disable --header @- -X POST "https://<your-endpoint>/v1/sites/<SITE_ID>/variables" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "APP_ENV",
  "value": "development",
  "secret": false
}'
)

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "key": "APP_ENV",
  "value": "development",
  "secret": false,
  "resourceType": "site",
  "resourceId": "marketing-site"
}

GET /v1/sites/{siteId}/variables/{variableId}

Read a single variable by ID (secret variable values are masked) (scope sites.read. SDK: Variables.getVariable.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.
variableIdpathstringYes—Variable ID.

Output: 200, model variable (full fields described above), key fields:

FieldTypeDescription
$idstringVariable ID.
keystringVariable key name.
valuestringVariable value.
secretbooleanWhether it is a secret variable. Secret variables can only be updated or deleted, not read.
resourceTypestringService the variable belongs to: project / function.
resourceIdstringID of the resource the variable belongs to. Empty when resourceType=project; the function ID when resourceType=function.

Call example:

curl "https://<your-endpoint>/v1/sites/<SITE_ID>/variables/<VARIABLE_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "key": "APP_ENV",
  "value": "development",
  "secret": false,
  "resourceType": "site",
  "resourceId": "marketing-site"
}

PUT /v1/sites/{siteId}/variables/{variableId}

Update a variable: takes effect for builds/SSR after reactivating the deployment (scope sites.write. SDK: Variables.updateVariable.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
keybodystringYes—Variable key name. Up to 255 characters.
valuebodystringNoCan be a nullvariable value. Maximum 8192 characters.
secretbodybooleanNoMay be nullSecret variables can be updated/deleted, but only the site can read them at build and runtime.
siteIdpathstringYes—Site ID.
variableIdpathstringYes—Variable ID.

Output: 200, model variable (full fields described above), key fields:

FieldTypeDescription
$idstringVariable ID.
keystringVariable key name.
valuestringVariable value.
secretbooleanWhether it is a secret variable. Secret variables can only be updated or deleted, not read.
resourceTypestringService the variable belongs to: project / function.
resourceIdstringID of the resource the variable belongs to. Empty when resourceType=project; the function ID when resourceType=function.

Call example:

(
  set +x
  set -o pipefail
  : "${APPBASE_API_KEY:?Set APPBASE_API_KEY}"
  builtin printf 'X-Appwrite-Key: %s\n' "$APPBASE_API_KEY" | curl --disable --header @- -X PUT "https://<your-endpoint>/v1/sites/<SITE_ID>/variables/<VARIABLE_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "APP_ENV",
  "value": "development",
  "secret": false
}'
)

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "key": "APP_ENV",
  "value": "development",
  "secret": false,
  "resourceType": "site",
  "resourceId": "marketing-site"
}

DELETE /v1/sites/{siteId}/variables/{variableId}

Delete a specified variable (scope sites.write. SDK: Variables.deleteVariable.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
siteIdpathstringYes—Site ID.
variableIdpathstringYes—Variable ID.

Output: 204 No response body.

Call example:

curl -X DELETE "https://<your-endpoint>/v1/sites/<SITE_ID>/variables/<VARIABLE_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

_Binary stream or no response body (see output description)._

Enumeration Endpoints

GET /v1/sites/frameworks

List all frontend frameworks and their adapters supported by the current instance (public scope) (scope public. SDK: Frameworks.listFrameworks.)

input: Path parameters only; no query or request body.

Output: 200, model frameworkList: total (total number of matches, not calculated when total=false) + frameworks[] (current page of data).

Key fields of the element model framework:

FieldTypeDescription
keystringFramework key name.
namestringFramework name.
buildRuntimestringDefault build runtime version.
runtimesstring[]List of supported runtime versions.
adaptersframeworkAdapter[]List of supported rendering adapters.

Call example:

curl "https://<your-endpoint>/v1/sites/frameworks" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "total": 5,
  "frameworks": [
    {
      "key": "sveltekit",
      "name": "SvelteKit",
      "buildRuntime": "node-22",
      "runtimes": [
        "node-22"
      ],
      "adapters": [
        {
          "key": "static",
          "installCommand": "npm install",
          "buildCommand": "npm run build",
          "outputDirectory": "./dist",
          "fallbackFile": "index.html"
        }
      ]
    }
  ]
}

GET /v1/sites/specifications

List the build/SSR runtime machine specs allowed by the instance (CPU and memory tiers) (scope sites.read. SDK: Frameworks.listSpecifications.)

input: Path parameters only; no query or request body.

Output: 200, model specificationList: total (total number of matches, not calculated when total=false) + specifications[] (current page of data).

Key fields of the element model specification:

FieldTypeDescription
memoryintegerMemory size (MB).
cpusnumberNumber of CPU cores.
enabledbooleanWhether this specification is enabled.
slugstringSpecification identifier (slug).

Call example:

curl "https://<your-endpoint>/v1/sites/specifications" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "total": 5,
  "specifications": [
    {
      "memory": 512,
      "cpus": 1,
      "enabled": true,
      "slug": "s-1vcpu-512mb"
    }
  ]
}

GET /v1/sites/execution-plans

List the execution plans available for site builds/SSR runs; can be filtered by framework (scope sites.read. SDK: ExecutionPlans.listExecutionPlans.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
frameworkquerystringNoanalog / angular / nextjs / react / nuxt / vue / sveltekit / astro …… (for the full list, refer to GET /sites/frameworks)Site framework used to filter execution plans.

Output: 200, model executionPlanList: total (total number of matches, not calculated when total=false) + executionPlans[] (current page of data).

Key fields of the element model executionPlan:

FieldTypeDescription
idstringStable execution plan ID.
namestringExecution plan display name.
summarystringExecution plan description.
suitableForstringResource type supported by this execution plan.
recommendedbooleanWhether this is a recommended execution plan.
availabilitystringAvailability of this execution plan.
effectiveOnstringEffective timing of the selected execution plan.

Call example:

curl -G "https://<your-endpoint>/v1/sites/execution-plans" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "framework=nextjs"

Response example:

{
  "total": 5,
  "executionPlans": [
    {
      "id": "legacy-default",
      "name": "Default runtime",
      "summary": "Use the verified shared runtime baseline.",
      "suitableFor": "Supported Function and Site runtimes.",
      "recommended": true,
      "availability": "available",
      "effectiveOn": "Next build or execution.",
      "disabledReason": null
    }
  ]
}

Errors and boundaries

Correspondence with the Server SDK

service.methodEndpoint
Sites.list / create / get / update / delete/sites CRUD
Sites.updateSiteDeploymentPATCH /sites/{siteId}/deployment
Sites.listDeployments / createDeployment / createDuplicateDeployment / createTemplateDeployment / createVcsDeployment / getDeployment / getDeploymentDownload / updateDeploymentStatus / deleteDeployment/sites/{siteId}/deployments*
Sites.listLogs / getLog / deleteLog/sites/{siteId}/logs*
Sites.getRuntimeStatusGET /sites/{siteId}/runtime-status
Sites.listVariables / createVariable / getVariable / updateVariable / deleteVariable/sites/{siteId}/variables*
Sites.listFrameworks / listSpecifications / listExecutionPlans/sites/frameworks、/sites/specifications、/sites/execution-plans