SMS Gateway API
PingoLine provides direct, high-throughput SMS routing to all major Bangladeshi mobile operators: Grameenphone, Robi, Banglalink, Airtel, and Teletalk.
Send Single / OTP SMS
POST /api/v1/sms/send
Used for delivering instant OTP verification codes, order confirmations, and transactional receipts.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
phone | string | Yes | Recipient mobile number (e.g. 017XXXXXXXX or +88017XXXXXXXX) |
message | string | Yes | Text content (supports UTF-8 Bengali & English, up to 1530 characters) |
type | string | No | otp, order_confirmation, transactional, general, or alert |
Example Request
bash
curl -X POST "https://pingoline.com/api/v1/sms/send" \
-H "Authorization: Bearer YOUR_API_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"phone": "01712345678",
"message": "Your verification code is 492104. Valid for 5 minutes.",
"type": "otp"
}'php
use PingoLine\Laravel\Facades\PingoLine;
$res = PingoLine::sendSms(
phone: '01712345678',
message: 'Your verification code is 492104. Valid for 5 minutes.',
type: 'otp'
);typescript
import { PingoLine } from 'pingoline';
const pingoline = new PingoLine({ apiKey: process.env.PINGOLINE_API_KEY! });
const res = await pingoline.sendSms({
phone: '01712345678',
message: 'Your verification code is 492104. Valid for 5 minutes.',
type: 'otp',
});Successful Response (200 OK)
json
{
"success": true,
"status": "success",
"data": {
"status": "sent",
"recipient": "01712345678",
"parts": 1,
"cost": 0.45,
"message_id": "msg_9f2a81cb",
"wallet_balance": 450.50
}
}