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

# Update an org-level variable

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

## Path parameters

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

## Request body

- UpdateVariableOption — UpdateVariableOption the option when updating variable
  - `description` string — Description of the variable to update
  - `name` string — New name for the variable. If the field is empty, the variable name won't be updated.
  - `value` string, required — Value of the variable to update

## Response `201`

response when updating an org-level variable

## Other responses

- `204` — response when updating an org-level variable
- `400` — APIError is error format response
- `404` — APINotFound is a not found empty 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)
