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

API reference

SMS providers

POST/api/v1/sms/providers

Add an SMS provider, blank or copied from another.

CLI
sendmock sms providers create
MCP tool
sendmock_sms_provider_create
In the app
SMS > Providers > Add provider

Request body (application/json)

MessageProviderCreateRequest : Body of POST /api/v1/emails/providers and /api/v1/sms/providers.

FieldTypeDescription
namestring
The new provider's name.Example: SSL Wireless
keystring
Its key in /providers/<key>/... paths and on messages; lowercase, fixed after creation.Example: sslwireless
start_fromstring | null
A provider of the same area to copy, or null to start blank.Example: twilio

Answer

201 MessageProviderDefinition

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

Try it in Demo mode

PATCH/api/v1/sms/providers/{providerKey}

Change a provider; 400 with the problems for template errors, bad paths or a path clash.

CLI
sendmock sms providers update <providerKey>
MCP tool
sendmock_sms_provider_update
In the app
SMS > Providers > provider > Save provider

Request body (application/json)

MessageProviderInput : Body of PATCH .../providers/{providerKey}; the key and area are fixed.

FieldTypeDescription
keystring
The /providers/<key>/... path and the provider value stored on each message; lowercase, fixed after creation.Example: sendgrid
namestring
The provider's name, shown on messages and in pickers.Example: SendGrid
accentstring
#rrggbb, used on its badge.Example: #1a82e2
is_enabledboolean
Off providers answer nothing; their paths get SendMock's native 404.Example: true
hoststring | null
The provider's API host, used on the provider port to tell apart providers that share a path; null when not needed.Example: api.sendgrid.com
credentialsProviderCredential[]
The credentials your app is configured with.
check_credentialsboolean
Off by default: any credentials are accepted. On: wrong ones get the provider's unauthorized answer.Example: false
operationsProviderOperation[]
The requests it answers.
field_mappingProviderFieldMapping[]
Where each part of a sent message is read from; anything else is kept as metadata.
validation_rulesProviderValidationRule[]
The checks run on each send, in order.
success_responseProviderResponseTemplate
The answer to a request that passes every check.
error_responsesProviderErrorResponse[]
The answer for each kind of error.
message_id_templatestring
The provider's id for each message, a template.Example: <{{ uuid() }}@sendmock.local>
callback_template_keystring | null
The webhook template its status callbacks and inbound messages are sent with; null sends none.Example: sendgrid-event
status_namesobject
The provider's name for each SendMock status.
outcome_error_codesobject
SMS only: the provider's error code for each delivery outcome, so test numbers fail with its own codes.

Answer

200 MessageProviderDefinition

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

Try it in Demo mode

POST/api/v1/sms/providers/{providerKey}/preview

Run a sample request through a definition: the message it would store and the answer it would give.

CLI
sendmock sms providers preview <providerKey>
MCP tool
sendmock_sms_provider_preview
In the app
SMS > Providers > provider > Preview

Request body (application/json)

MessageProviderPreviewRequest : Body of POST .../providers/{providerKey}/preview.

FieldTypeDescription
providerMessageProviderInput
The provider settings to run, saved or not.
sample_request?ProviderSampleRequest
The request to run; the provider's example send when left out.

Answer

200 MessageProviderPreview

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

Try it in Demo mode

GET/api/v1/sms/providers/{providerKey}/credentials/{credentialName}

Reveal one secret credential (asked for after a confirmation).

CLI
sendmock sms providers credential <providerKey> <credentialName> --reveal
MCP tool
None: Agents may set secrets but never read them back; the CLI and UI reveal them after a confirmation.
In the app
SMS > Providers > provider > General > Reveal

Answer

200 ProviderCredentialReveal

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

Try it in Demo mode

POST/api/v1/sms/whatsapp-cloud/verify-webhook

Send Meta's callback URL check to the app and report whether it answered the challenge.

CLI
sendmock sms whatsapp-cloud verify-webhook
MCP tool
sendmock_sms_whatsapp_verify_webhook
In the app
SMS > Providers > WhatsApp Cloud > Verify callback URL

Request body (application/json)

WhatsappWebhookVerificationRequest : Body of POST /api/v1/sms/whatsapp-cloud/verify-webhook.

FieldTypeDescription
url?string
The URL to check; the WhatsApp Cloud provider's webhook_url when left out.Example: http://127.0.0.1:3000/whatsapp/webhook

Answer

200 WhatsappWebhookVerification

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

Try it in Demo mode