v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
actions

Create a GitHub-hosted runner for an enterprise

Creates a GitHub-hosted runner for an enterprise. OAuth tokens and personal access tokens (classic) need the manage_runners:enterprise scope to use this endpoint.

post/enterprises/{enterprise}/actions/hosted-runners

Path parameters

enterprisestring required

The slug version of the enterprise name.

Request body

namestring required

Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'.

sizestring required

The machine size of the runner. To list available sizes, use GET actions/hosted-runners/machine-sizes

runner_group_idinteger required

The existing runner group to add this runner to.

maximum_runnersinteger

The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost.

enable_static_ipboolean

Whether this runner should be created with a static public IP. Note limit on account. To list limits on account, use GET actions/hosted-runners/limits

image_genboolean

Whether this runner should be used to generate custom images.

Response

Response

idinteger required

The unique identifier of the hosted runner.

namestring required

The name of the hosted runner.

runner_group_idinteger

The unique identifier of the group that the hosted runner belongs to.

status'Ready' | 'Provisioning' | 'Shutdown' | 'Deleting' | 'Stuck' required

The status of the runner.

platformstring required

The operating system of the image.

maximum_runnersinteger

The maximum amount of hosted runners. Runners will not scale automatically above this number. Use this setting to limit your cost.

public_ip_enabledboolean required

Whether public IP is enabled for the hosted runners.

last_active_onstring date-time nullable

The time at which the runner was last used, in ISO 8601 format.

image_genboolean

Whether custom image generation is enabled for the hosted runners.

Example response

{
  "id": 5,
  "name": "my-github-hosted-runner",
  "runner_group_id": 2,
  "image_details": {
    "id": "ubuntu-20.04",
    "size_gb": 86,
    "version": "latest"
  },
  "machine_size_details": {
    "id": "8-core",
    "cpu_cores": 8,
    "memory_gb": 32,
    "storage_gb": 300
  },
  "status": "Ready",
  "platform": "linux-x64",
  "maximum_runners": 5,
  "public_ip_enabled": true,
  "public_ips": [
    {
      "enabled": true,
      "prefix": "20.80.208.150",
      "length": 28
    }
  ],
  "last_active_on": "2022-10-09T23:39:01Z"
}