event target stores its events and starts no run.
You need an existing agent and an API credential with project.agents.write in the project. Listing events needs project.agents.read. The REST run example also needs project.runs.write, and reading the run needs project.runs.read. The example uses triage-agent in support-assistant.
Export the credential as VERYFRONT_API_KEY. The examples use curl, jq, and uuidgen.
1. Create the webhook
Create the webhook withPOST /projects/{project_reference}/webhooks:
create-webhook.sh
target: What an event starts.kindisagent,task, orworkflow. To only store events, use{"kind":"event","id":"event"}.prompt_template: The prompt built from the payload. Required for every target exceptevent. Omit it for aneventtarget, which rejects it.event_filter: Up to 50 conditions on payload paths, combined withmodeallorany.
enabled. Only an enabled webhook accepts deliveries from senders.
Save three values from the response:
webhook.idasWEBHOOK_ID. Pass it aswebhook_idto the other webhook operations.webhook.project_idasPROJECT_ID.webhook.ingress_idasINGRESS_ID. Senders post to the URL that contains it.
webhook_secret only once. Save it as WEBHOOK_SECRET for the sender.
The MCP create_webhook tool takes the same fields. The GraphQL createWebhook mutation takes them in camelCase: promptTemplate, eventFilter, and target.conversationMode.
2. Test the webhook
Run the webhook by hand with the GraphQLrunWebhook mutation:
test-webhook.sh
run_webhook tool takes webhook_id and payload and does the same.
On REST, start a run with POST /runs and a webhook source. The payload goes in input:
run-webhook.sh
POST /runs returns the run, not the webhook event. It fails when the event starts no run, for example when the filter stops the payload.
Each runWebhook and run_webhook call creates a new webhook event.
For POST /runs, send an Idempotency-Key header and reuse it with the same request when you retry. A repeated call with the same key and request returns the first run. If you omit the header when creating a root run, Veryfront generates a new key for each call, so a retry can start another run.
3. Send a delivery
Configure the external service to send aPOST request to https://api.veryfront.com/webhooks/{ingress_id}:
send-delivery.sh
X-Veryfront-Webhook-Secret header, not an API credential. The body is JSON of at most 64 KiB.
A sender that cannot set custom headers, such as a GitHub repository webhook, passes the secret in the URL instead: https://api.veryfront.com/webhooks/{ingress_id}?secret={webhook_secret}. Use the header whenever the sender supports it.
Send an Idempotency-Key header so a repeated delivery does not start a second run. For GitHub, Veryfront uses the X-GitHub-Delivery header as the key.
A new delivery returns 202 with the webhook event. A repeated delivery returns 200 with the first event and duplicate: true.
A delivery that reuses a key returns the first event, even when the payload differs. Use one key for each distinct delivery.
Verify the result
APOST /runs test returns the run itself, so inspect that run directly.
For a GraphQL or MCP test call, or a sender delivery, check the status of the returned webhook event. When the event has a run ID (canonical_run_id in REST and MCP responses, canonicalRunId in GraphQL), read the run with GET /runs/{run_id}.
A payload that the filter stops is stored with the status ignored and starts no run.
List the events the webhook received with GET /projects/{project_reference}/webhooks/{webhook_id}/events. The GraphQL webhookEvents query and the MCP list_webhook_events tool return the same events:
list-webhook-events.sh
data. To read the next page, pass page_info.next as cursor.
An event records what the sender delivered. The run records the work it started: progress, output, and errors.
Replay a webhook event
Replay an event to send its stored payload to the webhook’s current target again, for example after you fix a failing agent. UsePOST /projects/{project_reference}/webhooks/{webhook_id}/events/{webhook_event_id}/replay. The GraphQL replayWebhookEvent mutation and the MCP replay_webhook_event tool do the same:
replay-webhook-event.sh
webhook-events.json. The replay creates a new webhook event and leaves the original unchanged.
Delivery errors
A delivery to the webhook URL can fail with these statuses:Conversation behavior
conversation_mode applies to agent targets only. It defaults to none.
create_new: Starts a new conversation. Use it for an agent that delegates withinvoke_agent.existing: Continues the conversation inconversation_id.none: Runs the agent without a conversation.
create_new and existing also need project.conversations.write.