# webhook

```graphql
query Webhook($projectReference: ID!, $webhookId: ID!) {
  webhook(projectReference: $projectReference, webhookId: $webhookId) {
    id
    projectId
    name
    source
    target {
      kind
      id
      conversationMode
      conversationId
    }
    promptTemplate
    eventFilter {
      mode
    }
    status
    runtimeTargetKind
    runtimeTargetEnvironmentId
    runtimeTargetBranchId
    definitionSource
    sourceTriggerId
    sourcePath
    sourceHash
    ingressId
    webhookUrl
    createdByUserId
    enabledAt
    disabledAt
    disabledReason
    createdAt
    updatedAt
  }
}
```

Read one webhook by its ID to inspect its target, prompt template, event filter and status; returns the webhook with its public URL and never its secret. Requires project.agents.read.

## Arguments

| Name               | Type | Required | Description                                              |
| ------------------ | ---- | -------- | -------------------------------------------------------- |
| `projectReference` | ID!  | Yes      | Project UUID or slug.                                    |
| `webhookId`        | ID!  | Yes      | The webhook id. A missing webhook fails with not\_found. |

## Variables

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

## Responses

| Status | Description                   |
| ------ | ----------------------------- |
| 200    | The Webhook! in data.webhook. |

## 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 Webhook($projectReference: ID!, $webhookId: ID!) {\n  webhook(projectReference: $projectReference, webhookId: $webhookId) {\n    id\n    projectId\n    name\n    source\n    target {\n      kind\n      id\n      conversationMode\n      conversationId\n    }\n    promptTemplate\n    eventFilter {\n      mode\n    }\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}",
  "variables": {
    "projectReference": "string",
    "webhookId": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "webhook": {
      "id": "string",
      "projectId": "string",
      "name": "string",
      "source": "string",
      "target": {
        "kind": "agent",
        "id": "string",
        "conversationMode": "create_new",
        "conversationId": "string"
      },
      "promptTemplate": "string",
      "eventFilter": {
        "mode": "all"
      },
      "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"
    }
  }
}
```
