Webhook

Create Webhook

POST /v1/webhook/create

POST/v1/webhook/create
POST
/v1/webhook/create

Create a webhook

Authorization

x-api-key<token>

API key for Open API authentication

In: header

Request Body

application/jsonRequired

Provide all required fields to register a webhook. webhookEvent accepts one or more of: email-sent, email-opened, email-link-clicked, reply-received, email-bounced, prospect-unsubscribed, prospect-finished, prospect-outcome-updated, sequence-paused, email-account-disconnected, email-account-paused, inbox-analyser-test-completed, task-created, task-updated, bulk-task-updated, call-task-updated, linkedin-task-updated, custom-task-updated, whatsapp-task-updated. headers is required — pass if no custom headers are needed.

namestring

Display name for the webhook.

Example: "Email Sent Webhook"

webhookUrlstring

Destination URL where the webhook payload will be delivered.

Example: "https://example.org/webhooks/email-sent"

webhookEventarray<string>

Webhook events to subscribe to. Accepted values: email-sent, email-opened, email-link-clicked, reply-received, email-bounced, prospect-unsubscribed, prospect-finished, prospect-outcome-updated, sequence-paused, email-account-disconnected, email-account-paused, inbox-analyser-test-completed, task-created, bulk-task-updated, call-task-updated, linkedin-task-updated, custom-task-updated, whatsapp-task-updated, task-updated.

Example: ["email-sent"]

headersobject

Custom HTTP headers included in each webhook delivery. Pass {} if no custom headers are needed.

Example: {"X-Webhook-Source":"saleshandy"}

Request Body Examples

{
  "name": "Email Sent Webhook",
  "webhookUrl": "https://example.org/webhooks/email-sent",
  "webhookEvent": [
    "email-sent"
  ],
  "headers": {
    "X-Webhook-Source": "saleshandy"
  }
}

Responses

201
Webhook created successfully
{
  "message": "Webhook created successfully",
  "payload": {
    "id": "69fb3ac1eda582171eb74826",
    "name": "Email Sent Webhook",
    "webhookUrl": "https://example.org/webhooks/email-sent",
    "webhookEvent": [
      "email-sent"
    ],
    "headers": {
      "X-Webhook-Source": "saleshandy"
    },
    "status": "paused",
    "testDelivery": {
      "status": "failed"
    }
  }
}

Request

Example:
curl -X POST \
  "https://open-api.saleshandy.com/v1/webhook/create" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Email Sent Webhook",
  "webhookUrl": "https://example.org/webhooks/email-sent",
  "webhookEvent": [
    "email-sent"
  ],
  "headers": {
    "X-Webhook-Source": "saleshandy"
  }
}'

Response

No response body