Skip to Content

Get WhatsApp service window billing

Returns message counts and the estimated Meta cost for a WhatsApp service window.

GET
/v1/whatsapp/service-window/billing

Returns message counts and the estimated Meta cost for a WhatsApp service window.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

serviceWindowId*string
Match^wasw_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

Success

application/json
  1. response
totalMessages*integer
Range0 <= value <= 9007199254740991
totalFreeMessages*integer
Range0 <= value <= 9007199254740991
totalPaidMessages*integer
Range0 <= value <= 9007199254740991
estimatedProviderCosts*array<>
Example Request
import { createClient } from "samva";

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

const result = await samva.whatsapp.getServiceWindowBilling({
  "serviceWindowId": "example"
});
Example Response
{
  "totalMessages": 0,
  "totalFreeMessages": 0,
  "totalPaidMessages": 0,
  "estimatedProviderCosts": [
    {
      "amount": "string",
      "currency": "string"
    }
  ]
}

Related documentation