Docs

Delete a variable

DELETE
/variables/{variable_name}

Removes a variable for the requested kind, or for both kinds without kind. A name with no value for that kind answers var.not_found. Existing deployments keep the values they froze.

Authorization

oauth2 variable.write
headerAuthorizationBearer <token>

Scope: variable.write

Path Parameters

variable_name*string

The name of the variable.

Match^\w+$
Length1 <= length <= 255

Query Parameters

project_id*string

The unique identifier of the project

Match^[a-zA-Z0-9_-]+$
kind?string

The kind of value to address. Omit it for both kinds.

Value in"primary""preview"

Response Body

The variable was deleted.

Example Request
import { createZitadelClient } from "@zitadel/api/client";const client = createZitadelClient({  baseUrl: process.env.ZITADEL_URL ?? "http://localhost:8080",  token: process.env.ZITADEL_PROJECT_SECRET!, // server-side only});await client.deleteVariable("GITHUB_CLIENT_ID", { project_id: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" });
Example Response
Empty

Was this helpful?