lists

Add webhook

Create a new webhook for a specific list.

post/3.0/lists/{list_id}/webhooks

Request

Path parameters

list_idstring required

The unique ID for the list.

Request body

urlstring

A valid URL for the Webhook.

Example request

{
  "events": {
    "campaign": true,
    "cleaned": true,
    "profile": true,
    "subscribe": true,
    "unsubscribe": true,
    "upemail": true,
    "sms_subscribe": true,
    "sms_unsubscribe": true,
    "upsms": true,
    "sms_campaign": true
  },
  "sources": {
    "admin": true,
    "api": true,
    "user": true
  },
  "url": "http://yourdomain.com/webhook"
}

Response

idstring

An string that uniquely identifies this webhook.

list_idstring

The unique id for the list.

signing_enabledboolean

Whether outbound deliveries are HMAC-signed.

urlstring

A valid URL for the Webhook.

signing_secretstring

The HMAC signing secret. Returned exactly once at creation. This should be stored securely; if lost, delete and recreate the webhook to obtain a new secret.

Example response

{
  "events": {
    "campaign": true,
    "cleaned": true,
    "profile": true,
    "subscribe": true,
    "unsubscribe": true,
    "upemail": true,
    "sms_subscribe": true,
    "sms_unsubscribe": true,
    "upsms": true,
    "sms_campaign": true
  },
  "id": "5d9a5e3f7b",
  "list_id": "4ca5becb8d",
  "signing_enabled": true,
  "sources": {
    "admin": true,
    "api": true,
    "user": true
  },
  "url": "http://yourdomain.com/webhook",
  "signing_secret": "zI3tsLziqBWhlz6V4PRlGg41u0gdhu7LhYXX4wa0ARM"
}

Changes

No recorded changes to this operation across all 1 revision of this API.