---
title: "Update config variables for an environment"
method: PATCH
path: "/v1/agents/{agentId}/real-time-configs/{clientEnv}/variables"
tags: ["Real-Time Configs"]
---

# Update config variables for an environment

`PATCH /v1/agents/{agentId}/real-time-configs/{clientEnv}/variables`

## Request body

- UpdateConfigVariablesBody — Variables to shallow-merge into an environment's config page.
  - `variables` object, required — Key-value pairs to merge into the existing config

## Response `200`

Successful response

- GetConfigPageResponse — A single config page for one environment.
  - `clientEnv` string, required — Environment (sandbox, pre-release, live)
  - `variables` object — Config key-value pairs
  - `schema` object — JSON Schema (Draft 7) definition
  - `lastUpdated` string — ISO 8601 timestamp of last update

## Other responses

- `400` — Validation error
- `401` — Unauthorized – missing or invalid API key
- `403` — Forbidden – insufficient permissions
- `404` — Resource not found

---

[API](https://skmtc.net/poly/apis/polyai-agents-api.md) · [All operations](https://skmtc.net/poly/apis/polyai-agents-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/poly/polyai-agents-api/revisions/76f3c606e395/schema)
