Create webhook

createWebhook(input: CreateWebhookInput!): CreateWebhookPayload!

Requires project.agents.write.

Arguments

ArgumentTypeRequired
inputCreateWebhookInput!Yes

Input fields

input

CreateWebhookInput

FieldTypeRequired
projectReferenceStringNo
nameString!Yes
targetWebhookTargetInput!Yes
promptTemplateStringNo
eventFilterWebhookEventFilterInputNo

Response

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

FieldTypeDescription
webhookWebhookDefinition!
webhookSecretString!Secret for the X-Veryfront-Webhook-Secret header. Returned only once, on create.

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

Example

graphql
mutation CreateWebhook($input: CreateWebhookInput!) {
  createWebhook(input: $input) {
    webhookSecret
  }
}
json
{
  "input": {
    "name": "example",
    "target": {
      "kind": "agent",
      "id": "example"
    },
    "projectReference": "example-project"
  }
}