Sending Your First SMS via Unifonic API

To use Unifonic REST API, you will need a Unifonic account, an application ID (AppSid), and a registered sender.

  1. The URL is:, and the method is 'POST'

  2. In the API request, you have to include the following parameters:

AppSid Authentication string that uniquely identifies your application.6v253153s1g7831s5
SenderID The SenderID identifies who has sent the SMS message, typically a brand name; in case of not adding this parameter, the system will use the default SenderIDSender
Recipient Destination mobile number, mobile numbers must be in international format without 00 or + Example: (966507679351)966505980169
Body Message body. Supports both English and Unicodes characters e.g. Arabic.Hello world!
responseType Support JSON format onlyJSON
CorrelationID Optional
Unique identifier value that is attached to requests and messages.

API request examples:

curl --location --request POST '' \
--header 'Accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'AppSid=axuN0U7QqVPsfdgoK0mZFgdzG1' \
--data-urlencode 'SenderID=Unifonic' \
--data-urlencode 'Body=Hello there' \
--data-urlencode 'Recipient=966507679351' \
--data-urlencode 'responseType=JSON' \
--data-urlencode 'CorrelationID=CorrelationID' \
--data-urlencode 'baseEncode=true' \
--data-urlencode 'statusCallback=sent' \
--data-urlencode 'async=false'
curl --location --request POST ' message&Recipient=971507679351&responseType=JSON&CorrelationID=q1&baseEncode=true&statusCallback=sent&async=false' \
--header 'Accept: application/json'

API response example:

    "success": true,
    "message": "",
    "errorCode": "ER-00",
    "data": {
        "MessageID": 42000348806924,
        "CorrelationID": "CorrelationID",
        "Status": "Sent",
        "NumberOfUnits": 0,
        "Cost": 0,
        "Balance": 0,
        "Recipient": "971507679351",
        "TimeCreated": "2022-09-06 14:06:25.979",
        "CurrencyCode": ""
    "success": false,
    "message": "Dest num is too short",
    "errorCode": "ER-04",
    "data": {}

Unifonic API only supports JSON format. All requests must use the Content-type header set to application/json.


HTTP Status codes

400 No rules matched
401 Authentication failed
402 Missing parameter AppSid
404 Incompatible API version
406 Wrong parameter format
409 This message is duplicate
410 Invalid recipient format
412 Message body is too long
415 Invalid hex string
417 Wrong body format
419 Wrong date format in request
420 Page limit Exceeds
421 No message body specified
422 No recipient parameter specified
423 Required timeScheduled parameter is not passed
429 Too many requests generated by this user
431 MessageId is empty
432 MessageId must be numeric
440 Wrong sender format
449 Message body is empty
450 Too many destination numbers provided
451 TimeScheduled parameter must indicate time in the future
452 User must specify either messageId or recipient parameter
455 Scheduled message not found for this User
456 Wrong correlationId format
459 Authentication parameters are incorrectly base64 encoded
460 Invalid encoding (Should be UCS2 or GSM7)
480 This user cannot use specified SenderID
481 Country does not exist
482 Invalid dest num
483 Operator is not found
499 Error in configuration request
546 Incompatible external data type in configuration
548 Wrong dictionary configuration for response parameter
599 Request failed