---
title: "Create an environment variable"
method: POST
path: "/branches/{branch_id}/env_vars"
tags: ["Management"]
---

# Create an environment variable

`POST /branches/{branch_id}/env_vars`

Create a new environment variable

## Path parameters

- `branch_id` integer, required

## Request body

- EnvVar
  - `name` string, required
  - `value` string, required

## Response `201`

Successfully created run

## Changes

- **2026-07-17** `1f2ae877f985` — 1 info
  - endpoint added
- **2021-01-31** `6dffc3a4de00` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/kraken-ci/apis/server-api/changes/branches/:branch_id/env_vars/post.md)

---

[API](https://skmtc.dev/kraken-ci/apis/server-api.md) · [All operations](https://skmtc.dev/kraken-ci/apis/server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kraken-ci/server-api/revisions/1f2ae877f985/schema)
