> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vartiq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Messages

> Send messages to your webhooks

## Send Message

Send a message to all webhooks in an app. The message will be delivered to all webhooks associated with the app.

<CodeGroup>
  ```javascript JavaScript theme={null}
  const message = await vartiq.webhook.message.create({ appId: "APP_ID" }, {
    event: "user.created",
    data: {
      user: {
        id: 123,
        name: "John Doe"
      },
      action: "user.created"
    }
  });
  ```

  {/* ```php PHP
    $message = $vartiq->webhook->message->create("APP_ID", [
    "event" => "user.created",
    "data" => [
      "user" => [
        "id" => 123,
        "name" => "John Doe"
      ],
      "event" => "user.created"
    ]
    ]);
    ``` */}
</CodeGroup>

## 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.

<CodeGroup>
  ```javascript JavaScript theme={null}
  const message = await vartiq.webhook.message.create({ webhookId: "WEBHOOK_ID" }, {
    event: "user.created",
    data: {
      user: {
        id: 123,
        name: "John Doe"
      },
      action: "user.created"
    }
  });
  ```
</CodeGroup>
