Messaging (SMS & WhatsApp)
Send SMS and WhatsApp from your own numbers — multi-provider BYO routing, the POST /sms endpoint, the send_message MCP tool, and conversation history.
Messaging
Beyond voice, Agoralia sends SMS and WhatsApp from the same workspace numbers used for calls. Messages go out on your own provider — the sending carrier and credentials are resolved from the number, so you keep your sender identity and your rates.
How routing works
When you send a message, Agoralia resolves the sender number (or you pass from_number),
looks up that number's provider, loads your encrypted credentials, and dispatches to that
provider's API. Conversations, message history, and monthly usage are tracked per workspace.
- SMS is sent via the number's carrier: Telnyx, Twilio, Vonage, Sinch, Bird, Infobip, or Bandwidth.
- WhatsApp is sent through your connected Meta WhatsApp Business Account when present, otherwise via a carrier that resells WhatsApp (Telnyx/Vonage).
Connect the carrier first
For any provider except SIP, connect the carrier's API credentials once via
POST /integrations/connect — see
Connect a carrier. The
response's sms_ready / sms_missing tell you whether the credentials are enough to send
SMS (notably Sinch needs service_plan_id + api_token in addition to its number keys).
Send an SMS (REST)
curl -X POST https://api.agoralia.app/api/v1/sms \
-H "X-API-Key: ag_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: <uuid>" \
-d '{
"to": "+393408994869",
"body": "Hi from Agoralia",
"from_number": "+14155550123"
}'| Field | Required | What it is |
|---|---|---|
to | yes | Destination in E.164 form. |
body | yes | Message text (up to 1600 chars). |
from_number | — | Sender in E.164. When omitted, an SMS-capable workspace number is chosen. |
metadata | — | Optional object stored with the message. |
Returns 202 with message_id and conversation_id. Requires the sms:write scope. Send
Idempotency-Key to make retries safe.
Send via MCP
send_message(to="+393408994869", body="Hi from Agoralia")
send_message(to="+393408994869", body="Ciao", channel="whatsapp")channel is sms (default) or whatsapp. The same provider/Meta routing applies. Reading
tools: list_conversations, get_conversation_messages, get_messaging_usage.
Provider coverage
| Provider | SMS | Credential fields for SMS |
|---|---|---|
| Telnyx | ✅ | api_key |
| Twilio | ✅ | account_sid, auth_token |
| Vonage | ✅ | api_key, api_secret |
| Sinch | ✅ | service_plan_id, api_token (+ sms_region, default us) |
| Bird | ✅ | access_key (+ optional sms_channel_id) |
| Infobip | ✅ | api_key, host |
| Bandwidth | ✅ | username, password, account_id, application_id |
Inbound & STOP
Inbound messages are matched to the workspace that owns the destination number and appended to
the conversation. A reply of STOP / UNSUBSCRIBE / CANCEL / END / QUIT adds the sender
to your DNC list automatically.
Next
- Phone numbers — link a BYO number and connect a carrier.
- Scopes —
sms:write,numbers:write.
Journeys & pipelines
Two different multi-step concepts — journeys sequence touches (call/wait/sms) per contact over time; pipelines run multiple agents on a single call.
Calls & transcripts
Read call outcomes, transcripts, summaries, structured data and recordings over REST or MCP — every call is a structured record you can pull headless.