Eazita Developers

Send SMS: Introduction

Eazita's SMS API allows you to send text messages to users through simple RESTful APIs.

In a few simple steps, we will explain how to send an SMS using Eazita HTTP API.

First, you’ll need a valid Eazita account.

When you create a Eazita account you will be provided an API key, Use your API-KEY and PASSWORD to Authenticate with API.

Now, you are ready to create an HTTP POST request to

https://api.eazita.com/sms/json

Request body must contain the required parameters api, pass, from, to and msg.

https://api.eazita.com/sms/json?api=YOUR_API_KEY&pass=YOUR_PASSWORD&from=EZSMS&to=TO_NUMBER&msg=DEMO_MESSAGE
curl -X "POST" "https://api.eazita.com/json" \
  -d "api=YOUR_API_KEY" \
  -d "pass=YOUR_PASSWORD" \
  -d "from=EZSMS" \
  -d "to=TO_NUMBER" \
  -d "msg=A test messaging via HTTP API."

require_once("SMS_Portal.php");
$ezsms = new EZ_SMS("YOUR_API_KEY","YOUR_PASSWORD");

$ezsms->build_send(['to' => 'TO_NUMBER','from' => 'EZSMS','msg' => 'Test message via HTTP API.']);

$msg=$ezsms->execute_send();

if(count($msg)>0){ foreach($msg as $recipient=>$resp){
    echo "The status of message on ".$recipient." is ".$resp['status']." & the message id is ".$resp['messageid'].".";
} }

For more information about sending SMS messages using Eazita's SMS API, plus a full list of available features, visit the SMS API Reference page.