Textit.biz Serving Sri Lanka since 2011.

Textit.biz SMS Gateway Integration

REST API

REST API Integration



This endpoint is used to send SMS, using the API Key. the key sent in the header (Authorization : Basic [API Key])
Your API key can be obtained from the Settings tab or API tab after logging into your account.


For simple integration and testing you can download a POSTMAN collection file from here DOWNLOAD


request url : https://api.textit.biz/



Sample request headers

Content-Type: application/json
Accept: */*
X-API-VERSION: v1
Authorization: Basic eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzdXBlckBteWxpbm


Sample request body

{
"to": "94772823050",
"text": "Test"
}



Optional Parameters

ref
Optional Passthrough Variable upto 15 characters, only shows in reports for future reference
eg. ref=NewCampaign


schd
Schedule Send Date / Time. Textit.biz will store the message in servers and process at the given time.
Expected Formats : YYYY‐MM‐ DD_HH:MM Or YYYYMMDDHHMM

Eg. schd=2021‐01‐31_23:59 or schd=202101312359





Example scripts in your choice of languages are given below. modify the given code to match your requirements.


If you would like to contribute by improving or adding new code blocks, please send your submissions to info@textit.biz. Selected contributions will be featured in the integration section, with proper attribution to your name, company, or website.  

  • cURL

cURL

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.textit.biz',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"to": "94772823050",
"text": "Test"
}

',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: */*',
'X-API-VERSION: v1',
'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxx'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;