Get webhook

webhook(projectReference: ID!, webhookId: ID!): Webhook!

Requires project.agents.read.

Arguments

ArgumentTypeRequiredDescription
projectReferenceID!YesProject UUID or slug.
webhookIdID!YesThe webhook id. A missing webhook fails with not_found.

Response

Returns Webhook!. Open the type for its fields and nested types.

FieldTypeDescription
idID!The webhook id. Pass it as webhookId to the other webhook operations.
projectIdID!
nameString!
sourceString!Always webhook.
targetWebhookTarget!
promptTemplateStringPrompt template for run targets; null for an event-only webhook.
eventFilterWebhookEventFilterFilter a delivery must match to run the target; null means always.
statusWebhookStatus!

All fields of Webhook.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
query Webhook($projectReference: ID!, $webhookId: ID!) {
  webhook(projectReference: $projectReference, webhookId: $webhookId) {
    id
    projectId
    name
    status
    createdAt
  }
}
json
{
  "projectReference": "00000000-0000-4000-8000-000000000001",
  "webhookId": "00000000-0000-4000-8000-000000000001"
}