# webhooks

```graphql
query Webhooks($projectReference: ID!) {
  webhooks(projectReference: $projectReference) {
    data {
      id
      projectId
      name
      source
      promptTemplate
      status
      runtimeTargetKind
      runtimeTargetEnvironmentId
      runtimeTargetBranchId
      definitionSource
      sourceTriggerId
      sourcePath
      sourceHash
      ingressId
      webhookUrl
      createdByUserId
      enabledAt
      disabledAt
      disabledReason
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List the webhooks stored for a project, newest first, to find a webhook or its public URL; returns one page of webhooks, or every webhook when neither a limit nor a cursor is sent. Requires project.agents.read.

## Arguments

| Name               | Type             | Required | Description                                                                                    |
| ------------------ | ---------------- | -------- | ---------------------------------------------------------------------------------------------- |
| `projectReference` | ID!              | Yes      | Project UUID or slug.                                                                          |
| `input`            | WebhooksInput    |          |                                                                                                |
| `input.limit`      | Int              |          | Maximum webhooks to return, 1 to 100. Without limit and cursor every webhook is returned.      |
| `input.cursor`     | ID               |          | The previous page's pageInfo.endCursor. Keep sortOrder the same across pages.                  |
| `input.sortOrder`  | WebhookSortOrder |          | Creation order; default desc (newest first). Ties break by id ascending. One of `asc`, `desc`. |

## Variables

```json
{
  "projectReference": "string"
}
```

## Responses

| Status | Description                        |
| ------ | ---------------------------------- |
| 200    | The WebhookPage! in data.webhooks. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query Webhooks($projectReference: ID!) {\n  webhooks(projectReference: $projectReference) {\n    data {\n      id\n      projectId\n      name\n      source\n      promptTemplate\n      status\n      runtimeTargetKind\n      runtimeTargetEnvironmentId\n      runtimeTargetBranchId\n      definitionSource\n      sourceTriggerId\n      sourcePath\n      sourceHash\n      ingressId\n      webhookUrl\n      createdByUserId\n      enabledAt\n      disabledAt\n      disabledReason\n      createdAt\n      updatedAt\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}",
  "variables": {
    "projectReference": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "webhooks": {
      "data": [
        {
          "id": "string",
          "projectId": "string",
          "name": "string",
          "source": "string",
          "promptTemplate": "string",
          "status": "draft",
          "runtimeTargetKind": "main_branch",
          "runtimeTargetEnvironmentId": "string",
          "runtimeTargetBranchId": "string",
          "definitionSource": "manual",
          "sourceTriggerId": "string",
          "sourcePath": "string",
          "sourceHash": "string",
          "ingressId": "string",
          "webhookUrl": "https://example.com",
          "createdByUserId": "string",
          "enabledAt": "2026-01-01T00:00:00Z",
          "disabledAt": "2026-01-01T00:00:00Z",
          "disabledReason": "string",
          "createdAt": "2026-01-01T00:00:00Z",
          "updatedAt": "2026-01-01T00:00:00Z"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
