# Enable a workflow

From **GitHub v3 REST API**.

`PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable`

Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.

You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.

## Parameters

### `owner`

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

### `repo`

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

### `workflow_id`

- Location: path
- Required: true
The ID of the workflow. You can also pass the workflow file name as a string.

## Responses

### `204`

Response

## Request examples

### cURL

```shell
curl --request PUT \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable
```
