Back to APIs

Unified Agent API

SMS

SMS

Send SMS or WhatsApp messages to any phone number with automatic channel selection and delivery status tracking.

POST/v1/messages/send

Overview

Your agent sends SMS or WhatsApp messages to phone numbers. Set channel to 'auto' to let the system pick the best delivery method, or specify 'sms' or 'whatsapp' explicitly. SMS uses physical Android phones via httpSMS. WhatsApp uses the Meta Cloud API.

Parameters

to

Required

string

Recipient phone number in E.164 format.

message

Required

string

Message text. SMS max 1600 chars, WhatsApp max 4096 chars.

channel

select (default: auto)

Delivery channel. Auto tries WhatsApp first, falls back to SMS.

Auto (WhatsApp > SMS)
SMS only
WhatsApp only

Example Response

{
  "success": true,
  "data": {
    "message_id": "wamid.abc123",
    "channel": "whatsapp",
    "to": "+1234567890",
    "status": "sent"
  },
  "metadata": {
    "provider_used": "whatsapp",
    "providers_tried": ["whatsapp"],
    "response_time_ms": 890,
    "request_id": "req_msg_001"
  },
  "credits_used": 1
}

Get Started

Use this API through the O-mega platform. Create an API key in your dashboard, then call the endpoint with your key in the Authorization header.

Try SMS

Test SMS in the interactive playground. No setup required.

Open Playground
SMS API | Unified Agent APIs | o-mega