Swift SMS

API reference

Copy-paste ready JSON examples for SMS, OTP, and verification.

JSON X-Sender-Key ERPNext-ready

Authentication

Send the sender key in a header or request body.

  • X-Sender-Key: sx_...
  • sender_api_key for body payloads
  • Rotating the sender key invalidates the previous key.

Response pattern

  • success tells you if the request was accepted.
  • message explains the result.
  • Successful SMS requests return a request_id.
  • Successful OTP requests return an id.

Send SMS

{
  "to": "0540519119",
  "message": "Payment received successfully.",
  "sender_id": "TESTSMS",
  "sender_api_key": "sx_your_sender_key"
}
curl -X POST https://sms.brillsinnovation.com/send_sms.php \
  -H "Content-Type: application/json" \
  -H "X-Sender-Key: sx_your_sender_key" \
  -d '{"to":"0540519119","message":"Payment received successfully.","sender_id":"TESTSMS"}'

Send OTP

{
  "phone": "0540519119",
  "pin_length": 6,
  "expiry_amount": 10,
  "expiry_duration": "minutes",
  "sender_id": "TESTSMS",
  "sender_api_key": "sx_your_sender_key"
}

Verify OTP

{
  "phone": "0540519119",
  "code": "243714",
  "sender_api_key": "sx_your_sender_key"
}

Endpoints

  • SMS: https://sms.brillsinnovation.com/send_sms.php
  • OTP: https://sms.brillsinnovation.com/send_otp.php
  • Verify OTP: https://sms.brillsinnovation.com/verify_otp.php

Integration tips

  • Use one sender key per sender ID in ERPNext or any client app.
  • Store the key in your app config, not in client-side code.
  • Regenerate the key from the dashboard when you need to revoke access.