---
title: "Create configuration for a just-in-time runner for a repository"
method: POST
path: "/repos/{owner}/{repo}/actions/runners/generate-jitconfig"
tags: ["actions"]
---

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

`POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig`

Generates a configuration that can be passed to the runner application at startup.

The authenticated user must have admin access to the repository.

OAuth tokens and personal access tokens (classic) need the`repo` scope to use this endpoint.

## Path parameters

- `owner` string, required
- `repo` string, required

## Request body

- object
  - `name` string, required — The name of the new runner.
  - `runner_group_id` integer, required — The ID of the runner group to register the runner to.
  - `labels` string[], required — The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100.
  - `work_folder` string — The working directory to be used for job execution, relative to the runner install directory.

## Response `201`

Response

- object
  - `runner` Runner, required — A self hosted runner
    - `id` integer, required — The ID of the runner.
    - `runner_group_id` integer — The ID of the runner group.
    - `name` string, required — The name of the runner.
    - `os` string, required — The Operating System of the runner.
    - `status` string, required — The status of the runner.
    - `busy` boolean, required
    - `labels` RunnerLabel[], required
      - `id` integer — Unique identifier of the label.
      - `name` string, required — Name of the label.
      - `type` 'read-only' | 'custom' — The type of label. Read-only labels are applied automatically when the runner is configured.
    - `ephemeral` boolean
    - `version` string, nullable — The version of the GitHub Actions Runner software. This is only set if the runner has connected to the service at least once.
  - `encoded_jit_config` string, required — The base64 encoded runner configuration.

## Other responses

- `404` — Resource not found
- `409` — Conflict
- `422` — Validation failed, or the endpoint has been spammed.

---

[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)
