Docs

Update Deployment Environment Variables

PATCH
/v1/deployments/{id}/environment-variables

Replace a deployment's advanced environment variables. Stack-input-backed variables are write-only through the input endpoint. If the deployment is running and not locked, the status will be changed to update-pending to trigger a deployment.

Authorization

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Unique identifier for the deployment.

Matchdep_[0-9a-z]{28}$

Query Parameters

workspace?string

Workspace name or ID. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must identify the key's workspace.

Match^(?:ws_[0-9a-zA-Z]{24}|(?!ws[-_])[a-z0-9](-?[a-z0-9])*)$
Length4 <= length <= 100

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request schema for updating deployment environment variables

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/deployments/dep_0c29fq4a2yjb7kx3smwdgxlc/environment-variables" \  -H "Content-Type: application/json" \  -d '{    "variables": [      {        "name": "string",        "value": "string",        "type": "plain"      }    ]  }'
{  "message": "string"}