Skip to main content
POST
A passing result proves that the key, campaign state, template, parameters, and media are accepted. It does not check the recipient’s consent or the wallet balance, so a live send can still fail with consent_revoked or insufficient_balance. Validate calls are not rate limited. The Validate tab on the campaign page runs the same dry run from a form.
string
required
The webhook campaign ID. The Contract tab on the campaign page shows the full URL for your campaign.
string
required
Recipient phone number in international format with the leading + and country code, for example +15551234567. Any other format fails with invalid_params and an errors entry of { "field": "to", "code": "invalid_e164" }.
object
Template parameters as string values, keyed by parameter name. Required when the campaign’s template has parameters.
object
{ "url": "…" }. Required when the template has a media header. Tars fetches the URL and checks it against the header’s media type.

Response

boolean
true when the call passes every check that validation runs.
object
The pricing quote, present on a passing validation. Contains category, quoted_usd, and currency.
string
Machine-readable error code, present on a failing validation with the matching status.
array
Per-field validation failures, present on a failing validation and empty when no single field is at fault. Each entry is { "field": "…", "code": "…" }. The codes are template_param_missing, template_param_invalid, unknown_param, unsupported_template, invalid_e164, and invalid_media.

Errors

Validation reports failures with the ok, code, and errors shape above, not the problem details document that /send returns. The status matches the error catalog, so campaign_paused answers 409 and campaign_gone answers 410. Two groups of failures still return problem details, because they happen before validation runs. These are 401 with unauthorized or invalid_key, and 500 with internal_error.

Authorizations

Authorization
string
header
required

API key sent as Authorization: Bearer YOUR_API_KEY. Campaign endpoints use campaign-scoped keys; the rest use organization or agent keys with the matching permission.

Path Parameters

campaignId
string
required

The campaign's ID. The campaign page's Contract tab shows the full URL for your campaign.

Body

application/json

One webhook campaign send.

to
string
required

Recipient phone number in international format

params
object

Template parameters keyed by slot name

media
object

Media for the template's media slot. Sending it to a template with no media slot returns unknown_param on media.url.

Response

The call would succeed

ok
boolean
required

True when the same call would be accepted by send.

pricing
object
required

What the send would cost. A validate call never charges the wallet.