v1 · API reference

SMS

Beta. Send transactional and marketing SMS, and track each message's delivery lifecycle. Marketing sends require recipient consent and honor recipient-local quiet hours. Returns `not_found` on workspaces where the channel isn't enabled yet.

Base URL: https://www.unitpost.com/api/v1

SMS

List SMS messages

GET/api/v1/sms

GET /sms
curl -X GET 'https://www.unitpost.com/api/v1/sms' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Response · 200
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "sms",
      "id": "id_123",
      "to": "customer@example.com",
      "from": "you@yourdomain.com",
      "direction": "outbound",
      "status": "queued",
      "type": "transactional",
      "body": "string",
      "segments": 0,
      "country": "string",
      "scheduled_at": "2026-01-01T00:00:00.000Z",
      "last_error": "string",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ]
}

Retrieve your workspace's SMS messages (outbound and inbound), newest-first and cursor-paginated. Use a message's id with Retrieve an SMS message to read its delivery state. Requires the sms:read capability.

Parameters3 fields
FieldTypeDescription
limitinteger · queryMax rows to return (default 20, max 100).
afterstring · queryReturn rows after this id (forward paging).
beforestring · queryReturn rows before this id (backward paging).
Response · 200 fields13 fields
FieldTypeDescription
objectrequiredstring
idrequiredstring
torequiredstring
fromrequiredobject
directionrequiredenumoutbound | inbound
statusrequiredenumqueued | scheduled | sending | sent | delivered | failed | suppressed | canceled | received
typerequiredenumtransactional | marketing
bodyrequiredobject
segmentsrequiredinteger
countryrequiredobject
scheduled_atrequiredobject
last_errorrequiredobject
created_atrequiredstring
200401403422

Send an SMS message

POST/api/v1/sms

POST /sms
curl -X POST 'https://www.unitpost.com/api/v1/sms' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ }'
Response · 200
{
  "object": "sms",
  "id": "id_123",
  "to": "customer@example.com",
  "from": "you@yourdomain.com",
  "direction": "outbound",
  "status": "queued",
  "type": "transactional",
  "body": "string",
  "segments": 0,
  "country": "string",
  "scheduled_at": "2026-01-01T00:00:00.000Z",
  "last_error": "string",
  "created_at": "2026-01-01T00:00:00.000Z"
}

Send a single SMS — now, or at a future time by passing scheduled_at. The recipient must be a valid E.164 number; marketing sends additionally require the recipient's prior express consent on record and honor recipient-local quiet hours (they are deferred to the next allowed window, never dropped). Billing is per segment. Read delivery state back with Retrieve an SMS message. Requires the sms:send capability.

Request body4 fields
FieldTypeDescription
torequiredstringRecipient phone number in E.164 format, e.g. `+15551234567`.
bodyrequiredstringMessage text. Billing is per segment (160 GSM-7 chars single-segment, 153 per segment concatenated; 70/67 for Unicode).
typeenumtransactional | marketingMarketing sends require the recipient's prior express consent on record and honor recipient-local quiet hours.
scheduled_atstringISO-8601 time to send at. Omit to send immediately.
Response · 200 fields13 fields
FieldTypeDescription
objectrequiredstring
idrequiredstring
torequiredstring
fromrequiredobject
directionrequiredenumoutbound | inbound
statusrequiredenumqueued | scheduled | sending | sent | delivered | failed | suppressed | canceled | received
typerequiredenumtransactional | marketing
bodyrequiredobject
segmentsrequiredinteger
countryrequiredobject
scheduled_atrequiredobject
last_errorrequiredobject
created_atrequiredstring
200401403422429

Retrieve an SMS message

GET/api/v1/sms/{id}

GET /sms/{id}
curl -X GET 'https://www.unitpost.com/api/v1/sms/123' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Response · 200
{
  "object": "sms",
  "id": "id_123",
  "to": "customer@example.com",
  "from": "you@yourdomain.com",
  "direction": "outbound",
  "status": "queued",
  "type": "transactional",
  "body": "string",
  "segments": 0,
  "country": "string",
  "scheduled_at": "2026-01-01T00:00:00.000Z",
  "last_error": "string",
  "created_at": "2026-01-01T00:00:00.000Z"
}

Retrieve one SMS message's current status, delivery state, and segment count by id. Requires the sms:read capability.

Parameters1 field
FieldTypeDescription
idrequiredstring · pathThe SMS message id (`sms_…`).
Response · 200 fields13 fields
FieldTypeDescription
objectrequiredstring
idrequiredstring
torequiredstring
fromrequiredobject
directionrequiredenumoutbound | inbound
statusrequiredenumqueued | scheduled | sending | sent | delivered | failed | suppressed | canceled | received
typerequiredenumtransactional | marketing
bodyrequiredobject
segmentsrequiredinteger
countryrequiredobject
scheduled_atrequiredobject
last_errorrequiredobject
created_atrequiredstring
200401403404