Skip to main content
Send an SMS message to one or more phone numbers.

Request Body

to
string | string[]
required
The recipient phone number(s) in E.164 format (e.g., +14155551234). Can be a single number or an array of up to 100 numbers.
body
string
required
The SMS message content. Maximum 1600 characters (will be split into multiple segments if needed).
from
string
Optional alphanumeric sender ID (1-11 characters, e.g., Unosend). Note: Not all countries support custom sender IDs. If not provided, defaults to Unosend.
metadata
object
Custom key-value pairs to attach to the message for your reference.
tags
string[]
Tags to categorize the message for filtering and analytics.

Response

Returns an array of results for each recipient.
data
array

Segment Calculation

SMS messages are charged per segment:
  • GSM-7 encoding (standard characters): 160 characters per segment
  • Unicode/UCS-2 (emojis, special chars): 70 characters per segment
  • Multi-part messages: 153 chars (GSM-7) or 67 chars (Unicode) per segment due to header overhead

Example

curl -X POST https://www.unosend.co/api/v1/sms \
  -H "Authorization: Bearer un_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+14155551234",
    "body": "Your verification code is 123456"
  }'

Response Example

{
  "data": [
    {
      "id": "sms_abc123",
      "to": "+14155551234",
      "status": "sent",
      "message_id": "acs_xyz789",
      "segments": 1
    }
  ]
}

Pricing

SMS is pay-as-you-go from your wallet balance:
  • First 10 SMS: Free (per organization, lifetime)
  • After free tier: $0.01 per SMS segment
Add funds to your wallet at Settings → Wallet to send SMS beyond the free tier.

Delivery Reports

SMS delivery status is automatically updated via webhooks. You can:
  1. Check status by fetching the message: GET /v1/sms/{id}
  2. Set up webhooks to receive delivery notifications

Opt-Out Handling

Recipients can opt out by replying STOP to any message. Unosend automatically:
  • Blocks future messages to opted-out numbers
  • Returns an error when attempting to send to opted-out recipients
  • Processes opt-in requests when recipients reply START