Create a webhook when an external service must start an agent, task or workflow run, or when its deliveries must only be stored as webhook events; returns the webhook and its secret, which is shown only once. Requires project.agents.write.
Arguments
inputCreateWebhookInput!requiredinput.projectReferenceStringinput.nameString!requiredinput.targetWebhookTargetInput!requiredinput.promptTemplateStringinput.eventFilterWebhookEventFilterInput
Responses
mutation CreateWebhook($input: CreateWebhookInput!) { createWebhook(input: $input) { webhook { id projectId name source promptTemplate status runtimeTargetKind runtimeTargetEnvironmentId runtimeTargetBranchId definitionSource sourceTriggerId sourcePath sourceHash ingressId webhookUrl createdByUserId enabledAt disabledAt disabledReason createdAt updatedAt } webhookSecret }}{ "data": { "createWebhook": { "webhook": { "id": "string", "projectId": "string", "name": "string", "source": "string", "promptTemplate": "string", "status": "draft", "runtimeTargetKind": "string", "runtimeTargetEnvironmentId": "string", "runtimeTargetBranchId": "string", "definitionSource": "string", "sourceTriggerId": "string", "sourcePath": "string", "sourceHash": "string", "ingressId": "string", "webhookUrl": "https://example.com", "createdByUserId": "string", "enabledAt": "string", "disabledAt": "string", "disabledReason": "string", "createdAt": "string", "updatedAt": "string" }, "webhookSecret": "string" } }}The CreateWebhookPayload! in data.createWebhook.