Send a single message
Usesms.send() to send one SMS message.
Parameters
Destination phone number in E.164 format.
Must include country code, e.g.
+14155551234.The text content of the SMS message. Standard SMS segments are 160 characters;
longer messages are split and billed per segment.
The message category. Affects routing and throughput limits.
TRANSACTIONAL— time-sensitive messages triggered by user actions (OTPs, alerts, confirmations). Higher default throughput.PROMOTIONAL— marketing or bulk messages. Subject to additional carrier filtering.
TRANSACTIONAL.Return value
The AWS message ID assigned to the sent message. Use this for delivery tracking.
Send a batch
Usesms.sendBatch() to send multiple messages in a single call.
Parameters
Array of message objects to send. Each object accepts the same
to and message
fields as send().Message category applied to all messages in the batch.
Defaults to
TRANSACTIONAL.Return value
sendBatch() returns an array. Each element corresponds to a message in the input array and contains:
The AWS message ID for the sent message.
Sandbox mode
To verify a destination number before sending:wraps sms upgrade to start that process.