apicheats.dev github/llms.txt Raw .md
POST

POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig — GitHub API

GitHub token (required); https://api.github.com

GitHub API

Create configuration for a just-in-time runner for a repository

Base URL
https://api.github.com
Auth
Authorization: Bearer <GITHUB_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 341 tokens · Vary: Accept

Critical gotchas

GitHub recommends an Accept: application/vnd.github+json header and an explicit X-GitHub-Api-Version header.

Fine-grained tokens only authorize repositories and permissions selected when the token is created.

cURL

curl -X POST 'https://api.github.com/repos/example-owner/example-repo/actions/runners/generate-jitconfig' \  -H "Authorization: Bearer $GITHUB_TOKEN" \  -H 'Accept: application/vnd.github+json' \  -H 'X-GitHub-Api-Version: 2026-03-10' \  -H 'Content-Type: application/json' \  -d '{  "name": "example-name",  "runner_group_id": 0,  "labels": [    "example-labels"  ]}'

Parameters

Name In Type Required Description
owner path string Yes The account owner of the repository. The name is not case sensitive.
repo path string Yes The name of the repository without the `.git` extension. The name is not case sensitive.
name body string Yes The name of the new runner.
runner_group_id body integer Yes The ID of the runner group to register the runner to.
labels body string[] Yes The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100.
work_folder body string No The working directory to be used for job execution, relative to the runner install directory.

Response 200 OK

{
  "runner": {
    "id": 5,
    "runner_group_id": 1,
    "name": "iMac",
    "os": "macos",
    "status": "online",
    "busy": true,
    "labels": [
      {
        "id": 0,
        "name": "string",
        "type": "read-only"
      }
    ],
    "ephemeral": true,
    "version": "2.323.0"
  },
  "encoded_jit_config": "string"
}
Get a free GitHub API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.