/sendsms
This function allow you to send SMS to 1 or many Mobile numbers
- Endpoint: https://app.fideljet.com/rest/sendsms
- Type: Post
apikey | Your API KEY | You can get it from your profil https://app.Fideljet.com/profil then apikey section |
from | SMS sender | Ask the support team to register your SMS Sender to have a high delivery rate |
to | 1 or many mobile number | international format (ex +336xxxxxxx), with , as separator Max mobile on the same request: 1000 Mobile number |
text | Your SMS text | 1 SMS = 160 char, or 70 unicode |
Here is a PHP exemple:
<php $apikey = "YOUR_API_KEY"; // APi Key https://app.Fideljet.com/profil then apikey section $from = "info"; // SMS Sender $to = "+212xxxxxxxx"; // Mobile phone numbers, international format with , as separator $text = "Test from fideljet.com api"; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://app.fideljet.com/rest/sendsms", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{ \"apikey\":\"$apikey\", \"from\":\"$from\", \"to\":\"$to\", \"text\":\"$text\" }", CURLOPT_HTTPHEADER => array( "accept: application/json", "content-type: application/json" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?>
Result
{ "message":"Success", "success":true, "smsCount":1, "unicode":"" }