Skip to main content
SMS gives your agent a direct line to people’s phones — no app installs, no accounts, no friction. It’s the highest-read communication channel available. Commune’s SMS API handles message routing, delivery tracking, conversation threading, compliance (STOP/UNSTOP), and suppression automatically.

What SMS enables for agents

  • Outbound messaging — send notifications, confirmations, reminders, alerts
  • Two-way conversations — receive replies, maintain context across a thread
  • MMS — send images, documents, PDFs, and media alongside text
  • Delivery visibility — know exactly when a message was delivered or why it failed
  • Compliance by default — STOP replies are respected automatically, no manual work needed
  • Per-number threading — every conversation between your number and a contact is a discrete thread
  • Semantic search — search across all SMS history with natural language (Business+)

How conversations work

Every SMS exchange is organized into a conversation thread keyed by (your_number, contact_number). When you send a message, it’s added to that thread. When the contact replies, their message is added to the same thread. Your agent always has full context. Thread IDs are deterministic — the same (phone_number_id, contact_number) pair always produces the same 32-character hex thread ID. The thread ID is returned in every send response and inbound webhook payload; pass it on subsequent sends to keep replies grouped.

SMS vs MMS

Long text messages over 160 characters are automatically split into segments and reassembled by the recipient’s device. Smart encoding (GSM-7) reduces segment count where possible.

The SMS message object


Send an SMS

Parameters

Either body or media_url (or both) must be provided.

Response


Send an MMS (with media)

Media URLs must be publicly accessible. Commune fetches and delivers the media to the carrier at send time. Supported types: JPEG, PNG, GIF, WebP, MP4, PDF, MP3.

List messages

Parameters


List conversations

Get all conversation threads for a phone number, grouped by contact number and sorted by most recent activity.

Response

Pass cursor as a query parameter to paginate through results.

Get a conversation thread

Retrieve the full back-and-forth between your number and a contact, ordered chronologically.

Response


Receiving inbound SMS

Set a webhook on your phone number to receive inbound messages in real time:
When an inbound message arrives, Commune POSTs to your webhook:
Reply using the same thread_id and from/to reversed:

Delivery statuses

delivered confirmation requires carrier support. Most US carriers provide delivery receipts. International delivery receipts vary by country.

Compliance and opt-outs

Commune automatically handles SMS compliance:
  • STOP replies — when a contact replies with STOP (or STOPALL, UNSUBSCRIBE, CANCEL, END, QUIT), they are added to your suppression list and no further messages are sent to them from any of your numbers
  • START/UNSTOP replies — automatically removes the number from suppressions
  • Suppression list — blocked numbers are enforced at the API level before any carrier call is made
STOP messages are stored and delivered to your webhook so your agent can see them, but the suppression is added immediately. Any subsequent send attempt to a suppressed number returns 422 recipient_suppressed.

View suppressions

Response

phone_number_id: null means the suppression is org-wide (applies across all your numbers).

Remove a suppression

Re-enable messaging to a number that previously opted out. Only do this with fresh explicit consent.
Removing a suppression for a number that sent STOP carries compliance risk. Ensure you have documented re-consent before messaging again.

Semantic search Business

Search your entire SMS history with natural language. Useful for agents that need to recall past conversations, check if a topic was discussed, or find messages from a specific contact.
Semantic search is available on Business plan and higher.

Parameters


Rate limits

Daily and monthly limits can be adjusted from Dashboard → Phone Settings. When a rate limit is hit, the API returns 429 with one of:
  • sms_daily_limit_per_number — exceeded per-number daily limit
  • sms_daily_limit_total — exceeded org daily limit
  • sms_monthly_limit — exceeded org monthly limit

Sending at scale

If your agent sends SMS to many contacts, follow these patterns: Check suppressions first — before sending to a bulk list, filter against your suppression list via GET /v1/sms/suppressions. Use thread_id — always pass thread_id for follow-up messages to keep context and avoid duplicate sends. Respect the 1 msg/sec limit per contact — add a delay between sends to the same contact. Monitor delivery status — set up a delivery webhook or poll message status to track failed messages and retry where appropriate.

Credits by country

Outbound SMS costs per segment. Inbound is typically half the outbound rate. Credits are purchased in bundles or included in your plan. See Credits.
Last modified on March 19, 2026