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.
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 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.
The behavior of the update - upsert or overwrite
"upsert"Value in
- "upsert"
- "overwrite"
If present without service_id, mutate environment variables - requires project_id
uuidIf present without environment_id, mutate team variables
uuidIf present, mutate service variables - requires project_id and environment_id
uuiduuidThe type of variable
Value in
- "team"
- "project"
- "environment"
- "service"
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" } ] }}