SmartLead icon

SmartLead

Interact with SmartLead API (campaigns, leads, inbox, analytics, delivery, and webhooks)

Actions144

Campaign Webhook → Create or Update

AI-generated

Summary

Create or update a campaign webhook

Inputs

  • campaignId (required) — Identifier of the campaign for which to create or update the webhook
  • requestBody — JSON payload defining the webhook configuration
  • requestOptions — Additional request settings such as batching, proxy, SSL verification, and timeout
  • allowUnauthorizedCerts — Whether to accept SSL responses without valid certification
  • proxy — HTTP proxy URL, optionally with authentication credentials
  • timeout — Request timeout in milliseconds

Output shape

a campaign webhook object

Returns the created or updated webhook details; on failure an error envelope is returned

Examples

Example 1: Add a webhook to a campaign to receive lead notifications

campaignId: 12345, requestBody: {"url":"https://example.com/webhook","event":"EMAIL_SENT"}, requestOptions: {"timeout":5000}

Example 2: Update an existing webhook's URL and events

campaignId: 12345, requestBody: {"url":"https://new.example.com/webhook","event":"EMAIL_OPENED"}, requestOptions: {"batching":{"batchSize":100}}

Example 3: Create a webhook with default settings using minimal input

campaignId: 12345, requestBody: {"url":"https://example.com/webhook"}

Links

Discussion