Skip to main content
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

api_key
string
required
Your SmartLead API key

Request Body

webhook_url
string
required
The URL where webhook notifications will be sent via HTTP POST
association_type
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)
email_campaign_id
number
Campaign ID (required when association_type=3)
name
string
Webhook name for identification
event_type_map
object
Map of events to subscribe to. Set each event key to true to enable. Available events:
  • EMAIL_SENT - Email sent
  • FIRST_EMAIL_SENT - First email of sequence sent
  • EMAIL_OPEN - Email opened
  • EMAIL_LINK_CLICK - Link clicked
  • EMAIL_REPLY - Lead replied
  • EMAIL_BOUNCE - Email bounced
  • LEAD_UNSUBSCRIBED - Lead unsubscribed
  • LEAD_CATEGORY_UPDATED - Lead category changed
  • CAMPAIGN_STATUS_CHANGED - Campaign status changed
  • UNTRACKED_REPLIES - Untracked reply received
  • MANUAL_STEP_REACHED - Manual step reached in sequence
category_id_map
object
Map of category IDs to filter events by lead category
client_id
number
Client ID (required when association_type=2)
event_type
string
Specific event type to subscribe to
category_id
number
Specific lead category ID to filter events by
webhook_type
string
Webhook type identifier
force_create
boolean
default:"false"
Force creation even if a similar webhook exists

Webhook Payload

When an event occurs, SmartLead sends a POST request to your webhook_url. The payload structure varies by event type. Here’s an example for EMAIL_REPLY:
See Webhook Events for all event payloads.

Association Types

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.
Receives events from all campaigns for a specific client. Useful for agency/white-label setups. Requires client_id in the request body.
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

200
Success
Webhook created successfully
401
Unauthorized
Invalid or missing API key
422
Validation Error
Missing required fields or invalid association_type
500
Internal Server Error
Server error occurred