Create webhook

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

  • project_referencestring

    Project ID or slug.

  • namestring · min length 1 · max length 120required

    Webhook name, 1-120 characters.

  • targetobjectrequired

    Target invoked by a webhook definition.

  • prompt_templatestring · min length 1 · max length 20000

    Prompt template for run targets: required unless target.kind is event, where it is not supported.

  • event_filterobject | null

    Optional incoming event filter. Missing, null, or empty conditions accept every event.

Responses

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__create_webhook",    "arguments": {      "name": "string",      "target": {        "kind": "agent",        "id": "string"      }    }  }}'
{  "jsonrpc": "2.0",  "id": 1,  "result": {    "content": [      {        "type": "text",        "text": "{\"webhook\":{\"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\"},\"webhook_secret\":\"string\"}"      }    ],    "structuredContent": {      "webhook": {        "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"      },      "webhook_secret": "string"    }  }}

The tool ran; its output is result.structuredContent.