Skip to content

Webhook Push ​

Webhook Push sends one message to multiple configured targets. It is useful for operational alerts, payment notifications, trading events, build notifications, and customer workflow updates.

Endpoint ​

http
POST /v1/apps/webhook-push/:alias/send

Required scope:

text
push:send

Request Example ​

bash
curl -X POST https://my-gateway.mlc.workers.dev/v1/apps/webhook-push/ops/send \
  -H "X-API-Key: sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Order Paid",
    "text": "Order 10001 has been paid",
    "payload": {
      "order_id": "10001"
    }
  }'

Response Example ​

json
{
  "ok": true,
  "success_count": 2,
  "failure_count": 0,
  "results": []
}

Target Configuration ​

Targets can be enabled or disabled independently:

json
{
  "targets": [
    {
      "id": "target_1",
      "name": "Telegram alerts",
      "platform": "telegram",
      "connected_account_id": "conn_...",
      "chat_id": "-1001234567890",
      "enabled": true
    },
    {
      "id": "target_2",
      "name": "Ops webhook",
      "platform": "generic",
      "url": "https://api.example.com/webhooks/notify",
      "enabled": true
    }
  ]
}

Connected Account Support ​

Webhook Push can reuse active Connected Accounts:

Target typeSupported connected accounts
Telegramtelegram-bot, custom-api-key
Generic/custom webhookcustom-api-key

When a Telegram connected account is selected, the target does not store a bot token. Runtime resolution injects the token only for the outbound request.

For generic targets, a custom API key can be used as optional Bearer authentication:

json
{
  "platform": "generic",
  "connected_account_id": "conn_...",
  "auth_mode": "bearer",
  "url": "https://api.example.com/webhooks/notify"
}

Billing ​

Webhook Push is charged per fan-out request. A single API call can deliver to multiple enabled targets, and the response reports per-target success or failure.