Skip to content

Sites

SERVER

The Sites service allows you to host, deploy and manage web applications directly within the Appwrite platform. You can use this service to create and manage sites, handle deployments, configure domains, and set up environment variables.

Sites supports both static and server-side rendered (SSR) web applications. Static sites are pre-built and served as-is, while SSR sites generate content dynamically for each request. The service automatically handles SSL certificates, provides unique domains for each site, and allows custom domain configuration.

Each site deployment runs in an isolated container and can be configured with custom environment variables, build settings, and timeouts. You can deploy sites manually or set up automatic deployments from Git repositories for continuous integration and delivery.

You can find more information on how to build and deploy a web app in the Sites product pages.

Base URL
https://<REGION>.cloud.appwrite.io/v1

Create site

Create a new site.

  • Request
    • siteId string
      required

      Site 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.

    • name string
      required

      Site name. Max length: 128 chars.

    • framework string
      required

      Sites framework.

    • buildRuntime string
      required

      Runtime to use during build step.

    • enabled boolean

      Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.

    • logging boolean

      When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.

    • timeout integer

      Maximum request time in seconds.

    • installCommand string

      Install Command.

    • buildCommand string

      Build Command.

    • outputDirectory string

      Output Directory for site.

    • adapter string

      Framework adapter defining rendering strategy. Allowed values are: static, ssr

    • installationId string

      Appwrite Installation ID for VCS (Version Control System) deployment.

    • fallbackFile string

      Fallback file for single page application sites.

    • providerRepositoryId string

      Repository ID of the repo linked to the site.

    • providerBranch string

      Production branch for the repo linked to the site.

    • providerSilentMode boolean

      Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.

    • providerRootDirectory string

      Path to site code in the linked repo.

    • specification string

      Framework specification for the site and builds.

  • Response
    • 201 application/json
Endpoint
POST /sites
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.create(
    '<SITE_ID>', // siteId
    '<NAME>', // name
    sdk..Analog, // framework
    sdk..Node145, // buildRuntime
    false, // enabled (optional)
    false, // logging (optional)
    1, // timeout (optional)
    '<INSTALL_COMMAND>', // installCommand (optional)
    '<BUILD_COMMAND>', // buildCommand (optional)
    '<OUTPUT_DIRECTORY>', // outputDirectory (optional)
    sdk..Static, // adapter (optional)
    '<INSTALLATION_ID>', // installationId (optional)
    '<FALLBACK_FILE>', // fallbackFile (optional)
    '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional)
    '<PROVIDER_BRANCH>', // providerBranch (optional)
    false, // providerSilentMode (optional)
    '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional)
    '' // specification (optional)
);

Get site

Get a site by its unique ID.

  • Request
    • siteId string
      required

      Site ID.

  • Response
    • 200 application/json
Endpoint
GET /sites/{siteId}
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.get(
    '<SITE_ID>' // siteId
);

List sites

Get a list of all the project's sites. You can use the query params to filter your results.

  • Request
    • queries string

      Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId

    • search string

      Search term to filter your list results. Max length: 256 chars.

  • Response
Endpoint
GET /sites
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.list(
    [], // queries (optional)
    '<SEARCH>' // search (optional)
);

Update site

Update site by its unique ID.

  • Request
    • siteId string
      required

      Site ID.

    • name string
      required

      Site name. Max length: 128 chars.

    • framework string
      required

      Sites framework.

    • enabled boolean

      Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.

    • logging boolean

      When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.

    • timeout integer

      Maximum request time in seconds.

    • installCommand string

      Install Command.

    • buildCommand string

      Build Command.

    • outputDirectory string

      Output Directory for site.

    • buildRuntime string

      Runtime to use during build step.

    • adapter string

      Framework adapter defining rendering strategy. Allowed values are: static, ssr

    • fallbackFile string

      Fallback file for single page application sites.

    • installationId string

      Appwrite Installation ID for VCS (Version Control System) deployment.

    • providerRepositoryId string

      Repository ID of the repo linked to the site.

    • providerBranch string

      Production branch for the repo linked to the site.

    • providerSilentMode boolean

      Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.

    • providerRootDirectory string

      Path to site code in the linked repo.

    • specification string

      Framework specification for the site and builds.

  • Response
    • 200 application/json
Endpoint
PUT /sites/{siteId}
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.update(
    '<SITE_ID>', // siteId
    '<NAME>', // name
    sdk..Analog, // framework
    false, // enabled (optional)
    false, // logging (optional)
    1, // timeout (optional)
    '<INSTALL_COMMAND>', // installCommand (optional)
    '<BUILD_COMMAND>', // buildCommand (optional)
    '<OUTPUT_DIRECTORY>', // outputDirectory (optional)
    sdk..Node145, // buildRuntime (optional)
    sdk..Static, // adapter (optional)
    '<FALLBACK_FILE>', // fallbackFile (optional)
    '<INSTALLATION_ID>', // installationId (optional)
    '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional)
    '<PROVIDER_BRANCH>', // providerBranch (optional)
    false, // providerSilentMode (optional)
    '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional)
    '' // specification (optional)
);

