The Webhook API guide allows you to set-up webhooks to receive a POST request on when an event is triggered.
Payload
Key | Type | Description |
---|---|---|
eventType | string | Event Type |
assistantId | number | Assistant ID |
customerEmail | string | Visitor Email |
customerName | string | Visitor Name |
customerPhone | string | null | Visitor Phone |
visitorLink | string | Visitor link to access the conversations |
Event Types
The following event types are supported for webhooks integration:
1. lead-generated
This event is triggered when a customer submits their information. The behavior of this event depends on the assistant prompt style:
WisePrompt
- The event respects the data capture settings in the lead capture session, if enabled.
- If specific fields (e.g., name, phone, email) are enabled:
- The webhook sends data only when all enabled fields (name, phone, and email) are captured.
- If any fields are not enabled, their values will not be included in the webhook payload.
Custom Prompt or No Data Capture Enabled
- The webhook sends data by default when the name and email are captured.
- The phone number is optional and will not trigger a re-send if captured later.
Receiving the data
{
"eventType": "lead-generated",
"assistantId": 1,
"customerEmail": "[email protected]",
"customerName": "John Doe",
"customerPhone": "1234567890",
"visitorLink": "https://app.wisechats.ai/workspaces/wkspace_321/assistants/1/visitors?visitorId=2&from=2000-02-01&to=2024-12-24"
}
General Notes
- The event is unique to each visitor. It will not re-trigger for the same visitor once the initial data is captured.