# List source webhooks

```http
GET /projects/{project_reference}/source-webhooks
```

List the webhooks declared in the source files of a project, a branch or an environment to see what a deployment creates; returns the declared webhooks, the discovery diagnostics and the source files that could not be read, without pagination. Requires project.agents.read.

## Parameters

| Name                    | In    | Required | Description                                                                                                                  |
| ----------------------- | ----- | -------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `project_reference`     | path  | Yes      |                                                                                                                              |
| `runtime_target_kind`   | query |          | Runtime target: main\_branch, environment or preview\_branch. Must match source\_target\_kind when both are sent.            |
| `target_environment_id` | query |          | Environment id, for the environment source target.                                                                           |
| `target_branch_id`      | query |          | Branch id, for the preview\_branch source target.                                                                            |
| `source_target_kind`    | query |          | Source to read: project, main\_branch, environment or preview\_branch. Defaults to runtime\_target\_kind, then main\_branch. |

## Responses

| Status | Description                                                                                                |
| ------ | ---------------------------------------------------------------------------------------------------------- |
| 200    | Webhooks declared in project source                                                                        |
| 400    | invalid\_input: invalid source selection                                                                   |
| 401    | unauthenticated                                                                                            |
| 403    | forbidden: a project member without project.agents.read                                                    |
| 404    | not\_found: project or source target not found or not visible                                              |
| 500    | internal                                                                                                   |
| 503    | internal: authentication state is temporarily unavailable and the request was not processed; retry shortly |
