Each sender ID has its own API key. Pass it with every request.
A business can have multiple sender IDs. One can be marked primary, and each sender can be used independently.
POST to the SMS endpoint with the sender key, recipient, and message.
POST https://sms.brillsinnovation.com/send_sms.phpHeaders:
Content-Type: application/json
X-Sender-Key: sx_your_sender_key
Body:
{
"to": "0540519119",
"message": "Hello from Swift SMS",
"sender_id": "TESTSMS"
}
Use the same sender key and let Swift SMS send the one-time password message.
POST https://sms.brillsinnovation.com/send_otp.phpHeaders:
Content-Type: application/json
X-Sender-Key: sx_your_sender_key
Body:
{
"phone": "0540519119",
"pin_length": 6,
"expiry_amount": 10,
"expiry_duration": "minutes",
"sender_id": "TESTSMS"
}
Verify a code that was previously sent to the phone number.
POST https://sms.brillsinnovation.com/verify_otp.phpHeaders:
Content-Type: application/json
X-Sender-Key: sx_your_sender_key
Body:
{
"phone": "0540519119",
"code": "243714"
}
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":"Test SMS","sender_id":"TESTSMS"}'
| Field | Meaning |
|---|---|
| success | Whether the request was accepted and processed. |
| message | Human-readable status text. |
| data.request_id | SMS batch identifier. |
| data.id | OTP request identifier. |