OverviewPlatformsAPI ReferenceResources

Send an SMS/MMS

POSThttps://zernio.com/api/v1/sms/messages

Sends an SMS (or MMS when mediaUrls is set) from one of your SMS-enabled numbers. At least one of text / mediaUrls is required. Both numbers are normalized to E.164, so from matches regardless of formatting and replies thread into the same inbox conversation.

US numbers must have an approved carrier registration (/v1/sms/registrations) before messages deliver.

Replies and delivery status arrive as webhooks, not by polling: an inbound reply fires message.received with platform: "sms", the first message of a new thread also fires conversation.started, and this message's own outcome fires message.delivered or message.failed (the latter carrying the carrier's error code).

Opted-out recipients: a send to a number that replied STOP is refused with 409, never silently dropped.

Idempotency: send an Idempotency-Key header to make retries safe: same key + same body replays the original response instead of sending a second message; same key + different body returns 422; a key still in flight returns 409.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Body

application/json

What every request needs

fromstringRequired

One of your SMS-enabled numbers (E.164; formatting is normalized).

tostringRequired

Recipient number (E.164).

Optional parameters3 fields
textstring

Message body. Required unless mediaUrls is set. Max 10 SMS segments (1530 GSM-7 or 670 unicode characters).

mediaUrlsarray of string (uri)

Public media URLs to attach (sends as MMS). Max 10.

sendAtstring (date-time)

Optional. Schedule the send for a future time (ISO 8601 with offset, e.g. 2026-08-01T12:00:00Z). Must be in the future. The message is queued and the message.delivered webhook fires when it actually sends.

Headers

Optional
Idempotency-Keystring, max 255

Optional client-generated unique key (e.g. a UUID) that makes retries safe.

  • Same key + same body: replays the original response.
  • Same key + different body: 422.
  • Key still processing: 409.

A request cut off mid-handler (e.g. by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.

On the Ads create, boost and duplicate endpoints, a same-body retry runs again once the cut-off request started more than 15 minutes ago.

Responses

Success· the request worked

Errors· the request failed

POST/v1/sms/messages
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.sms.sendSms({  body: {    from: 'string',    to: 'string',  },});console.log(data);
{  "id": "string",  "conversationId": "string",  "status": "sent"}
OpenAPI specification
Was this page helpful?