Skip to main content
PUT
/
api
/
v1
/
webhook
/
update
/
:webhook_id
curl -X PUT "https://server.smartlead.ai/api/v1/webhook/update/12345?api_key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Updated Webhook",
    "webhook_url": "https://example.com/webhook",
    "event_types": ["EMAIL_SENT", "EMAIL_REPLIED", "EMAIL_BOUNCED"],
    "categories": []
  }'
{
  "ok": true,
  "id": 12345,
  "message": "Webhook saved successfully"
}
Use this endpoint to update the configuration of an existing webhook.

Path Parameters

webhook_id
number
required
The webhook ID to update

Query Parameters

api_key
string
required
Your SmartLead API key

Request Body

name
string
A descriptive name for the webhook
webhook_url
string
The URL to receive webhook events
event_types
array
Array of event types to subscribe to (e.g. EMAIL_SENT, EMAIL_OPENED, EMAIL_REPLIED, EMAIL_CLICKED, LEAD_UNSUBSCRIBED, EMAIL_BOUNCED)
categories
array
Array of lead categories to filter events by
curl -X PUT "https://server.smartlead.ai/api/v1/webhook/update/12345?api_key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Updated Webhook",
    "webhook_url": "https://example.com/webhook",
    "event_types": ["EMAIL_SENT", "EMAIL_REPLIED", "EMAIL_BOUNCED"],
    "categories": []
  }'

Response Codes

200
Success
Webhook added/updated successfully
400
Bad Request
Invalid request parameters
401
Unauthorized
Invalid or missing API key
404
Not Found
Campaign not found
{
  "ok": true,
  "id": 12345,
  "message": "Webhook saved successfully"
}