Update site's deployment

Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.

  • Request
    • siteId string
      required

      Site ID.

    • deploymentId string
      required

      Deployment ID.

  • Response
    • 200 application/json
Endpoint
PATCH /sites/{siteId}/deployment
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.updateSiteDeployment(
    '<SITE_ID>', // siteId
    '<DEPLOYMENT_ID>' // deploymentId
);

Delete site

Delete a site by its unique ID.

  • Request
    • siteId string
      required

      Site ID.

  • Response
    • 204 application/json
Endpoint
DELETE /sites/{siteId}
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.delete(
    '<SITE_ID>' // siteId
);

List frameworks

Get a list of all frameworks that are currently available on the server instance.

Endpoint
GET /sites/frameworks
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.listFrameworks();

List specifications

List allowed site specifications for this instance.

Endpoint
GET /sites/specifications
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.listSpecifications();

Create deployment

Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID.

  • Request
    • siteId string
      required

      Site ID.

    • code string
      required

      Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.

    • activate boolean
      required

      Automatically activate the deployment when it is finished building.

    • installCommand string

      Install Commands.

    • buildCommand string

      Build Commands.

    • outputDirectory string

      Output Directory.

  • Response
Endpoint
POST /sites/{siteId}/deployments
Node.js
const sdk = require('node-appwrite');
const fs = require('fs');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.createDeployment(
    '<SITE_ID>', // siteId
    InputFile.fromPath('/path/to/file', 'filename'), // code
    false, // activate
    '<INSTALL_COMMAND>', // installCommand (optional)
    '<BUILD_COMMAND>', // buildCommand (optional)
    '<OUTPUT_DIRECTORY>' // outputDirectory (optional)
);

Create duplicate deployment

Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.

  • Request
    • siteId string
      required

      Site ID.

    • deploymentId string
      required

      Deployment ID.

  • Response
Endpoint
POST /sites/{siteId}/deployments/duplicate
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.createDuplicateDeployment(
    '<SITE_ID>', // siteId
    '<DEPLOYMENT_ID>' // deploymentId
);

Create template deployment

Create a deployment based on a template.

Use this endpoint with combination of listTemplates to find the template details.

  • Request
    • siteId string
      required

      Site ID.

    • repository string
      required

      Repository name of the template.

    • owner string
      required

      The name of the owner of the template.

    • rootDirectory string
      required

      Path to site code in the template repo.

    • version string
      required

      Version (tag) for the repo linked to the site template.

    • activate boolean

      Automatically activate the deployment when it is finished building.

  • Response
Endpoint
POST /sites/{siteId}/deployments/template
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.createTemplateDeployment(
    '<SITE_ID>', // siteId
    '<REPOSITORY>', // repository
    '<OWNER>', // owner
    '<ROOT_DIRECTORY>', // rootDirectory
    '<VERSION>', // version
    false // activate (optional)
);

Create VCS deployment

Create a deployment when a site is connected to VCS.

This endpoint lets you create deployment from a branch, commit, or a tag.

  • Request
    • siteId string
      required

      Site ID.

    • type string
      required

      Type of reference passed. Allowed values are: branch, commit

    • reference string
      required

      VCS reference to create deployment from. Depending on type this can be: branch name, commit hash

    • activate boolean

      Automatically activate the deployment when it is finished building.

  • Response
Endpoint
POST /sites/{siteId}/deployments/vcs
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.createVcsDeployment(
    '<SITE_ID>', // siteId
    sdk.VCSDeploymentType.Branch, // type
    '<REFERENCE>', // reference
    false // activate (optional)
);

Get deployment

Get a site deployment by its unique ID.

  • Request
    • siteId string
      required

      Site ID.

    • deploymentId string
      required

      Deployment ID.

  • Response
Endpoint
GET /sites/{siteId}/deployments/{deploymentId}
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.getDeployment(
    '<SITE_ID>', // siteId
    '<DEPLOYMENT_ID>' // deploymentId
);

Get deployment download

Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.

  • Request
    • siteId string
      required

      Site ID.

    • deploymentId string
      required

      Deployment ID.

    • type string

      Deployment file to download. Can be: "source", "output".

  • Response
    • 200 application/json
