---
title: "Replace all stored variables of a profile; returns the variable names only."
method: POST
path: "/v1/profiles/{id}/variables"
---

# Replace all stored variables of a profile; returns the variable names only.

`POST /v1/profiles/{id}/variables`

## Request

- Base URL: `http://127.0.0.1:10108`
- URL: `http://127.0.0.1:10108/v1/profiles/{id}/variables`
- Auth: HTTP bearer

Replaces every stored variable of this profile with the ones given; variables not in the body are deleted. Values may be secrets: they are never returned, only the names.

## Path parameters

- `id` string, required

## Request body

- object
  - `variables` object, required

## Response `200`

The variable names now stored, sorted. Values are never returned.

- object
  - `profile_id` string, uuid, required
  - `variable_names` string[], required

## Other responses

- `400`: The id is not a uuid, or a name is not UPPER_SNAKE_CASE, a value is over 32 KiB, or there are more than 64.
- `401`: No bearer token, or not a token this app issued. The body is empty: it never says which.
- `403`: Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.
- `404`: No profile with this id.
- `500`: Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

---

[API](https://skmtc.dev/veilus/apis/veilus-local-api.md) · [All operations](https://skmtc.dev/veilus/apis/veilus-local-api/llms.txt) · [OpenAPI document](https://skmtc.dev/veilus/apis/veilus-local-api/revisions/67ac3818f9d2?raw)
