Send a Message
Send SMS and MMS messages using the CloudVNO API. Includes outbound messaging, scheduling, and status callbacks.
Send Your First SMS
from cloudvno import Client
client = Client("YOUR_API_KEY")
message = client.messages.send(
from_="+14155551234",
to="+12125559876",
body="Hello! Your order #1234 has shipped and will arrive by Thursday."
)
print(f"SID: {message.sid}")
print(f"Status: {message.status}")
const message = await client.messages.send({
from: '+14155551234',
to: '+12125559876',
body: 'Hello! Your order #1234 has shipped.',
});
curl -X POST https://api.cloudvno.com/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "+14155551234",
"to": "+12125559876",
"body": "Hello! Your order has shipped."
}'
Response
{
"sid": "SM1a2b3c4d5e6f7890abcdef1234567890",
"status": "queued",
"from": "+14155551234",
"to": "+12125559876",
"body": "Hello! Your order has shipped.",
"direction": "outbound-api",
"date_created": "2026-03-06T10:00:00Z",
"date_sent": null,
"price": null,
"price_unit": "USD"
}
Send MMS
Include a media_url to send an image or other media:
message = client.messages.send(
from_="+14155551234",
to="+12125559876",
body="Here's your receipt",
media_url=["https://example.com/receipt.png"]
)
Schedule a Message
Send a message at a future time using send_at:
from datetime import datetime, timezone
message = client.messages.send(
from_="+14155551234",
to="+12125559876",
body="Your appointment is tomorrow at 2pm!",
send_at=datetime(2026, 3, 7, 9, 0, 0, tzinfo=timezone.utc)
)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string | Yes | Your CloudVNO phone number (E.164 format) |
to | string | Yes | Destination phone number (E.164 format) |
body | string | Yes* | Message text. *Required unless media_url provided |
media_url | array | No | Array of media URLs for MMS |
send_at | ISO 8601 | No | Schedule message for a future time |
status_callback | URL | No | Webhook URL for status updates |
validity_period | integer | No | Max delivery time in seconds (default: 14400) |