curl "https://server.smartlead.ai/api/v1/campaigns/123/webhooks?api_key=YOUR_KEY"
import requests
API_KEY = "YOUR_API_KEY"
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/123/webhooks",
params={"api_key": API_KEY}
)
webhooks = response.json()
print(f"Configured webhooks: {len(webhooks['data'])}")
for webhook in webhooks['data']:
print(f" - {webhook['name']}: {webhook['webhook_url']}")
print(f" Events: {', '.join(webhook['event_types'])}")
{
"success": true,
"data": [
{
"id": 456,
"name": "CRM Integration",
"webhook_url": "https://crm.example.com/webhook",
"event_types": ["LEAD_REPLIED", "LEAD_OPENED"],
"is_active": true
}
]
}
Campaign Webhooks
Get Campaign Webhooks
Retrieve all webhooks configured for a campaign
GET
/
api
/
v1
/
campaigns
/
{campaign_id}
/
webhooks
curl "https://server.smartlead.ai/api/v1/campaigns/123/webhooks?api_key=YOUR_KEY"
import requests
API_KEY = "YOUR_API_KEY"
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/123/webhooks",
params={"api_key": API_KEY}
)
webhooks = response.json()
print(f"Configured webhooks: {len(webhooks['data'])}")
for webhook in webhooks['data']:
print(f" - {webhook['name']}: {webhook['webhook_url']}")
print(f" Events: {', '.join(webhook['event_types'])}")
{
"success": true,
"data": [
{
"id": 456,
"name": "CRM Integration",
"webhook_url": "https://crm.example.com/webhook",
"event_types": ["LEAD_REPLIED", "LEAD_OPENED"],
"is_active": true
}
]
}
View all webhook integrations set up for campaign events. Essential for managing integrations with external systems.
Path Parameters
number
required
Campaign ID
Query Parameters
string
required
Your SmartLead API key
curl "https://server.smartlead.ai/api/v1/campaigns/123/webhooks?api_key=YOUR_KEY"
import requests
API_KEY = "YOUR_API_KEY"
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/123/webhooks",
params={"api_key": API_KEY}
)
webhooks = response.json()
print(f"Configured webhooks: {len(webhooks['data'])}")
for webhook in webhooks['data']:
print(f" - {webhook['name']}: {webhook['webhook_url']}")
print(f" Events: {', '.join(webhook['event_types'])}")
Response Example
{
"success": true,
"data": [
{
"id": 456,
"name": "CRM Integration",
"webhook_url": "https://crm.example.com/webhook",
"event_types": ["LEAD_REPLIED", "LEAD_OPENED"],
"is_active": true
}
]
}
