POST Method (1) Use app sid to request token
https://api.tawasolsms.com/auth.php

Using the App SID, then receive a Response that includes your JWT access-token, which you will then provide in the Authorization each API

BODY formdata

app_sid
cvSc4T8NW1T9yqZLXHVrMYe2qxxxx

Application Id

Example Request
                                                
POST https://api.tawasolsms.com/auth.php

                                            
Example Response
200 - OK
POST Method (1) Send Message
https://api.tawasolsms.com/index.php

Use messages endpoint to send Single or Bulk SMS, Authorized using token or AppSid. When you send SMS messages using this API, the API will return to you the sent messages’ ID to track them later.

BODY formdata

AppSid
cvSc4T8NW1T9yqZLXHVrMYe2qIxxxx

Applcation Id

Body
Your URL is https://tawasolsms.com

Message content

mno
966xxxxxxxx1,966xxxxxxxx2

Mobile number, International format

Example Request
                                                
POST https://api.tawasolsms.com/index.php

                                            
Example Response
200 - OK
POST Method (2) Send Using SOAP
https://api.tawasolsms.com/index.php

Simple Single or Bulk SMS using SOAP included username and password. When you send SMS messages using this API, the API will return to you the sent messages’ ID to track them later.

PARAMS

Name
user

Username

Password
pass@123

Password

originator
Tawasol

Sender Id

recipientPhone
966xxxxxxxx1

Mobile number

smsText
test sms

Message content

Example Request
Example Response
200 - OK
GET Method (2) Send Using URL Parameters
https://api.tawasolsms.com/index.php?user=user&pass=pass@123&sid=Tawasol&mno=966xxxxxxxx1&text=test sms&type=1

Simple Single or Bulk SMS using URL parametrs included username and password. When you send SMS messages using this API, the API will return to you the sent messages’ ID to track them later.

PARAMS

user
user

Username

pass
pass@123

Password

sid
Tawasol

Sender Id

mno
966xxxxxxxx1

Mobile number

text
test sms

Message content

type
1

The type of message 1 - English 2 - Unicode 3 - Special Character 4 - Arabic

Example Request
                                                
GET https://api.tawasolsms.com/index.php?user=user1&pass=pass@test&sid=Tawasol&mno=966xxxxxxxx1&text=test sms&type=1
                                            
Example Response
200 - OK
POST Method (3) Use API key and username to request token
https://api.tawasolsms.com/auth.php

Using Username and API Key, then receive a Response that includes your JWT access-token, which you will then provide in the Bearer token Authorization or in the header of each API with key name: access-token

BODY formdata

apikey
XbhGtR1H

Application Key / Access Key

username
user1

Username

Example Request
                                                
POST https://api.tawasolsms.com/auth.php

                                            
Example Response
200 - OK
POST Method (3) Send Message (form or body)
https://api.tawasolsms.com/index.php

Use messages endpoint to send Single or Bulk SMS. When you send SMS messages using this API, the API will return to you the sent messages’ ID to track them later.

BODY formdata

senderName
Tawasol

The name of the message sender

messageType
1

The type of message 1 - English 2 - Unicode 3 - Special Character 4 - Arabic

messageText
Your URL is: https://tawasolsms.com

Message Content

recipients
966xxxxxxxx1

Mobile number

Example Request
                                                
POST https://api.tawasolsms.com/index.php

                                            
Example Response
200 - OK
POST Method (3) Bulk Send using file
https://api.tawasolsms.com/index.php

Use Bulk endpoint to send Bulk SMS . This can be achieved by sending an CSV file having the recipients phone numbers . When you send Bulk SMS request using this API, the API will return to you the Bulk ID to track them later.

BODY formdata

senderName
Tawasol

The name of the message sender

messageType
3

The type of message 1 - English 2 - Unicode 3 - Special Character 4 - Arabic

shortURL
true

Set it to true, if the messageText contains URL and you want to shorten it

messageText
Your file url is https://tawasolsms.com/file.pdf

Message Content

recipients
None

The CSV file that have the intended recipients phone numbers.

Example Request
                                                
POST https://api.tawasolsms.com/index.php

                                            
Example Response
200 - OK
POST Method (3) Group Send
https://api.tawasolsms.com/index.php

In case you want to send bulk SMS to predefined groups of recipients, use Send SMS to Groups API. The API will return to you the messages’ ID to track them later using Get Message Details by ID API.

Using Send SMS to Groups API is quite simple. First, submit an HTTP Request with the group’s name, the message text, and other important parameters, and then receive a Response that includes the SMS IDs.

