Campaigns

Update campaign

Corrects a scheduled or pending-approval campaign — its message, audience or send time — before it fires. Every field is required: the body replaces all of them except media, which stays unchanged. It is 404 when the account has no campaign with the ID, and 409 when the campaign is not active, paused or pending_approval or a send is in progress.

put/campaigns/{id}

Request

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

Path parameters

idstring required

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 required

Send time in milliseconds since the Unix epoch. Must be in the future.

Example request

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

Response

OK

$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.