Messaging Window
WhatsApp only delivers free-form messages (text, images, documents) within 24 hours of the customer’s last inbound message. Outside that window only an approved template lands. This endpoint answers both halves of that problem in one call:
- Can I send free-form right now? →
window_open - Have they replied yet? →
latest_inbound
curl "https://api.whatbot.in/public/v1/messaging-window?phone=919876543210" \ -H "X-API-Key: wa_live_xxx"Query parameters
Section titled “Query parameters”| Field | Type | Required | Description |
|---|---|---|---|
| phone | string | yes | The customer’s number, in any format. Normalised to E.164. A number that can’t be normalised returns 422. |
| since | string | An ISO timestamp. Only report latest_inbound if it is newer than this. A value that is not ISO 8601 returns 422 rather than being ignored; an empty value is treated as absent. |
Response
Section titled “Response”| Field | Type | Required | Description |
|---|---|---|---|
| phone | string | The number, normalised to E.164. | |
| conversation_id | string | The conversation, or null if they have never messaged you. | |
| window_open | boolean | null | true if a free-form message will be delivered right now, false if only a template will. null means we could not tell — see below. | |
| window_known | boolean | false when the lookup failed and window_open is null. | |
| last_inbound_at | string | When they last messaged you, or null. | |
| seconds_remaining | number | null | Seconds of free-form window left. 0 when closed, null when the window could not be determined. | |
| latest_inbound | object | Their most recent message — {id, type, text, timestamp} — or null. text is null for a message with no text (e.g. a photo without a caption). |
{ "phone": "+919876543210", "conversation_id": "a5230fa7-...", "window_open": true, "window_known": true, "last_inbound_at": "2026-08-27T10:00:00Z", "seconds_remaining": 82800, "latest_inbound": { "id": "b1f0...", "type": "text", "text": "hi", "timestamp": "2026-08-27T10:00:00Z" }}When we cannot tell
Section titled “When we cannot tell”If the lookup itself fails, this endpoint says so rather than guessing:
{ "phone": "+919876543210", "conversation_id": null, "last_inbound_at": null, "window_open": null, "window_known": false, "seconds_remaining": null, "latest_inbound": null}Treat window_open: null as unknown, not open. It is deliberately not
reported as false either — a contact who messaged you a minute ago has not
suddenly gone quiet. Retry, or send with fallback_template_name so the send
itself decides.
Polling for a reply
Section titled “Polling for a reply”Timestamps in the response end in Z, so you can paste one straight back into a
query string. Pass since to poll without re-reading the same message. Take the timestamp you
last saw, and latest_inbound stays null until something genuinely newer
arrives:
curl "https://api.whatbot.in/public/v1/messaging-window?phone=919876543210&since=2026-08-27T10:00:00Z" \ -H "X-API-Key: wa_live_xxx"This is what lets an automated caller ask someone to message in, watch for it, and switch to free-form the moment it lands — that inbound message is what opens the window.