---
title: "Add Or Update Variables"
method: PUT
path: "/v1/accounts/{account_id}/environments/{environment_id}/variables"
tags: ["Variables", "MCP"]
---

# Add Or Update Variables

`PUT /v1/accounts/{account_id}/environments/{environment_id}/variables`

**Authorization scope:** `variables:edit` 
 
 **Add new variable or update existing one for environment**

---

### 📖 Instructions for usage

`upsert_variables`

```
Create or update variables in an environment.

Each item in variables should be: {"name": "VAR_NAME", "value": "some_value"}.

Returns {"updated": true, "count": N} (the upstream may return an empty body).
```

## Path parameters

- `account_id` string, required
- `environment_id` string, required

## Request body

- AddOrPatchVariablesInput — Variables input
  - `variables` object, required

## Response `201`

Successful Response

- VariablesResponse — List of variables response
  - `variables` object, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/rivery/apis/boomi-data-integration-api.md) · [All operations](https://skmtc.net/rivery/apis/boomi-data-integration-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rivery/boomi-data-integration-api/revisions/cc19ddc41c6e/schema)
