Skip to main content

Set up an endpoint

1

Add your URL

In the dashboard, open Settings → Webhooks and add your HTTPS URL.
2

Pick events

Choose the events you want, or all of them.
3

Copy the signing secret

It starts with whsec_ and is shown once. Keep it on your server.
4

Test it

Select Test next to the endpoint to receive a signed ping event.

What Messaly sends

A POST with a JSON body. Every event has the same envelope; data depends on the event.

Events

The network confirms an SMS reached the phone.
The network reports an SMS couldn’t be delivered. Its charge is refunded to your wallet.
Someone texts your shortcode or number (anything other than STOP/START).
Someone replies STOP (or UNSUBSCRIBE, and so on). They’re left out of your future sends automatically.
An SMS or WhatsApp campaign finishes sending.
A wallet top-up is paid and credited.
A customer messages your WhatsApp number.
A WhatsApp message you sent is sent, delivered, read or failed.

Verify the signature

X-Telaven-Signature is t=<unix seconds>,v1=<hex>, where v1 = HMAC-SHA256(secret, t + "." + rawBody). Compute it over the raw request body, before any JSON parsing. Compare in constant time, and reject anything older than 5 minutes.

Retries

  • Reply with any 2xx within 10 seconds. Anything else, including a redirect, counts as a failure.
  • A failed delivery is tried up to 6 times in total, waiting about 10s, 20s, 40s, 80s and 160s between attempts.
  • Retries keep the same id and X-Telaven-Delivery, so you can ignore duplicates.