composer require iraqotpapi/otp
Curl, PHP, Python, etc

IraqOTPAPI API Docuemntation

IraqOTPAPI provides a powerful and modern API for sending One-Time Passwords (OTP) via WhatsApp and SMS. Designed for developers and businesses, the Iraq OTP API ensures reliable and secure message delivery with smart auto fallback per message—automatically switching between WhatsApp, SMS, or Telegram to guarantee successful delivery. Whether you’re building login verification, account security, or user onboarding features, our API supports multi-language messages, flexible sender IDs, and real-time delivery reports. Trusted across Iraq and the Kurdistan Region, IraqOTPAPI is the most advanced and locally-optimized OTP API for fast, affordable, and fail-proof communication in Iraq.

Iraq OTP API Endpoint

URL: http://api.iraqotpapi.com/v1/otp/send

Method: POST

Authorization Header: Authorization: Bearer {{API_KEY}}

Github

https://github.com/iraqotpapi/iraqotpapi-php-sdk

composer require iraqotpapi/otp

1-WhatsApp Fallback to SMS - lang (ar, en, ku)

POSTMAN EXAMPLE

curl --location 'http://api.iraqotpapi.com/v1/otp/send' 
--header 'Authorization: Bearer {{API_KEY}}' 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--data '{
    "to": "9647xxxxxxxxx",
    "sender": "SenderID",
    "channel": "whatsapp",
    "message": "123654",
    "fallback": "sms",
    "lang": "en"
}'
2-WhatsApp Fallback to Telegram - lang (ar, en, ku)

POSTMAN EXAMPLE

curl --location 'http://api.iraqotpapi.com/v1/otp/send' 
--header 'Authorization: Bearer {{API_KEY}}' 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--data '{
    "to": "9647xxxxxxxxx",
    "sender": "SenderID",
    "channel": "whatsapp",
    "message": "123654",
    "fallback": "telegram",
    "lang": "ar"
}'

Request Parameters

  • to (required) – Iraqi phone number in international format (e.g., 9647xxxxxxxxx)
  • sender (required) – Alphanumeric name or shortcode (max 11 characters)
  • channel (required) – One of whatsapp, sms, or telegram
  • message (required) – Message or OTP content (e.g., Your OTP code is 123654)
  • fallback (optional) – Alternative channel: sms or telegram (must differ from channel)
  • lang (optional) – Language code: en (English), ar (Arabic), ku (Kurdish)

Headers

  • Authorization (required) – Bearer YOUR_API_KEY
  • Content-Type (required) – application/json
  • Accept (required) – application/json