---
title: "putProjectVars"
method: PUT
path: "/platform/projects/{id}/vars"
tags: ["Platform"]
---

# putProjectVars

`PUT /platform/projects/{id}/vars`

## Request

- Base URL: `https://api.imprezahost.com/v1`
- URL: `https://api.imprezahost.com/v1/platform/projects/{id}/vars`
- Auth: API key in header `X-API-Key` and API key in header `X-API-Secret`

Deploy scope. Replace the WHOLE group: vars are stored readable, secrets are sealed (AES-GCM) and never returned again; each name goes in exactly one of the two. Platform-managed names (DOMAIN, HOST_PORT, DATABASE_URL and the other routing/resource keys) are refused. Empty vars and secrets deletes the group. Values resolve project → environment → app on each app's NEXT deploy; running containers are untouched and nothing is written into an app's own stored variables. With base_revision, a group written since that revision is refused with 409 REVISION_CONFLICT and nothing is written. The exact value __IMPREZA_KEEP__ keeps the stored value of that name, in the map it is stored in; a marker with nothing to keep fails with 409 KEEP_TARGET_MISSING. Limits apply to the stored values, kept ones included.

## Path parameters

- `id` string, required

## Request body

- object
  - `vars` object: NAME: value pairs, stored readable. At most 100 names per group, 32 KiB per value, 128 KiB total. Values are one line of UTF-8 text without control characters, `$` or ` #`; COMPOSE_* and DOCKER_* names are refused.
  - `secrets` object: NAME: value pairs, sealed; names only ever come back.
  - `base_revision` integer: The revision a read returned; refuses the write if the group changed since

## Response `200`

The group after the write

## Other responses

- `400`: Invalid input (reserved name
- `403`: Required scope missing
- `404`: Resource or current ownership unavailable
- `409`: REVISION_CONFLICT (the group changed since base_revision), KEEP_TARGET_MISSING (the keep marker names no stored value), or another project operation is active
- `503`: Storage unavailable; read before retrying

---

[API](https://skmtc.dev/imprezahost/apis/impreza-host-public-api.md) · [All operations](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/revisions/db86511f604f?raw)