Endpoint
GET /sites/{siteId}/deployments/{deploymentId}/download
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.getDeploymentDownload(
    '<SITE_ID>', // siteId
    '<DEPLOYMENT_ID>', // deploymentId
    sdk.DeploymentDownloadType.Source // type (optional)
);

List deployments

Get a list of all the site's code deployments. You can use the query params to filter your results.

  • Request
    • siteId string
      required

      Site ID.

    • queries array

      Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type

    • search string

      Search term to filter your list results. Max length: 256 chars.

  • Response
Endpoint
GET /sites/{siteId}/deployments
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.listDeployments(
    '<SITE_ID>', // siteId
    [], // queries (optional)
    '<SEARCH>' // search (optional)
);

Update deployment status

Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.

  • Request
    • siteId string
      required

      Site ID.

    • deploymentId string
      required

      Deployment ID.

  • Response
Endpoint
PATCH /sites/{siteId}/deployments/{deploymentId}/status
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.updateDeploymentStatus(
    '<SITE_ID>', // siteId
    '<DEPLOYMENT_ID>' // deploymentId
);

Delete deployment

Delete a site deployment by its unique ID.

  • Request
    • siteId string
      required

      Site ID.

    • deploymentId string
      required

      Deployment ID.

  • Response
    • 204 application/json
Endpoint
DELETE /sites/{siteId}/deployments/{deploymentId}
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.deleteDeployment(
    '<SITE_ID>', // siteId
    '<DEPLOYMENT_ID>' // deploymentId
);

Get log

Get a site request log by its unique ID.

  • Request
    • siteId string
      required

      Site ID.

    • logId string
      required

      Log ID.

  • Response
Endpoint
GET /sites/{siteId}/logs/{logId}
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.getLog(
    '<SITE_ID>', // siteId
    '<LOG_ID>' // logId
);

List logs

Get a list of all site logs. You can use the query params to filter your results.

  • Request
    • siteId string
      required

      Site ID.

    • queries string

      Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId

  • Response
Endpoint
GET /sites/{siteId}/logs
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.listLogs(
    '<SITE_ID>', // siteId
    [] // queries (optional)
);

Delete log

Delete a site log by its unique ID.

  • Request
    • siteId string
      required

      Site ID.

    • logId string
      required

      Log ID.

  • Response
    • 204 application/json
Endpoint
DELETE /sites/{siteId}/logs/{logId}
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.deleteLog(
    '<SITE_ID>', // siteId
    '<LOG_ID>' // logId
);

Create variable

Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.

  • Request
    • siteId string
      required

      Site unique ID.

    • key string
      required

      Variable key. Max length: 255 chars.

    • value string
      required

      Variable value. Max length: 8192 chars.

    • secret boolean

      Secret variables can be updated or deleted, but only sites can read them during build and runtime.

  • Response
Endpoint
POST /sites/{siteId}/variables
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.createVariable(
    '<SITE_ID>', // siteId
    '<KEY>', // key
    '<VALUE>', // value
    false // secret (optional)
);

Get variable

Get a variable by its unique ID.

  • Request
    • siteId string
      required

      Site unique ID.

    • variableId string
      required

      Variable unique ID.

  • Response
Endpoint
GET /sites/{siteId}/variables/{variableId}
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.getVariable(
    '<SITE_ID>', // siteId
    '<VARIABLE_ID>' // variableId
);

List variables

Get a list of all variables of a specific site.

  • Request
    • siteId string
      required

      Site unique ID.

  • Response
Endpoint
GET /sites/{siteId}/variables
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.listVariables(
    '<SITE_ID>' // siteId
);

Update variable

Update variable by its unique ID.

  • Request
    • siteId string
      required

      Site unique ID.

    • variableId string
      required

      Variable unique ID.

    • key string
      required

      Variable key. Max length: 255 chars.

    • value string

      Variable value. Max length: 8192 chars.

    • secret boolean

      Secret variables can be updated or deleted, but only sites can read them during build and runtime.

  • Response
Endpoint
PUT /sites/{siteId}/variables/{variableId}
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.updateVariable(
    '<SITE_ID>', // siteId
    '<VARIABLE_ID>', // variableId
    '<KEY>', // key
    '<VALUE>', // value (optional)
    false // secret (optional)
);

Delete variable

Delete a variable by its unique ID.

  • Request
    • siteId string
      required

      Site unique ID.

    • variableId string
      required

      Variable unique ID.

  • Response
    • 204 application/json
Endpoint
DELETE /sites/{siteId}/variables/{variableId}
Node.js
const sdk = require('node-appwrite');

const client = new sdk.Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<YOUR_PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>'); // Your secret API key

const sites = new sdk.Sites(client);

const result = await sites.deleteVariable(
    '<SITE_ID>', // siteId
    '<VARIABLE_ID>' // variableId
);