---
title: "Put Env Value"
method: PUT
path: "/apps/{app_id}/env/{key}"
---

# Put Env Value

`PUT /apps/{app_id}/env/{key}`

## Request

- Base URL: `https://api.xhostd.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xhostd.com/apps/{app_id}/env/{key}`
- Auth: none declared

Store one env value from the raw request body.

The upload path for a secret: the value travels from the caller's
file straight here, never through an MCP tool call, and
``set_secret`` describes this request (design/CONTROL-PLANE.md, the
env surface). ``kind`` defaults to ``secret`` and never keeps an
existing kind.

## Path parameters

- `app_id` string, uuid, required
- `key` string, required

## Query parameters

- `kind` 'env' | 'secret'
- `channel_id` string, uuid, nullable

## Headers

- `authorization` string, nullable

## Response `204`

Successful Response

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xhostd/apis/xhostd-public.md) · [All operations](https://skmtc.dev/xhostd/apis/xhostd-public/llms.txt) · [OpenAPI document](https://skmtc.dev/xhostd/apis/xhostd-public/revisions/bf439c4d1789?raw)
