# Read workflow source

```http
GET /projects/{project_reference}/workflows/{workflow_id}/source
```

Read the editable source behind one workflow before changing it; returns the workflow source document with its source text, edit mode and the reasons it can only be edited as source. Requires project.runs.read.

## Parameters

| Name                    | In    | Required | Description                                                          |
| ----------------------- | ----- | -------- | -------------------------------------------------------------------- |
| `project_reference`     | path  | Yes      | Project slug, UUID, or domain that identifies the project.           |
| `workflow_id`           | path  | Yes      | Workflow ID from list\_workflows                                     |
| `source_target_kind`    | query |          |                                                                      |
| `target_branch_id`      | query |          |                                                                      |
| `runtime_target_kind`   | query |          | Used as the source target kind when source\_target\_kind is omitted. |
| `target_environment_id` | query |          | Not supported for source reads; a non-null value is rejected.        |

## Responses

| Status | Description       |
| ------ | ----------------- |
| 200    | Workflow document |
| 400    | Bad request       |
| 401    | Unauthorized      |
| 403    | Forbidden         |
| 404    | Not found         |
