Update an SMS campaign

Update an SMS campaign

PATCH/api/v1/sms/campaigns/{id}

PATCH /sms/campaigns/{id}
curl -X PATCH 'https://www.unitpost.com/api/v1/sms/campaigns/cmp_123' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{ }'
Response · 200
{
  "object": "sms_campaign",
  "id": "id_123",
  "name": "Example",
  "status": "draft",
  "type": "marketing",
  "template_id": "template_123",
  "segment_id": "segment_123",
  "sender_id": "sender_123",
  "topic_id": "topic_123",
  "routing": "automatic",
  "scheduled_at": "2026-01-01T00:00:00.000Z",
  "hold": {
    "reason": "scheduled",
    "until": "string"
  },
  "projected_recipients": {
    "total": 1,
    "reachable": 0,
    "skipped": 0
  },
  "recipient_count": 1,
  "variable_fallbacks": {},
  "excluded_contact_ids": [
    "string"
  ],
  "started_at": "2026-01-01T00:00:00.000Z",
  "completed_at": "2026-01-01T00:00:00.000Z",
  "canceled_at": "2026-01-01T00:00:00.000Z",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Edit a draft SMS campaign: name, template, segment, sender (null returns to automatic routing), topic, excluded_contact_ids, variable_fallbacks and the saved send time scheduled_at (null clears it). Once the campaign has been sent or scheduled, or while it is archived, edits return 409. Pass { "archived": true | false } to archive or restore it (this takes precedence over other fields). Requires the campaigns:write capability.

Parameters1 field
FieldTypeDescription
idrequiredstring · path—
Request body9 fields
FieldTypeDescription
archivedboolean—
namestring—
template_idstring—
segment_idstring—
sender_idstring | null—
topic_idstring | null—
excluded_contact_idsstring[]—
variable_fallbacksobject—
scheduled_atstring | null—
Response · 200 fields21 fields
FieldTypeDescription
objectrequiredstring—
idrequiredstring—
namerequiredstring—
statusrequiredenumdraft | scheduled | sending | paused | sent | canceled | failed—
typerequiredenummarketing | transactional—
template_idrequiredstring—
segment_idrequiredstring—
sender_idrequiredstring | null—
topic_idrequiredstring | null—
routingrequiredenumautomatic | fixed | pool—
scheduled_atrequiredstring | null—
holdrequiredobject | null—
projected_recipientsrequiredobject | null—
recipient_countrequirednumber—
variable_fallbacksrequiredobject—
excluded_contact_idsrequiredstring[]—
started_atrequiredstring | null—
completed_atrequiredstring | null—
canceled_atrequiredstring | null—
created_atrequiredstring—
updated_atrequiredstring—
200401403404409422

Search docs and guides

Search the docs and product guides.