Summary
This article explains the different event types available for REST API actions in Wati. You will learn when each event is triggered, what data it can send, and how to use them correctly - especially when collecting feedback, form data, or lead information.
Instructions
Event-based REST API actions run automatically when a specific event occurs in a conversation. Each event type behaves differently, especially in terms of what data (parameters) can be sent.
Understanding these differences helps you choose the right event and avoid configuration issues.
1. Thumbs up / thumbs down events
When it triggers
This event is triggered when a user clicks the feedback button (👍 or 👎) in the chat interface.
Parameter behavior
Only static (fixed) parameters are supported
Dynamic user data cannot be passed
This means all values in the API request must be predefined.
Common use cases
Track user satisfaction metrics
Send Slack notifications when negative feedback is received
Log feedback events to an analytics platform
⚠️ Important: Thumbs up and thumbs down events cannot send dynamic user information such as email addresses, names, or conversation content on their own.
Combining thumbs up/down with a feedback form
If you need detailed feedback or user information, you can combine this event with the Form is submitted event.
How it works
Create a Feedback type Custom Form
When the user clicks 👍 or 👎, the feedback form automatically appears
The user fills out the form (for example, reason for feedback or email)
Both events can trigger at the same time:
Thumbs up/down event → sends static data
Form is submitted event → sends dynamic form data
Example scenario
💡 Tip: To collect emails, reasons, or comments, always use a Custom Form and create a separate REST API action for the Form is submitted event.
2. Form is submitted event
When it triggers
This event is triggered when a user completes and submits a Custom Form in the chat interface.
Parameter behavior
Supports dynamic parameters from form fields
Form field names must exactly match the placeholders used in your REST API configuration
How to set it up
Step 1: Create a Custom Form
Create a Custom Form with clearly defined field names.
Example:
Form field name | Field type | Description |
| User’s email address | |
| Text | User’s first name |
| Text | Company name |
| Text | User’s message |
Step 2: Configure the REST API action
Use placeholders in your API request where the suffix matches the form field name.
Placeholders can include prefixes like contact., agent., or action., but matching is based only on the suffix (the part after the last .).
Examples:
Form field
email→{{email}}or{{contact.email}}Form field
first_name→{{first_name}}or{{contact.first_name}}Form field
company→{{company}}or{{contact.company}}
Parameter matching rules
Form field | Placeholder | Match | Reason |
|
| ✅ Yes | Direct match |
|
| ✅ Yes | Suffix |
|
| ✅ Yes | Suffix |
|
| ✅ Yes | Suffix |
|
| ❌ No | Suffix mismatch (case sensitive) |
|
| ❌ No | Suffix mismatch ( |
⚠️ Important: The placeholder suffix must exactly match the form field name, including case. The prefix does not affect matching.
Example flow
3. Lead captured event
When it triggers
This event is automatically triggered 10 minutes after the conversation ends, if the AI agent has collected lead information during the chat.
Parameter behavior
Uses a fixed request body structure
You cannot customize or modify the fields sent
Fixed request body structure
When this event runs, Wati automatically sends the following payload:
{
"agent_id": "agent_id",
"data": {
"conversation_id": "conversation_id",
"details": "Lead details",
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe",
"lead_level": "Hot",
"lead_score": 100,
"lead_summary": "Lead summary",
"max_score": 100
},
"event": "lead_captured"
}Field descriptions
Field | Description |
| ID of the AI agent |
| Unique conversation identifier |
| Lead information collected |
| User’s email (if available) |
| User’s first name |
| User’s last name |
| Lead quality (Hot, Warm, Cold) |
| Numeric lead score |
| AI-generated lead summary |
| Maximum possible score |
Note: You do not need to define a request_body for Lead captured events. Any custom request body configuration will be ignored.
Common use cases
Automatically create leads in Salesforce or HubSpot
Send lead data to marketing automation tools
Trigger follow-up workflows in your CRM
Quick Reference: Event Type Comparison
Feature | Thumbs Up/Down | Form Submitted | Lead Captured |
Dynamic parameters | ❌ No | ✅ Yes | ❌ Fixed structure |
Custom request body | ✅ Yes (static only) | ✅ Yes | ❌ No |
Requires form setup | ❌ No | ✅ Yes | ❌ No |
Trigger timing | Immediate | Immediate | 10 min after chat ends |
User action required | Click feedback | Submit form | None (automatic) |
Choosing the right event type
Use Thumbs up / down for simple feedback tracking
Use Form is submitted when you need dynamic user input
Use Lead captured for automated lead handoff after conversations
Selecting the right event ensures your REST API actions run reliably and send the data you expect.


