Webhook Delivery

Configure per-App webhook URLs and understand dual delivery for BYON messages.

BYON Apps support dual delivery — messages are delivered to both your webhook URL and any connected WebSocket clients in parallel. This ensures maximum reliability.

Configuring a webhook

In your App's settings, set a Webhook URL — an HTTPS endpoint that PipesBot will POST messages to.

https://your-app.example.com/webhook/pipes

Messages from any sender on any of your App's BYON numbers will be delivered to this URL.

Delivery behavior

When a message arrives on a BYON number:

  1. Webhook: PipesBot sends an HTTP POST to your App's webhook URL
  2. WebSocket: Simultaneously delivered to any connected WebSocket clients authenticated with your ak_ key

Both deliveries happen in parallel. If one fails, the other still succeeds.

Delivery methodReliabilityLatencyBest for
WebhookHigh (with retries)Slightly higherStateless services, automation platforms
WebSocketReal-timeLowestAI agents, interactive apps

Retry policy

Failed webhook deliveries are retried up to 3 times with a 10-second per-attempt timeout:

AttemptDelay after previous
10s (immediate)
22s
38s

After 3 failed attempts the delivery is marked failed and its payload is kept for manual retry. It is not retried automatically and not delivered over another channel.

Every delivery to your App appears in the App's Webhooks tab in the dashboard for 7 days, with its status, HTTP code, latency and attempts. Retry failed deliveries from there, one at a time or with Retry all failed. See Retries & Error Handling.

Testing your webhook

Use the Send Test button in your App's settings to send a sample payload to your configured URL. This helps verify your endpoint is reachable and processing messages correctly before going live. Each test also appears in the Webhooks tab, with event test.

Webhook payload

The payload depends on your App's API version:

  • Legacy: the same Meta-compatible format as sandbox number webhooks, plus pipes.conversationId. See Webhook Payload.
  • API v2: one envelope per Meta change, with Meta's change.value untouched in whatsapp. Statuses and template updates are delivered too. See API v2 envelope, the migration guide and the example payloads.

Signatures

Every delivery to your App webhook URL is signed with Standard Webhooks (webhook-id, webhook-timestamp and webhook-signature headers), using your App's whsec_ signing secret. Reveal or rotate the secret in your App's settings. See Webhook Security for verification code.

webhook-id is identical across retries of the same delivery, including manual retries from the Webhooks tab, so you can use it to deduplicate.

The number.onboarded event

When a BYON number finishes Embedded Signup, PipesBot POSTs a number.onboarded event to your App's webhook URL. The event is signed like every App webhook and retried 3× (0s / 2s / 8s), then marked failed and kept for manual retry from the Webhooks tab.

{
  "event": "number.onboarded",
  "timestamp": "2025-01-15T10:30:00.000Z",
  "data": {
    "numberId": "pn_abc123",
    "phoneNumber": "+1 555-123-4567",
    "displayName": "Acme Support",
    "appId": "app_abc123",
    "metadata": { "partnerId": "partner_123" },
    "importHistory": false,
    "importContacts": false
  }
}

phoneNumber is the number as WhatsApp displays it (for example +1 555-123-4567), not E.164.

metadata round-trips whatever you passed to POST /v1/apps/token. Use it to correlate the onboarded number with your internal records.

If a delivery fails every retry and you never replay it, you can still reconcile: GET /v1/numbers lists your App's numbers with their metadata.

importHistory and importContacts are true when PipesBot will request that number's chat history or contact list from WhatsApp, from your App settings or the signup link. See Import chat history and contacts.

Next steps

On this page