Preview: SendMock has no stable release yet. These docs follow develop.

API reference

SMS

GET/api/v1/sms

SMS and WhatsApp messages, newest first, with filters.

CLI
sendmock sms list
MCP tool
sendmock_sms_list
In the app
SMS

Answer

200 PageOf_SmsMessage

Try it in Demo mode

POST/api/v1/sms

Native send, with optional media URLs or inline media.

CLI
sendmock sms send
MCP tool
sendmock_sms_send
In the app
Settings > Connection > Send this request

Request body (application/json)

NativeSmsRequest : Body of POST /api/v1/sms (native send).

FieldTypeDescription
fromstring
The sender: an E.164 number or an alphanumeric sender ID.Example: +15550001111
tostring
The recipient, an E.164 number; whatsapp:+... sends over WhatsApp.Example: +8801700000000
bodystring
The message text. Its length and characters decide the segments and the encoding (GSM-7 or UCS-2).Example: Your code is 482913
status_callback?string
Your app's URL that receives each status change (queued, sent, delivered, failed).Example: http://localhost:3000/sms/status
metadata?object
Any JSON you want stored with the message and echoed in its events.
media_urls?string[]
Public links SendMock downloads, like Twilio's MediaUrl.
media?InlineSmsMedia[]
Files sent inline as MMS media, base64 encoded.

Answer

201 SmsMessageDetail

Errors: 400, as { error: { code, message } }

Try it in Demo mode

GET/api/v1/sms/{smsId}

One message with its status history and callbacks.

CLI
sendmock sms show <smsId>
MCP tool
sendmock_sms_get
In the app
SMS > message > Message details

Answer

200 SmsMessageDetail

Errors: 404, as { error: { code, message } }

Try it in Demo mode

POST/api/v1/sms/{smsId}/open

Record a read and fire sms.opened.

CLI
sendmock sms open <smsId>
MCP tool
sendmock_sms_open
In the app
SMS > message menu > Simulate read

Request body (application/json)

OpenEventRequest : Body of `POST /emails/{emailId}/open` and `POST /sms/{smsId}/open`.

FieldTypeDescription
source?OpenSource
Who opened it: ui (the SendMock UI), manual (a person marking it) or api (a script). Defaults to api.One of: ui, manual, apiExample: api
user_agent?string
The browser or client that opened it, kept in the open history. The UI sends its own.Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5)
webhook_endpoint_ids?Ulid[]
Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide.
webhook_requests?WebhookRequestEdit[]
Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads.

Answer

204 No content

Errors: 404, 409, as { error: { code, message } }

Try it in Demo mode

GET/api/v1/sms/{smsId}/opens

Every recorded read of an outbound message, oldest first.

CLI
sendmock sms opens <smsId>
MCP tool
sendmock_sms_opens
In the app
SMS > message ticks (read)

Answer

200 OpenRecord[]

Errors: 404, as { error: { code, message } }

Try it in Demo mode

POST/api/v1/sms/{smsId}/status

Set a delivery status by hand and fire its callback.

CLI
sendmock sms status <smsId> <status>
MCP tool
sendmock_sms_set_status
In the app
SMS > Message details > Set status

Request body (application/json)

SmsStatusUpdate : Body of `POST /sms/{smsId}/status`: a manual status change.

FieldTypeDescription
statusSmsStatus
The new status; fires the status callback and the matching event.One of: queued, sent, delivered, undelivered, failed, receivedExample: delivered
error_code?string | null
A Twilio error code for failed or undelivered, e.g. 30003 (unreachable).Example: 30003
webhook_endpoint_ids?Ulid[]
Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide.
webhook_requests?WebhookRequestEdit[]
Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads.

Answer

200 SmsMessageDetail

Errors: 404, as { error: { code, message } }

Try it in Demo mode

POST/api/v1/sms/inbound

Simulate a message from a contact to one of your numbers.

CLI
sendmock sms inbound
MCP tool
sendmock_sms_simulate_inbound
In the app
SMS > conversation > Reply as recipient

Request body (application/json)

InboundSmsRequest : Body of POST /api/v1/sms/inbound (simulate an incoming message).

FieldTypeDescription
fromstring
Who texts your app: the user's number.Example: +8801700000000
tostring
Your app's number that receives it, usually a virtual number.Example: +15550001111
bodystring
The message text.Example: STOP
channel?SmsChannel
sms (default) or whatsapp.One of: sms, whatsappExample: sms
template_id?string
The payload template for the inbound webhook, instead of the number's (e.g. twilio.inbound_sms).Example: twilio.inbound_sms
media?InlineSmsMedia[]
Files sent with the message, as MMS or WhatsApp media.
webhook_endpoint_ids?Ulid[]
Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide.
webhook_requests?WebhookRequestEdit[]
Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads.

Answer

201 SmsMessageDetail

Errors: 400, as { error: { code, message } }

Try it in Demo mode