Skip to main content
POST
/
sms
{
"message": "SMS task created successfully",
"smsId": "sms-1234567890abcdef123456",
"remainingCredit": 14800,
"cost": 200,
"canCover": true,
"paymentType": "prepaid"
}

Body

application/json

SMS request parameters.

Required:

  • phoneNumber: International format without + (e.g., 964750123456)
  • smsType: 'verification' or 'custom'

Conditional requirements:

  • When smsType = 'verification': verificationCode is required
  • When smsType = 'custom': customMessage and senderId are required

Optional:

  • provider: Choose from multiple options including fallback routes (default: 'auto')
    • whatsapp-sms: Try WhatsApp first, fallback to SMS (recommended)
    • telegram-sms: Try Telegram first, fallback to SMS
    • whatsapp-telegram-sms: Try WhatsApp → Telegram → SMS (maximum delivery success)
    • sms: SMS only
    • whatsapp: WhatsApp only
    • telegram: Telegram only
  • deliveryReport: WebhookConfig for delivery status webhooks

The body is of type unknown.

Response

SMS sent successfully. Response body includes: message (string), smsId (string), remainingCredit (number), cost (number), canCover (boolean), paymentType ('prepaid' | 'postpaid').