v56

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

Update a GitHub-hosted runner for an enterprise

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

patch/enterprises/{enterprise}/actions/hosted-runners/{hosted_runner_id}

Path parameters

enterprisestring required

The slug version of the enterprise name.

hosted_runner_idinteger required

Unique identifier of the GitHub-hosted runner.

Request body

namestring

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 '_'.

runner_group_idinteger

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 updated with a static public IP. Note limit on account. To list limits on account, use GET actions/hosted-runners/limits

sizestring

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

image_source'github' | 'partner' | 'custom'

The source type of the runner image to use. Must match the source of the image specified by image_id. Can be one of github, partner, or custom.

image_idstring

The unique identifier of the runner image. To list available images, use GET /actions/hosted-runners/images/github-owned, GET /actions/hosted-runners/images/partner, or GET /actions/hosted-runners/images/custom.

image_versionstring nullable

The version of the runner image to deploy. This is relevant only for runners using custom images.

image_genboolean

Whether to enable image generation for this runner pool. When enabled, the runner pool is used to build and publish custom runner 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"
}