Skip to Content

Get WhatsApp service window status

Returns whether the service window and free entry point are active for a customer and business phone pair.

GET
/v1/whatsapp/service-window/status

Returns whether the service window and free entry point are active for a customer and business phone pair.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

customerPhone*string
Match^\+[1-9]\d{1,14}$
businessPhone*string
Match^\+[1-9]\d{1,14}$

Response Body

Success

application/json
  1. response
serviceWindowId*WhatsAppServiceWindowId
Match^wasw_[0-9a-hjkmnp-tv-z]{16,24}$
isServiceWindowActive*boolean
isFreeEntryPointActive*boolean
serviceWindowExpiresAt*string|null
freeEntryPointExpiresAt*string|null
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.whatsapp.getServiceWindowStatus({
  "customerPhone": "example",
  "businessPhone": "example"
});
Example Response
{
  "serviceWindowId": "string",
  "isServiceWindowActive": true,
  "isFreeEntryPointActive": true,
  "serviceWindowExpiresAt": "string",
  "freeEntryPointExpiresAt": "string"
}

Related documentation