---
title: "Create Environment Shared Env"
method: POST
path: "/projects/{uuid}/environments/{environment_name_or_uuid}/envs"
tags: ["Shared Environment Variables"]
---

# Create Environment Shared Env

`POST /projects/{uuid}/environments/{environment_name_or_uuid}/envs`

## Request

- Base URL: `https://app.coolify.io/api/v1`
- URL: `https://app.coolify.io/api/v1/projects/{uuid}/environments/{environment_name_or_uuid}/envs`
- Auth: HTTP bearer

Create a shared environment variable for a project environment (type=environment).

## Path parameters

- `uuid` string, required
- `environment_name_or_uuid` string, required

## Response `201`

Environment variable created.

## Other responses

- `401`: Unauthenticated.
- `404`: Resource not found.
- `409`: Environment variable already exists.
- `422`: Validation error.

## Changes

- **2026-07-22** `71a39cd460a7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/coollabsio/apis/coolify/changes/projects/:uuid/environments/:environment_name_or_uuid/envs/post.md)

---

[API](https://skmtc.dev/coollabsio/apis/coolify.md) · [All operations](https://skmtc.dev/coollabsio/apis/coolify/llms.txt) · [OpenAPI document](https://skmtc.dev/coollabsio/apis/coolify/revisions/fc2fe5e3d473?raw)
