Messages
Preview message cost
Prices a message before you send it, without sending anything. Returns the segment count, price per segment, and total in your account currency.
GET
/
api
/
v1
/
Account
/
{auth_id}
/
Sms
/
Message
/
CostPreview
/
cURL
curl --request GET \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Message/CostPreview/ \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.messages.preview_message_cost(
from_="+14155550100",
to="+14155550123",
)
const options = {
method: 'GET',
headers: {'X-Auth-ID': '<api-key>', 'X-Auth-Token': '<api-key>'}
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Message/CostPreview/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"channel": "sms",
"segmentCount": 2,
"unitCost": 0.01,
"totalCost": 0.02,
"currency": "USD"
}Authorizations
Path Parameters
Query Parameters
Response
Segment count and cost.
An estimate of what a message costs before you send it: how many segments the text splits into, and the price per segment and in total.
Was this page helpful?
⌘I
cURL
curl --request GET \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Message/CostPreview/ \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.messages.preview_message_cost(
from_="+14155550100",
to="+14155550123",
)
const options = {
method: 'GET',
headers: {'X-Auth-ID': '<api-key>', 'X-Auth-Token': '<api-key>'}
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Message/CostPreview/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"channel": "sms",
"segmentCount": 2,
"unitCost": 0.01,
"totalCost": 0.02,
"currency": "USD"
}