Create Webhook

View as Markdown
# Create Webhook **Endpoint** `POST {{baseUrl}}/api/public/webhooks/CreateWebhook` **Description** This API creates a new webhook that listens to specified events, optionally filtered by campaign IDs. --- ## Request Body Example ``` json { "webhookName": "string", "webhookUrl": "string", "eventType": "CONNECTION_REQUEST_SENT" | "CONNECTION_REQUEST_ACCEPTED" | "MESSAGE_SENT" | "MESSAGE_REPLY_RECEIVED" | "INMAIL_SENT" | "INMAIL_REPLY_RECEIVED" | "FOLLOW_SENT" | "LIKED_POST" | "VIEWED_PROFILE" | "CAMPAIGN_COMPLETED" | "LEAD_TAG_UPDATED" | "EVERY_MESSAGE_REPLY_RECEIVED" "campaignIds": [] } ``` ## Request Parameters - **`webhookName`** (`string`): The name of the webhook. - **`webhookUrl`** (`string`): The URL to which the webhook will send POST requests. - **`eventType`** (`string`): The type of event that triggers the webhook. It must be one of the following values: - `CONNECTION_REQUEST_SENT` - `CONNECTION_REQUEST_ACCEPTED` - `MESSAGE_SENT` - `MESSAGE_REPLY_RECEIVED` (only the first reply) - `INMAIL_SENT` - `INMAIL_REPLY_RECEIVED`(only the first reply) - `EVERY_MESSAGE_REPLY_RECEIVED` (including repliies for both messages and inmails) - `FOLLOW_SENT` - `LIKED_POST` - `VIEWED_PROFILE` - `CAMPAIGN_COMPLETED` - `LEAD_TAG_UPDATED` - **`campaignIds`** (`array`): A list of campaign IDs. If this array is empty, the webhook will listen for the specified `eventType` across all campaigns. If specific campaign IDs are provided, the webhook will listen only to those campaigns.

Headers

X-API-KEYstringOptional

API key header using this scheme. Example: “X-API-KEY: {API_KEY}

Request

This endpoint expects a string.