Skip to main content
Once a customer has messaged you, you have a 24-hour window to reply with free-form text, media, or a quick-reply button message — no template required. This is the API your inbox and bots use to actually converse.

Endpoint

POST https://xwialxkobwygraiddimj.supabase.co/functions/v1/public-api/v1/messages

Request body

to
string
required
Recipient’s phone number in E.164 format.
type
string
required
One of text, image, document, interactive.
text
string
Message body, required when type is text.
media_url
string
Publicly reachable URL, required when type is image or document.
interactive
object
Required when type is interactive. Currently supports quick-reply buttons only: { "body": "...", "buttons": [{ "id": "yes", "title": "Yes" }] }. List-style interactive messages aren’t supported through this endpoint yet.
cURL
curl https://xwialxkobwygraiddimj.supabase.co/functions/v1/public-api/v1/messages \
  -H "Authorization: Bearer tvk_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "to": "+919876543210", "type": "text", "text": "Thanks for reaching out! How can I help?" }'
Response
{
  "message_id": "5a9e6f1c-9e2f-4b1c-8a5c-7e8f9a0b1c2d",
  "status": "accepted"
}

Checking message status

GET https://xwialxkobwygraiddimj.supabase.co/functions/v1/public-api/v1/messages/{message_id}
Response
{
  "message_id": "5a9e6f1c-9e2f-4b1c-8a5c-7e8f9a0b1c2d",
  "wamid": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAEhg...",
  "status": "delivered",
  "type": "text",
  "created_at": "2026-07-14T18:22:04Z",
  "error": null
}
status here reflects WhatsApp’s actual delivery lifecycle: sent, delivered, read, or failed (the accepted you get back from the POST just means Tanvik accepted the request — check this endpoint or the message.status webhook for what actually happened on the wire).
Sending outside the 24-hour window fails with send_failed — the error message will say the session window is closed. Use Send Templates to re-open the conversation instead.

Receiving messages

Inbound customer messages arrive as message.received webhook events, not through this endpoint — see the Webhook page for the payload shape, and Webhooks to register an endpoint.