BODY formdata

senderName
Tawasol

The name of the message sender

messageType
3

The type of message 1 - English 2 - Unicode 3 - Special Character 4 - Arabic

shortURL
true

Set it to true, if the messageText contains URL and you want to shorten it

messageText
test sms

Message Content

group
group_1

Predefined group name

Example Request
                                                
POST https://api.tawasolsms.com/index.php

                                            
Example Response
200 - OK
GET Method (3) Getting Message Details
https://api.tawasolsms.com/dlr.php?message_id=2404161053391228152

You can track any SMS you have sent using its ID by submitting the Get Message Details by ID API request. The API will return the details of the SMS message you want to track, such as the account ID that sent the SMS, SMS delivery status and the SMS sent date.

PARAMS

message_id
2404161053391228152

Message Id

Example Request
                                                
GET https://api.tawasolsms.com/dlr.php?message_id=2404161053391228152
                                            
Example Response
200 - OK
                                                    
{
    "success": "false",
    "message": "2404161053391228152",
    "errorCode": "ER-01",
    "data": []
}
                                                
GET Method (3) Getting Bulk Details
https://api.tawasolsms.com/bulk.php?bulkId=Bulk661e2cd9ac25c

You can track any Bulk SMS you sent using its Bulk ID in the API request. The API will return the details of the SMS Campaign you want to track, such as the Number of SMS Sent, Delivered & Undelivered in an SMS Campaign.

PARAMS

bulkId
Bulk661e2cd9ac25c

Bulk Id

Example Request
                                                
GET https://api.tawasolsms.com/bulk.php?bulkId=Bulk661e2cd9ac25c
                                            
Example Response
200 - OK
GET Method (3) Getting Messages Count
https://api.tawasolsms.com/count.php

You can know the count of SMS messages you have sent during a certain period. The API will return an integer that represents the count of SMS messages sent during the provided date range in the API request.To use Get Sent Messages Count API, first submit an HTTP Request with the date range, then receive a Response that includes the count of SMS messages sent during the provided date range.

Example Request
                                                
GET https://api.tawasolsms.com/count.php
                                            
Example Response
200 - OK
                                                    
{
    "success": "true",
    "message": "ok",
    "errorCode": "ER-00",
    "data": {
        "Count": 216362
    }
}
                                                
GET Method (3) Retrieving SMS Messages
https://api.tawasolsms.com/messages.php

You can track the messages you have sent during a certain period by submitting the Get Messages Details. The API will return an array of multiple records. Each record includes the details of an SMS message that was sent during the provided date range in the API request. You can also specify the number of SMS messages you want to receive per response page, as well as the response page index number you want to receive.

Example Request
                                                
GET https://api.tawasolsms.com/messages.php
                                            
Example Response
200 - OK
GET Method (3) Getting Account Balance
https://api.tawasolsms.com/balance.php

Through Get Your Current Balance API, you can directly retrieve your current account balance. You can also get the current balance.

Example Request
                                                
GET https://api.tawasolsms.com/balance.php
                                            
Example Response
200 - OK
                                                    
{
    "success": "true",
    "message": "ok",
    "errorCode": "ER-00",
    "data": {
        "Balance": "178026"
    }
}
                                                
POST Method (3) Personalized Send
https://api.tawasolsms.com/index.php

Personalized SMS is a type of Short Messages that generated from rendering a template , A template is a text that contains a special text that contains variables, Those variable got substituted at the runtime.

BODY formdata

senderName
Tawasol

Sender Id

messageText
Hi {{Name}} your Salary is {{Salary}}

Message Content

recipients
966xxxxxxxx1,966xxxxxxxx2

The intended recipients’ phone numbers comma separated

replacementList
employeeX,500$

An array variablesLists. The delimiters between each variable list is the ';' . and the delimiters between variables are commas ','

Example Request
                                                
POST https://api.tawasolsms.com/index.php

                                            
Example Response
200 - OK
POST Method (3) Personalized Bulk Send using file
https://api.tawasolsms.com/index.php

Use Personalized Bulk endpoint to send Bulk SMS with different message text. The Endpoint accepts CSV file contains recipient numbers with corresponding message text.

BODY formdata

senderName
Tawasol

The name of the message sender

recipients
None

The CSV file that have the intended recipients phone numbers and message content for each number.

Example Request
                                                
POST https://api.tawasolsms.com/index.php

                                            
Example Response
200 - OK