---
title: "Create an org-level variable"
method: POST
path: "/orgs/{org}/actions/variables/{variablename}"
tags: ["organization"]
---

# Create an org-level variable

`POST /orgs/{org}/actions/variables/{variablename}`

## Path parameters

- `org` string, required
- `variablename` string, required

## Request body

- CreateVariableOption — CreateVariableOption the option when creating variable
  - `description` string — Description of the variable to create
  - `value` string, required — Value of the variable to create

## Response `201`

successfully created the org-level variable

## Other responses

- `400` — APIError is error format response
- `409` — variable name already exists.
- `500` — APIError is error format response

---

[API](https://skmtc.net/gitea/apis/gitea-api.md) · [All operations](https://skmtc.net/gitea/apis/gitea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitea/gitea-api/revisions/350de506cefa/schema)
