Skip to main content

Create Webhook

POST /backend/webhooks

Body Parameters

string
required
URL that will receive notifications
array
required
List of events to subscribe to
boolean
default:"true"
Whether webhook is active

Request Example

Response

Store the secret securely. It’s used to verify that requests actually came from Leavo.

Create a Pipeline Deal

Besides creating or updating the lead, an inbound webhook can drop it straight onto the CRM board, so leads from a form or an ad land in the pipeline automatically.
string
Pipeline where a deal should be created for the received lead
string
Stage the deal should land in
The two fields are a pair: send both or neither. Sending only one returns 400.
To disable deal creation on an existing webhook, send target_pipeline_id as the zero UUID (00000000-0000-0000-0000-000000000000) — this clears both fields.

Behavior

The lead is created or updated first. Only then is the deal created and linked to it.
If deal creation fails — deleted stage, removed pipeline, invalid configuration — the error is logged and the request still returns success. Taking in the lead is the webhook’s core job; the deal is a bonus.
A webhook never silently creates already-lost deals. A lost target stage is refused.
Since there is no authenticated user on a webhook call, the deal_created event shows up in the deal history with actor_type: "system".

Signature Verification

Every webhook includes an X-Leavo-Signature header. Verify it to ensure authenticity: