Estimate the cost of a WhatsApp campaign by country and category (credentials.manage).
GET
/v1/connections/whatsapp/{conn}/cost-estimate
const url = 'https://api.replifier.com/v1/connections/whatsapp/pcn_01hx0000000000000000000000/cost-estimate?category=marketing';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.replifier.com/v1/connections/whatsapp/pcn_01hx0000000000000000000000/cost-estimate?category=marketing'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”conn
required
string
Example
pcn_01hx0000000000000000000000Query Parameters
Section titled “Query Parameters”category
string
countries
Comma-separated ISO 3166-1 alpha-2 codes. Omit = all available countries.
string
Comma-separated ISO 3166-1 alpha-2 codes. Omit = all available countries.
contacts
Number of contacts the campaign would be sent to.
string
Number of contacts the campaign would be sent to.
Responses
Section titled “Responses”Cost estimate
Media typeapplication/json
object
lines
required
Array<object>
object
country
required
string
category
required
string
ratePerMessage
required
string
ratePerConversation
required
Deprecated: use ratePerMessage (Meta charges per message, not per conversation). Carries the same value and will be removed in the next version.
string
currency
required
string
contacts
required
number
estimatedCost
required
string
source
required
string
asOf
required
string
totalEstimatedCost
required
string
currency
required
string
availableCountries
required
Array<string>
unknownCountries
required
Array<string>
Example
{ "lines": [ { "category": "marketing", "currency": "USD", "source": "meta_static" } ], "currency": "USD"}Invalid data
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Internal error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}