Connecting any HTTP SMS gateway
Configure a gateway that is not built in: request shape, authentication, responses and plain HTTP.
Use a generic HTTP provider account to connect an SMS gateway that Sauti does not support natively. Open Providers › Provider accounts and create an account of the generic HTTP type.
Request shape#
Start from a preset that matches the gateway's documentation, then adjust:
| Preset | Typical gateway |
|---|---|
| JSON POST | POST with a JSON body |
| Form POST | POST with application/x-www-form-urlencoded fields |
| GET with query | All values in the URL query string |
| POST with query parameters | POST where to, from and message are URL parameters |
Each part of the request is configurable independently:
- Method: GET, POST or PUT.
- URL query parameters and path segments. Every value is URL-encoded correctly.
- Body: JSON, form-encoded, multipart, XML (values are escaped) or none.
- Headers: static or templated.
Placeholders#
| Placeholder | Value |
|---|---|
{{to}} |
The recipient, in the number format chosen for the account: +2547…, 2547… or 07… |
{{sender}} |
The approved sender ID |
{{message}} |
The message text |
{{ref}} |
Sauti's idempotency reference for the message |
{{parts}} |
The number of SMS parts |
{{timestamp}} |
The time of the request |
{{secret.<name>}} |
A stored secret, such as {{secret.api_key}} |
If the gateway accepts many recipients in one request, mark the account bulk-capable and set the separator. Sauti then batches recipients.
Authentication#
Choose none, API key in a header, API key in the query, Basic authentication, Bearer token, or an HMAC signature header (body plus timestamp, with a configurable algorithm). Secrets are stored in the secrets service and referenced by name. They are never shown back, logged or included in test results; logged URLs are redacted.
Reading the response#
Define success by any combination of an HTTP status range, a JSON path value, or plain-text contains or regex. Extract the message ID by JSON path, XML path or regex. For bulk requests, map per-recipient results. Delivery reports use the provider's webhook mapping.
Plain HTTP gateways#
Some gateways only offer http://. Sauti allows this only when a super admin ticks Allow plain HTTP for this account and records a reason. The form warns that the API key and message content travel unencrypted and can be read by anyone on the network path. The address must still be on the egress allowlist (Settings › Egress), resolve to a public address, and must not redirect. Plain HTTP is never allowed for payments or reveals.
Prefer HTTPS whenever the gateway supports it.
Testing#
Use the live request preview (secrets and the number are masked) to compare with the gateway's documentation, then Send test SMS to a number you enter. The result shows the status, the provider's response code and the parsed message ID, or one of the test reasons listed in Providers, senders and routing.