Webhooks
Create Webhook
Create webhook to receive real-time notifications for campaign events like opens, clicks, and replies
POST
Webhooks allow you to receive real-time HTTP POST notifications when specific events occur in your campaigns. Configure webhooks at user, client, or campaign level.
Query Parameters
string
required
Your SmartLead API key
Request Body
string
required
The URL where webhook notifications will be sent via HTTP POST
string
required
Scope of the webhook. Valid values:
user- User level (all campaigns)client- Client level (all campaigns for a client)campaign- Campaign level (single campaign)
number
Campaign ID (required when association_type=3)
string
Webhook name for identification
object
Map of events to subscribe to. Set each event key to
true to enable. Available events:EMAIL_SENT- Email sentFIRST_EMAIL_SENT- First email of sequence sentEMAIL_OPEN- Email openedEMAIL_LINK_CLICK- Link clickedEMAIL_REPLY- Lead repliedEMAIL_BOUNCE- Email bouncedLEAD_UNSUBSCRIBED- Lead unsubscribedLEAD_CATEGORY_UPDATED- Lead category changedCAMPAIGN_STATUS_CHANGED- Campaign status changedUNTRACKED_REPLIES- Untracked reply receivedMANUAL_STEP_REACHED- Manual step reached in sequence
object
Map of category IDs to filter events by lead category
number
Client ID (required when association_type=2)
string
Specific event type to subscribe to
number
Specific lead category ID to filter events by
string
Webhook type identifier
boolean
default:"false"
Force creation even if a similar webhook exists
Webhook Payload
When an event occurs, SmartLead sends a POST request to yourwebhook_url. The payload structure varies by event type. Here’s an example for EMAIL_REPLY:
Association Types
User Level (user)
User Level (user)
Receives events from all campaigns owned by the user. Use when you want centralized notifications. If a User-level webhook exists, it takes priority over Client and Campaign-level webhooks.
Client Level (client)
Client Level (client)
Receives events from all campaigns for a specific client. Useful for agency/white-label setups. Requires
client_id in the request body.Campaign Level (campaign)
Campaign Level (campaign)
Receives events only from a specific campaign. Most common use case for per-campaign tracking. Requires
email_campaign_id in the request body.Response Codes
Success
Webhook created successfully
Unauthorized
Invalid or missing API key
Validation Error
Missing required fields or invalid association_type
Internal Server Error
Server error occurred
