---
title: "Set global environment variables"
method: PUT
path: "/api/projects/{projectName}/globalenv"
tags: ["globalenv"]
---

# Set global environment variables

`PUT /api/projects/{projectName}/globalenv`

## Request

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

Set global environment variables

## Path parameters

- `projectName` string, required

## Request body

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

## Response `200`

Global environment variables updated

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

## Other responses

- `401`: User is not authorized
- `404`: Project 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)
