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

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

`PUT /enterprises/{enterprise}/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 enterprise.

You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.

## Path parameters

- `enterprise` 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/github-v3-rest-api-6.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-6/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-6/versions/15db3fa0759b/schema)
