Campaigns

Create campaign

Creates a campaign, which commits it: an immediate campaign starts sending right away, and a scheduled one sends at send_at. POST /campaigns/preview validates the same request and reports what the send would do, without creating.

post/campaigns

Request

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

Request body

$schemastring uri

A URL to the JSON Schema for this object.

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. Must be one of the account's verified senders (see List Senders).

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 to send immediately.

Example request

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

Response

Created

$schemastring uri

A URL to the JSON Schema for this object.

batch_countinteger required
created_atinteger required
failure_codestring nullable required
idstring required
messagestring required
message_countinteger required
namestring required
phone_numberstring required
rejection_reasonstring nullable required
send_atinteger nullable required
statusstring required
updated_atinteger required

Example response

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

Changes

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