---
title: "Set environment variables"
method: PUT
path: "/api/projects/{projectName}/apps/{appName}/env"
tags: ["env"]
---

# Set environment variables

`PUT /api/projects/{projectName}/apps/{appName}/env`

## Request

- Base URL: `https://api.hostim.dev`
- URL: `https://api.hostim.dev/api/projects/{projectName}/apps/{appName}/env`
- Auth: HTTP bearer

Set environment variables

## Path parameters

- `projectName` string, required
- `appName` string, required

## Request body

- EnvVar[]
  - `name` string, required: The env var name
  - `value` string, required: The env var value

## Response `200`

Environment variables updated

- GenericMessage
  - `error` string, required
  - `message` string, required

## Other responses

- `401`: User is not authorized
- `404`: App not found
- `500`: Internal server error

---

[API](https://skmtc.dev/hostim/apis/hostim-api.md) · [All operations](https://skmtc.dev/hostim/apis/hostim-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostim/apis/hostim-api/revisions/37c35e1026a9?raw)
