Unbind
Variables

Create or Update Variables

Upsert variables by key for a service, environment, project, or team. Values may contain ${{service.<id>.KEY}}, ${{team.KEY}}, ${{project.KEY}} and ${{environment.KEY}} references. A service's protected_variables, such as database credentials, are managed by Unbind and cannot be changed.

POST
/variables/update

Upsert variables by key for a service, environment, project, or team. Values may contain ${{service..KEY}}, ${{team.KEY}}, ${{project.KEY}} and ${{environment.KEY}} references. A service's protected_variables, such as database credentials, are managed by Unbind and cannot be changed.

Authorization

bearerAuth
AuthorizationBearer <token>

Access token or API key (unb_...) passed as Authorization: Bearer <token>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

behavior*VariableUpdateBehavior

The behavior of the update - upsert or overwrite

Default"upsert"

Value in

  • "upsert"
  • "overwrite"
environment_id?string

If present without service_id, mutate environment variables - requires project_id

Formatuuid
project_id?string

If present without environment_id, mutate team variables

Formatuuid
service_id?string

If present, mutate service variables - requires project_id and environment_id

Formatuuid
team_id*string
Formatuuid
type*VariableReferenceSourceType

The type of variable

Value in

  • "team"
  • "project"
  • "environment"
  • "service"
variables*array<>|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/variables/update" \  -H "Content-Type: application/json" \  -d '{    "behavior": "upsert",    "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",    "type": "team",    "variables": [      {        "name": "string",        "value": "string"      }    ]  }'
{  "data": {    "values_redacted": true,    "variables": [      {        "name": "string",        "provided": true,        "references": [          {            "key": "string",            "resolved": true,            "resolved_value": "string",            "source_icon": "string",            "source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81",            "source_name": "string",            "source_type": "team",            "token": "string"          }        ],        "resolved_value": "string",        "type": "team",        "updates": [          "string"        ],        "value": "string"      }    ]  }}