Get Whatsapp Call Window
Whether an OUTBOUND WhatsApp call can be placed on this conversation now, plus the call-permission window expiry (Feature #34 backend half).
Mirrors /conversations/{id}/whatsapp-window (the 24h MESSAGING window) but for the CALL-permission window. WhatsApp's business-initiated calling requires an open call-permission window — granted by the customer (a permission grant or a prior connected call) and lasting 7 days (168h). The "Call" button in the conversation view gates on this.
What we can derive today (and the gaps):
- calling_disabled — the master switch (WHATSAPP_CALLING_ENABLED) is off OR the channel's calling_enabled config flag is off. Hard block.
- no_permission — we have NO signal of a granted call-permission window: no prior CONNECTED (answered) call on this conversation. We anchor the window at the most recent answered call's answered_at + 7 days (the closest signal we persist). GAP: we do NOT yet persist Meta's explicit callback_permission_status grant/expiry per contact, so a permission granted WITHOUT a prior connected call is not reflected here — flagged for a follow-up (persist the grant from the calls webhook).
- calling allowed — calling enabled AND a connected call within the last 7 days → can_call: true with call_window_expires_at.
Response (frontend contract): { can_call: bool, call_window_expires_at: ISO8601|null, reason: str|null, billable: bool, last_connected_call_at: ISO8601|null } reason ∈ {no_permission, opted_out, rate_limited, calling_disabled, null}. Outbound is billable-on-answer, so billable is always true when can_call (the UI can color the button accordingly).
Required Scopes: calls:view
Request
- Base URL: https://api.sendseven.com
- URL: https://api.sendseven.com/api/v1/whatsapp/conversations/{conversation_id}/call-window
- Auth: HTTP bearer
Path parameters
Response
Successful Response
Changes
No recorded changes to this operation across all 3 revisions of this API.