Estimate the cost of an SMS campaign by country, using Twilio rates (credentials.manage).
GET
/v1/channel-connections/{id}/cost-estimate
const url = 'https://api.replifier.com/v1/channel-connections/ccc_01hx0000000000000000000000/cost-estimate?countries=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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/channel-connections/ccc_01hx0000000000000000000000/cost-estimate?countries=example' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Example
ccc_01hx0000000000000000000000Query Parameters
Section titled “Query Parameters”countries
required
Comma-separated ISO 3166-1 alpha-2 codes.
string
Comma-separated ISO 3166-1 alpha-2 codes.
contacts
Number of contacts. Defaults to 1 if omitted.
string
Number of contacts. Defaults to 1 if omitted.
Responses
Section titled “Responses”SMS cost estimate
Media typeapplication/json
object
lines
required
Array<object>
object
country
required
string
ratePerSegment
required
string
currency
required
string
contacts
required
number
estimatedCost
required
string
source
required
string
totalEstimatedCost
required
string
unknownCountries
required
Array<string>
Example
{ "lines": [ { "source": "twilio_api" } ]}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" }}