Price a text
quote_site_message
Works out what one text would cost before it is sent.
Scopeconfig:readRead only
It gives the price the send form in the Messages tab shows. credits is null when the number or its country cannot be priced. segments is how many SMS parts the text takes, and an emoji or a character outside the plain SMS alphabet makes each part shorter. contactFee is true for the first text to that number this calendar month, which adds a small fee once. A text in test mode is free. See Prices and credits.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. |
template |
string | Yes | The template key, from list_site_message_templates. |
to |
string | Yes | The phone number in international format, such as +14155551234. |
variables |
object | No | The value of each placeholder, keyed by its name. site is filled with the site's name on its own. |
channel |
string | No | sms, the default, whatsapp, or sent to let Sent choose. |