Skip to main content
Webhooks push events to your server when something happens on the line — for example a message is received or sent. Use them when you want real-time updates instead of polling GET /messages.

Prerequisites

  • A Messages API key with the comms_webhooks scope.
  • A public HTTPS URL that accepts POST.

Register an endpoint

Scope: comms_webhooks
Success: 201 with the created webhook object.

List endpoints

Local development

  1. Run your app with a POST handler that logs the body.
  2. Tunnel with ngrok / Cloudflare Tunnel.
  3. Register the tunnel URL as above.
  4. Send a test message to your line (or fire a test from the API if available on your deployment).

Handler checklist

Return 2xx as soon as you accept the event. Do heavy work in a queue.
The same event may arrive more than once. Make handlers idempotent on event id when present.
Webhook receivers belong on your server. Do not process hooks in a browser.