MMS messages can include text, media files (images, videos, audio), and an optional subject line.
Basic Example
curl -X POST https://api.buildwithchirp.com/v1/sms \
-H "Authorization: Bearer YOUR_LIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "+15551234567",
"to": ["+15559876543"],
"text": "Check out this image",
"mediaUrls": ["https://example.com/image.jpg"],
"transport": "mms"
}'
With Subject Line
Add a subject to your MMS message:
curl -X POST https://api.buildwithchirp.com/v1/sms \
-H "Authorization: Bearer YOUR_LIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "+15551234567",
"to": ["+15559876543"],
"text": "Check out this photo from our event",
"subject": "Event Photos",
"mediaUrls": ["https://example.com/photo.jpg"],
"transport": "mms"
}'
MMS can be sent with just media and no text:
curl -X POST https://api.buildwithchirp.com/v1/sms \
-H "Authorization: Bearer YOUR_LIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "+15551234567",
"to": ["+15559876543"],
"mediaUrls": ["https://example.com/image.jpg"],
"transport": "mms"
}'
Include multiple media files in a single MMS:
curl -X POST https://api.buildwithchirp.com/v1/sms \
-H "Authorization: Bearer YOUR_LIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "+15551234567",
"to": ["+15559876543"],
"text": "Gallery from today",
"mediaUrls": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg",
"https://example.com/image3.jpg"
],
"transport": "mms"
}'
MMS messages must include either text or media (or both). They cannot be completely empty.
Automatic Transport
If you’re unsure whether your message will include media, use "automatic" transport:
curl -X POST https://api.buildwithchirp.com/v1/sms \
-H "Authorization: Bearer YOUR_LIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "+15551234567",
"to": ["+15559876543"],
"text": "Hello!",
"transport": "automatic"
}'
This automatically selects SMS (text only) or MMS (with media) based on your content.
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"from": "+15551234567",
"to": ["+15559876543"],
"text": "Check out this image",
"subject": null,
"mediaUrls": ["https://example.com/image.jpg"],
"type": "MMS",
"transport": "mms",
"direction": "OUTBOUND",
"status": "QUEUED",
"createdAt": "2024-01-15T12:00:00.000Z"
}