Skip to main content

Send Message

Send a message to all webhooks in an app. The message will be delivered to all webhooks associated with the app.
const message = await vartiq.webhook.message.create({ appId: "APP_ID" }, {
  event: "user.created",
  data: {
    user: {
      id: 123,
      name: "John Doe"
    },
    action: "user.created"
  }
});

Send Message to a specific webhook

If you need finer control over which webhooks receive the message, you can send a message to a specific webhook.
const message = await vartiq.webhook.message.create({ webhookId: "WEBHOOK_ID" }, {
  event: "user.created",
  data: {
    user: {
      id: 123,
      name: "John Doe"
    },
    action: "user.created"
  }
});