Sms
Send SMS and MMS from your numbers. Replies arrive in the inbox (platform sms) and as message.received events.
Who replied STOP
Section titled “Who replied STOP”GET
/v1/phone-numbers/{id}/sms/opt-outsTexts from this number to them are refused.
Parameters
idstringrequired
Response 200
data []
phoneNumberstringrequiredatstring (date-time)
curl "https://api.marsial.dev/v1/phone-numbers/num_…/sms/opt-outs" \ -H "Authorization: Bearer $MARSIAL_API_KEY"const res = await fetch('https://api.marsial.dev/v1/phone-numbers/num_…/sms/opt-outs', { headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, },});const { data } = await res.json();import os, requests
res = requests.get( "https://api.marsial.dev/v1/phone-numbers/num_…/sms/opt-outs", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"},)data = res.json()["data"]Send an SMS
Section titled “Send an SMS”POST
/v1/sms/messagesFrom one of your numbers with SMS on. Replies thread into the inbox conversation it returns.
Body
numberIdstringrequiredThe number that sends it (num_…), with SMS on.
tostringrequiredtextstringUp to 10 SMS segments.
mediaUrlsstring (uri)[]Public media URLs: sends an MMS where the carrier allows it.
sendAtstring (date-time)Schedule it for later.
idempotencyKeystring
Response 201
data
conversationIdstring | nullrequiredThe inbox conversation (cnv_…) replies thread into.
statusstringrequired
curl -X POST "https://api.marsial.dev/v1/sms/messages" \ -H "Authorization: Bearer $MARSIAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "numberId": "num_…", "to": "+447700900123", "text": "Your order 4821 is on its way" }'const res = await fetch('https://api.marsial.dev/v1/sms/messages', { method: 'POST', headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "numberId": "num_…", "to": "+447700900123", "text": "Your order 4821 is on its way" }),});const { data } = await res.json();import os, requests
res = requests.post( "https://api.marsial.dev/v1/sms/messages", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"}, json={ "numberId": "num_…", "to": "+447700900123", "text": "Your order 4821 is on its way" },)data = res.json()["data"]© 2026 Marsial by TWOFACES ·marsial.dev ·Dashboard ·soporte@twofacesco.com