---
title: "Set custom labels for a self-hosted runner for an organization"
method: PUT
path: "/orgs/{org}/actions/runners/{runner_id}/labels"
tags: ["actions"]
---

# Set custom labels for a self-hosted runner for an organization

`PUT /orgs/{org}/actions/runners/{runner_id}/labels`

Remove all previous custom labels and set the new custom labels for a specific
self-hosted runner configured in an organization.

Authenticated users must have admin access to the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

## Path parameters

- `org` string, required
- `runner_id` integer, required

## Request body

- object
  - `labels` string[], required — The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels.

## Response `200`

Response

- object
  - `total_count` integer, 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.

## Other responses

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

---

[API](https://skmtc.net/github/apis/api-github-com.md) · [All operations](https://skmtc.net/github/apis/api-github-com/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/api-github-com/revisions/a367f7028301/schema)
