sms
Send an SMS or MMS
Send a text (SMS) or media (MMS) message from one of your SMS-enabled numbers.
Provide text, mediaUrls, or both. Supply an Idempotency-Key header to make retries safe (a repeated key replays the original result instead of sending again). US numbers must have an approved carrier registration before they can deliver.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
fromstring
One of your SMS-enabled numbers (E.164).
tostring
Recipient number (E.164).
text?string
mediaUrls?array<string>
Publicly reachable media URLs for MMS (max 10, total < 1MB).
Response Body
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.sms.sendSms({ body: { from: '+14155550192', to: '+14155550123', },});console.log(data);{
"id": "string",
"conversationId": "string",
"status": "sent"
}