Get WhatsApp service window status
Returns whether the service window and free entry point are active for a customer and business phone pair.
GET
Returns whether the service window and free entry point are active for a customer and business phone pair.
apiKeyheader
x-api-key<token>customerPhone*stringMatch
^\+[1-9]\d{1,14}$businessPhone*stringMatch
^\+[1-9]\d{1,14}$Success
application/json- response
serviceWindowId*WhatsAppServiceWindowIdMatch
^wasw_[0-9a-hjkmnp-tv-z]{16,24}$isServiceWindowActive*booleanisFreeEntryPointActive*booleanserviceWindowExpiresAt*string|nullfreeEntryPointExpiresAt*string|nullimport { 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"
}