Send SMS
Send an SMS message. Supports both verification codes and custom messages with multiple provider options.
Authorizations
Project API key (sk_live… or sk_dev…). Send it as Authorization: Bearer <api_key>.
Body
SMS request parameters. First select smsType; inputs show/hide accordingly.
- Verification Message
- Custom Message
- WhatsApp Template Message
Phone number in international format without + (e.g., 964750123456)
^[0-9]{10,15}$"964750123456"
Must be set to "verification" for sending verification codes. This value determines the message type and required fields.
Verification code to send
1 - 20"123456"
Optional sender ID to use for the message
11"OTPIQ"
Optional WhatsApp Business Account ID for using custom WhatsApp sender
"68c46fecc509cdcec8fb3ef2"
Optional WhatsApp Phone Number ID for using custom WhatsApp sender
"68da31fb518ac3db3eb0a0f4"
Optional WhatsApp template name for using custom WhatsApp sender
"verification_template"
Provider/channel to use
auto, whatsapp-sms, telegram-sms, whatsapp-telegram-sms, sms, whatsapp, telegram "whatsapp-sms"
Optional webhook delivery report configuration
Response
SMS sent successfully. Response body includes: message (string), smsId (string), remainingCredit (number), cost (number), canCover (boolean), paymentType ('prepaid' | 'postpaid').
Success message
"SMS task created successfully"
Unique identifier for the SMS message
^sms-[a-f0-9]{24}$"sms-1234567890abcdef123456"
Remaining credit balance after the transaction
x >= 014800
Cost of the SMS in IQD
x >= 0200
Whether the user has sufficient credit to cover the cost
true
Payment type of the user account
prepaid, postpaid "prepaid"