curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/webhooks?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": null,
"name": "CRM Integration",
"webhook_url": "https://crm.example.com/smartlead-webhook",
"event_types": ["LEAD_REPLIED", "LEAD_OPENED"]
}'
{
"success": true,
"data": {
"id": 456,
"name": "CRM Integration",
"webhook_url": "https://crm.example.com/webhook",
"event_types": ["LEAD_REPLIED", "LEAD_OPENED"]
}
}
Create a new webhook or update existing webhook for campaign events
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/webhooks?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": null,
"name": "CRM Integration",
"webhook_url": "https://crm.example.com/smartlead-webhook",
"event_types": ["LEAD_REPLIED", "LEAD_OPENED"]
}'
{
"success": true,
"data": {
"id": 456,
"name": "CRM Integration",
"webhook_url": "https://crm.example.com/webhook",
"event_types": ["LEAD_REPLIED", "LEAD_OPENED"]
}
}
LEAD_REPLIEDLEAD_OPENEDLEAD_CLICKEDLEAD_BOUNCEDLEAD_UNSUBSCRIBEDcurl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/webhooks?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": null,
"name": "CRM Integration",
"webhook_url": "https://crm.example.com/smartlead-webhook",
"event_types": ["LEAD_REPLIED", "LEAD_OPENED"]
}'
{
"success": true,
"data": {
"id": 456,
"name": "CRM Integration",
"webhook_url": "https://crm.example.com/webhook",
"event_types": ["LEAD_REPLIED", "LEAD_OPENED"]
}
}