updateWebhook

Change the name, target, prompt template, event filter or status of a webhook, for example to enable or disable deliveries; returns the updated webhook. Requires project.agents.write.

Arguments

  • inputUpdateWebhookInput!required

  • input.projectReferenceString

  • input.idID!required

    Webhook definition id. A missing webhook fails with RESOURCE_NOT_FOUND. Updates require project.agents.write. When target is omitted, a stored conversation-backed target (create_new or existing conversation mode) still requires project.conversations.write.

  • input.nameString

  • input.targetWebhookTargetInput

  • input.promptTemplateString

  • input.eventFilterWebhookEventFilterInput

  • input.statusWebhookStatus

    One of draft, enabled, disabled.

Responses

mutation UpdateWebhook($input: UpdateWebhookInput!) {  updateWebhook(input: $input) {    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  }}
{  "data": {    "updateWebhook": {      "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": "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"    }  }}

The WebhookDefinition! in data.updateWebhook.