# Update webhook

Tool: `veryfront__update_webhook`

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

| Name                | Type                                     | Required | Description                                                                                                                                                                                               |
| ------------------- | ---------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `project_reference` | string                                   |          | Project ID or slug.                                                                                                                                                                                       |
| `webhook_id`        | string · uuid                            | Yes      | The webhook id. 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. |
| `name`              | string · min length 1 · max length 120   |          | New webhook name, 1-120 characters.                                                                                                                                                                       |
| `target`            | object                                   |          | Target invoked by a webhook definition.                                                                                                                                                                   |
| `prompt_template`   | string · min length 1 · max length 20000 |          | Prompt template for run targets. Not supported for event-only webhooks.                                                                                                                                   |
| `event_filter`      | object \| null                           |          | Optional incoming event filter. Missing, null, or empty conditions accept every event.                                                                                                                    |
| `status`            | string                                   |          | draft, enabled or disabled. One of `draft`, `enabled`, `disabled`.                                                                                                                                        |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__update_webhook",
    "arguments": {
      "webhook_id": "00000000-0000-0000-0000-000000000000"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"id\":\"00000000-0000-0000-0000-000000000000\",\"project_id\":\"00000000-0000-0000-0000-000000000000\",\"name\":\"string\",\"source\":\"webhook\",\"target\":{\"kind\":\"agent\",\"id\":\"string\",\"conversation_mode\":\"create_new\",\"conversation_id\":\"00000000-0000-0000-0000-000000000000\"},\"prompt_template\":\"string\",\"event_filter\":{\"mode\":\"all\",\"conditions\":[{\"path\":\"string\",\"operator\":\"equals\",\"value\":null}]},\"status\":\"draft\",\"runtime_target_kind\":\"main_branch\",\"runtime_target_environment_id\":\"00000000-0000-0000-0000-000000000000\",\"runtime_target_branch_id\":\"00000000-0000-0000-0000-000000000000\",\"definition_source\":\"manual\",\"source_trigger_id\":\"string\",\"source_path\":\"string\",\"source_hash\":\"string\",\"ingress_id\":\"string\",\"webhook_url\":\"string\",\"created_by_user_id\":\"00000000-0000-0000-0000-000000000000\",\"enabled_at\":\"string\",\"disabled_at\":\"string\",\"disabled_reason\":\"string\",\"created_at\":\"string\",\"updated_at\":\"string\"}"
      }
    ],
    "structuredContent": {
      "id": "00000000-0000-0000-0000-000000000000",
      "project_id": "00000000-0000-0000-0000-000000000000",
      "name": "string",
      "source": "webhook",
      "target": {
        "kind": "agent",
        "id": "string",
        "conversation_mode": "create_new",
        "conversation_id": "00000000-0000-0000-0000-000000000000"
      },
      "prompt_template": "string",
      "event_filter": {
        "mode": "all",
        "conditions": [
          {
            "path": "string",
            "operator": "equals",
            "value": null
          }
        ]
      },
      "status": "draft",
      "runtime_target_kind": "main_branch",
      "runtime_target_environment_id": "00000000-0000-0000-0000-000000000000",
      "runtime_target_branch_id": "00000000-0000-0000-0000-000000000000",
      "definition_source": "manual",
      "source_trigger_id": "string",
      "source_path": "string",
      "source_hash": "string",
      "ingress_id": "string",
      "webhook_url": "string",
      "created_by_user_id": "00000000-0000-0000-0000-000000000000",
      "enabled_at": "string",
      "disabled_at": "string",
      "disabled_reason": "string",
      "created_at": "string",
      "updated_at": "string"
    }
  }
}
```
