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

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 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
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 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

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