# Create a remove token for an enterprise

From **GitHub v3 REST API**.

`POST /enterprises/{enterprise}/actions/runners/remove-token`

Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour.

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

#### Example using remove token

To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this
endpoint.

```
./config.sh remove --token TOKEN
```

## Parameters

### `enterprise`

- Location: path
- Required: true
- Type: `string`

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

## Responses

### `201`

Response

### `application/json`

- Type: `object`

Authentication Token

```json
{
  "expires_at": "2020-01-29T12:13:35.123-08:00",
  "token": "AABF3JGZDX3P5PMEXLND6TS6FCWO6"
}
```

```json
{"description":"Authentication Token","properties":{"expires_at":{"description":"The time this token expires","example":"2016-07-11T22:14:10Z","format":"date-time","type":"string"},"permissions":{"example":{"deployments":"write","issues":"read"},"type":"object"},"repositories":{"description":"The repositories this token has access to","items":{"$ref":"#/components/schemas/repository"},"type":"array"},"repository_selection":{"description":"Describe whether all repositories have been selected or there's a selection involved","enum":["all","selected"],"type":"string"},"single_file":{"example":"config.yaml","nullable":true,"type":"string"},"token":{"description":"The token used for authentication","example":"v1.1f699f1069f60xxx","type":"string"}},"required":["token","expires_at"],"title":"Authentication Token","type":"object"}
```

## Request examples

### cURL

```shell
curl --request POST \
  --url {protocol}://{hostname}/api/v3/enterprises/{enterprise}/actions/runners/remove-token
```
