GitHub Actions Variables API

Create and manage workflow variables

Operations 5

GET /repos/{owner}/{repo}/actions/variables Github Actions List Repository Variables #
POST /repos/{owner}/{repo}/actions/variables Github Actions Create a Repository Variable #
GET /repos/{owner}/{repo}/actions/variables/{name} Github Actions Get a Repository Variable #
PATCH /repos/{owner}/{repo}/actions/variables/{name} Github Actions Update a Repository Variable #
DELETE /repos/{owner}/{repo}/actions/variables/{name} Github Actions Delete a Repository Variable #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/github-actions-variables-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

github-actions-variables-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitHub Actions Artifacts Variables API
  description: REST API for managing GitHub Actions workflows, runs, artifacts, secrets, runners, caches, variables, permissions, and OIDC.
  version: 1.0.0
  contact:
    name: GitHub Support
    url: https://support.github.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: https://api.github.com
  description: GitHub REST API
security:
- bearerAuth: []
- personalAccessToken: []
tags:
- name: Variables
  description: Create and manage workflow variables
paths:
  /repos/{owner}/{repo}/actions/variables:
    get:
      operationId: listRepoVariables
      summary: Github Actions List Repository Variables
      description: Lists all repository variables.
      tags:
      - Variables
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/perPage'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Successfully retrieved variables
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                  variables:
                    type: array
                    items:
                      $ref: '#/components/schemas/ActionsVariable'
              examples:
                Listrepovariables200Example:
                  summary: Default listRepoVariables 200 response
                  x-microcks-default: true
                  value:
                    total_count: 10
                    variables:
                    - name: Example Title
                      value: example_value
                      created_at: '2026-01-15T10:30:00Z'
                      updated_at: '2026-01-15T10:30:00Z'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createRepoVariable
      summary: Github Actions Create a Repository Variable
      description: Creates a repository variable that you can reference in a GitHub Actions workflow.
      tags:
      - Variables
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - value
              properties:
                name:
                  type: string
                value:
                  type: string
            examples:
              CreaterepovariableRequestExample:
                summary: Default createRepoVariable request
                x-microcks-default: true
                value:
                  name: Example Title
                  value: example_value
      responses:
        '201':
          description: Successfully created variable
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/actions/variables/{name}:
    get:
      operationId: getRepoVariable
      summary: Github Actions Get a Repository Variable
      description: Gets a specific variable in a repository.
      tags:
      - Variables
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/variableName'
      responses:
        '200':
          description: Successfully retrieved variable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionsVariable'
              examples:
                Getrepovariable200Example:
                  summary: Default getRepoVariable 200 response
                  x-microcks-default: true
                  value:
                    name: Example Title
                    value: example_value
                    created_at: '2026-01-15T10:30:00Z'
                    updated_at: '2026-01-15T10:30:00Z'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      operationId: updateRepoVariable
      summary: Github Actions Update a Repository Variable
      description: Updates a repository variable that you can reference in a GitHub Actions workflow.
      tags:
      - Variables
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/variableName'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                value:
                  type: string
            examples:
              UpdaterepovariableRequestExample:
                summary: Default updateRepoVariable request
                x-microcks-default: true
                value:
                  name: Example Title
                  value: example_value
      responses:
        '204':
          description: Successfully updated variable
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: deleteRepoVariable
      summary: Github Actions Delete a Repository Variable
      description: Deletes a repository variable using the variable name.
      tags:
      - Variables
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/variableName'
      responses:
        '204':
          description: Successfully deleted variable
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  parameters:
    owner:
      name: owner
      in: path
      required: true
      schema:
        type: string
      description: The account owner of the repository.
    variableName:
      name: name
      in: path
      required: true
      schema:
        type: string
      description: The name of the variable.
    page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
      description: The page number of the results to fetch.
    perPage:
      name: per_page
      in: query
      schema:
        type: integer
        default: 30
        maximum: 100
      description: The number of results per page (max 100).
    repo:
      name: repo
      in: path
      required: true
      schema:
        type: string
      description: The name of the repository without the .git extension.
  schemas:
    ActionsVariable:
      type: object
      properties:
        name:
          type: string
          description: The name of the variable.
          example: Example Title
        value:
          type: string
          description: The value of the variable.
          example: example_value
        created_at:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: GitHub personal access token or OAuth token
    personalAccessToken:
      type: http
      scheme: bearer
      description: Fine-grained personal access token with Actions permissions