Create a subscription webhook

Use the createWebhook mutation to create a subscription webhook for a particular installed application.

The following input fields are provided:

url - Required. The URL that the webhook will send events to.

events - Required. List of events that the subscription webhook will listen to. The following webhooks are available:

  • sms.subscribed
  • sms.sent
  • sms.message_link_click
  • email.subscribed
  • email.unsubscribed
  • email.message_link_click
  • email.opened
  • custom_attribute.set

Example Mutation

Copy
Copied
mutation createWebhook($input: CreateWebhookInput!) {
  createWebhook(input: $input) {
      webhook  {
          id,
          url,
          events,
      }
  }
}

Example Input Variable

{
    "input" : {
        "url": "https://test.com", 
        "events":["email.opened", "custom_attribute.set"]
    }
}