Skip to main content

Requirements

  • An active paid plan and SMS credits
  • SMS credits in your workspace (purchase from the billing page)
  • SMPP must be enabled on your Torpedo instance

Basic send

curl -X POST https://api.torpedo.co.mz/api/v1/sms \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+258841234567",
    "body": "Your verification code is 482910. Expires in 10 minutes."
  }'
The response is 202 Accepted — delivery is asynchronous.

Phone number format

The to field must be a valid Mozambican mobile number in E.164 format:
+258 8X XXXXXXX
Accepted prefixes: 84, 82, 83, 85, 86, 87 (Vodacom, Movitel, tmcel).
{ "to": "+258841234567" }  ✓
{ "to": "841234567" }      ✗  missing country code
{ "to": "+1234567890" }    ✗  not a Mozambican number

SMS status lifecycle

queued → sent → delivered
              ↘ failed
Poll GET /api/v1/sms/{id} to check the current status.

Idempotency

Pass an Idempotency-Key header to prevent duplicate sends on retries:
curl -X POST https://api.torpedo.co.mz/api/v1/sms \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Idempotency-Key: order-789-sms-confirmation" \
  -H "Content-Type: application/json" \
  -d '{ "to": "+258841234567", "body": "Your order has shipped." }'
If a request with the same key was already accepted, Torpedo returns the original 202 without sending again. Keys are scoped to your workspace.

Credits and quota

Each SMS deducts one credit from your workspace balance. If your balance reaches zero, sends return 402:
{
  "errors": [{ "message": "No SMS credits remaining. Contact support to top up." }]
}
Purchase additional credits from the billing page in your dashboard.

Suppression

Addresses that permanently fail delivery (UNDELIV, REJECTD SMPP error codes) are automatically added to the suppression list. Sending to a suppressed number returns 422:
{
  "errors": [{ "message": "Recipient '+258841234567' is suppressed (reason: hard_bounce)" }]
}
Remove an address from the suppression list via DELETE /api/v1/suppressions/{address}?channel=sms.