---
title: "Get an organization variable"
method: GET
path: "/orgs/{org}/agents/variables/{name}"
tags: ["agents"]
---

# Get an organization variable

`GET /orgs/{org}/agents/variables/{name}`

Gets a specific agent variable in an organization.

The authenticated user must have collaborator access to a repository to create, update, or read variables.

OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

## Path parameters

- `org` string, required
- `name` string, required

## Response `200`

Response

- OrganizationActionsVariable — Organization variable for GitHub Actions.
  - `name` string, required — The name of the variable.
  - `value` string, required — The value of the variable.
  - `created_at` string, date-time, required — The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.
  - `updated_at` string, date-time, required — The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.
  - `visibility` 'all' | 'private' | 'selected', required — Visibility of a variable
  - `selected_repositories_url` string, uri

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
