Estimate the cost of a message
Returns the applicable per-unit rate for a single send. Pass a channel and a destination to phone number in E.164 form; the endpoint resolves the destination country and returns the matching rate, or null when no rate is published for that lane. Pass allIn=true to also get an itemized surcharge breakdown (US A2P 10DLC registration, call recording, transcription, premium support) so a sales demo can answer the ‘what does this lane REALLY cost’ question from one call; optional include filters the list to a chosen set of surcharge codes (repeatable or comma-separated). Returns 422 when channel or to is missing.
Authorizations
Dashboard JWT token from Clerk
Headers
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
true, false Response
Estimate in the standard { data, meta } envelope — the resolved channel, to, countryCode, a rate object (ratePerUnit, currency, countryCode) or null when no rate is published, and when allIn=true an allIn object (baseRatePerUnit, currency, surcharges[]).
Estimate in the standard { data, meta } envelope — the resolved channel, to, countryCode, a rate object (ratePerUnit, currency, countryCode) or null when no rate is published, and when allIn=true an allIn object (baseRatePerUnit, currency, surcharges[]).