Campaigns

Preview campaign

Validates the request as Create Campaign would and returns what the campaign's send would do — the audience's contact count and the carrier breakdown — without creating a campaign. An ISV account's preview also carries the estimated credit, the daily credit figures and the SMS segment histogram; an Enterprise preview carries the histogram without a price. has_media prices the preview as an MMS send.

post/campaigns/preview

Request

  • Base URL
    https://api.textla.com/v1
  • Auth
    HTTP bearer

Request body

$schemastring uri

A URL to the JSON Schema for this object.

has_mediaboolean nullable

When true, prices the preview as an MMS send. Defaults to false.

messagestring required

Message text, 1 to 1600 characters, with no leading whitespace. May use contact-field variables such as {{ first_name }}.

namestring required

Campaign name, 1 to 191 characters after trimming.

phone_numberstring required

Sender number. Its carrier restriction excludes the contacts the send could not reach.

send_atinteger nullable

Send time in milliseconds since the Unix epoch, for example 1793541600000 (2026-11-01T14:00:00Z). Must be in the future. Omit for an immediate send.

Example request

{
  "$schema": "/v1/schemas/PreviewCampaignBody.json"
}

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

carrier_excluded_countinteger nullable required
carrier_unknown_countinteger nullable required
contact_countinteger required
current_day_credit_usagestring nullable required
daily_credit_limitstring nullable required
estimated_creditstring nullable required

Example response

{
  "$schema": "/v1/schemas/CampaignPreview.json"
}

Changes

No recorded changes to this operation across all 1 revision of this API.