Send SMS & MMS via API

Connect my tools3 min readUpdated 2026-03-12

Send SMS & MMS via API

The SMS endpoint lets you send text and multimedia messages from your JustCall numbers through a simple API call. Use it for transactional alerts, appointment reminders, follow-ups, or any conversational messaging workflow.

Endpoint

POST https://api.justcall.io/v2/texts/send

Request Parameters

ParameterTypeRequiredDescription
fromstringYesYour JustCall SMS-enabled number (E.164 format)
tostringYesRecipient phone number (E.164 format)
bodystringYesMessage text (up to 1,600 characters)
media_urlstringNoPublicly accessible URL of an image or file to send as MMS
webhook_urlstringNoURL to receive delivery status updates

Code Example: Send an SMS

curl -X POST "https://api.justcall.io/v2/texts/send" \
  -H "Authorization: {api_key}:{api_secret}" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "+14155551234",
    "to": "+14155559876",
    "body": "Hi Alex, your appointment is confirmed for tomorrow at 2 PM."
  }'

Code Example: Send an MMS

curl -X POST "https://api.justcall.io/v2/texts/send" \
  -H "Authorization: {api_key}:{api_secret}" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "+14155551234",
    "to": "+14155559876",
    "body": "Here is your invoice for March.",
    "media_url": "https://yourapp.com/invoices/march-2026.pdf"
  }'

Successful Response

{
  "status": "success",
  "message": "Message sent",
  "data": {
    "message_id": "msg_4d9e1a7f",
    "from": "+14155551234",
    "to": "+14155559876",
    "direction": "outbound",
    "status": "queued"
  }
}

Character Limits and Segment Billing

SMS messages are billed per segment. A single segment supports up to 160 GSM-7 characters (standard Latin letters, numbers, and common symbols). If your message uses Unicode (emojis, non-Latin scripts), the limit drops to 70 characters per segment.

EncodingCharacters per segmentMax characters (concatenated)
GSM-71601,600 (10 segments)
Unicode701,120 (16 segments)

Messages longer than one segment are automatically split and reassembled on the recipient's device, but each segment is billed individually.

Delivery Status Webhook

If you include a webhook_url, JustCall sends a POST request when the delivery status changes:

StatusDescription
queuedMessage accepted and queued for delivery
sentMessage sent to carrier
deliveredCarrier confirmed delivery
failedMessage could not be delivered
undeliveredCarrier rejected the message

The webhook payload includes message_id, status, to, from, and timestamp.

MMS Supported Media Types

TypeFormatsMax size
ImageJPEG, PNG, GIF5 MB
FilePDF, VCF5 MB
VideoMP4 (carrier support varies)5 MB

Error Handling

CodeMeaningFix
400Missing from, to, or bodyInclude all required fields
404from number not found or not SMS-enabledUse an SMS-enabled JustCall number
422Message body exceeds character limitShorten the message to 1,600 characters or fewer
429Rate limit exceededRetry with exponential backoff

Was this helpful?