Skip to main content
Webhooks let your server react in real time to things happening on Tanvik — an inbound WhatsApp message, a delivery status update, an OTP verification, a template review result — without polling the API.

Registering an endpoint

Not sure which Windows tab to use? The two aren’t interchangeable — pasting one into the wrong shell fails with a ... is not recognized error. Use CMD only in classic Command Prompt. Use PowerShell if your terminal is PowerShell, Windows Terminal, or VS Code’s integrated terminal — the default on most modern Windows setups. The PowerShell example uses Invoke-RestMethod rather than curl.exe to avoid PowerShell’s known issues passing complex quoted JSON to external executables.

Request body

string
required
Your endpoint. Must be https://.
string[]
required
One or more of message.received, message.status, otp.verified, template.status.

Response

The secret is shown exactly once, at registration. Store it — you’ll need it to verify signatures, and Tanvik can’t show it to you again.
You can register multiple endpoints, each subscribed to a different subset of events.

Listing and removing webhooks

CMD and PowerShell syntax aren’t interchangeable. The PowerShell example uses Invoke-RestMethod rather than curl.exe to avoid PowerShell’s known issues passing complex quoted JSON to external executables.
The list response never includes the secret — only id, url, events, status, and timestamps.

Verifying signatures

Every webhook request includes an X-Tanvik-Signature header — an HMAC-SHA256 signature of the raw request body, signed with the secret you got at registration.
Always verify the signature before trusting a webhook payload. Compute it over the raw request body, not a re-serialized JSON object.

Delivery and retries

  • Your endpoint must respond with a 2xx status within 10 seconds.
  • Failed deliveries are retried: 1 minute, 5 minutes, 30 minutes, then hourly.
  • After 24 hours of a delivery still failing, that endpoint is automatically set to paused — check GET /v1/webhooks to see status and pause_reason. Re-registering (or a future re-activate endpoint) is needed to resume it.

Event types

See the WhatsApp Webhook page for the exact payload shape of each event.
Webhooks are polled into your account continuously for messages and OTPs. template.status specifically depends on Tanvik’s template sync running for your account — if you need it to fire faster after a Meta review, ask your account team.