Powerful SMS API Integration

Reliable SMS API Services in Morocco

Easily Connect with Customers in Morocco using SMS.to API Our SMS.to API service provides you with the best way to send messages to your customers in Morocco and worldwide at a low cost. You can conveniently set up the API and start sending personalized messages or campaigns.

Free trialTalk to an expert

*No credit card required

TrustRadius
TrustRadius Five Star Rating
G2 Rating
G2 4.5 Rating
Capterra Rating
Capterra Five Star Rating
TrustPilot Rating
TrustPilot Four Star Rating
SMS API

+1,000 BUSINESSES USE SMS.to FOR THEIR needs

SMS API Gateway Features In Morocco

One Time Passwords

Fortify your app’s security by integrating One Time Passwords (OTPs), a valuable addition for banking, financial, healthcare, and high-security websites

Notification SMS

Deliver immediate SMS alerts for order confirmations, transactions, reminders, and user activity
SMS API Tabs Notifications

Appointment Reminders

Ensure your customers never miss their appointments by sending reminders, seamlessly integrated with your CRM or calendar system
SMS API Tabs Reminders

SMS Marketing & Newsletters

Send bulk SMS with ease to a diverse global audience, connecting with recipients worldwide in an instant
SMS API Tabs Marketing

Surveys & Feedback Requests


Quickly engage with your customers through our two-way SMS connectivity, enabling fast and interactive communication.
SMS API Tabs Surveys and Feedback Requests

Why SMS.to API

Experience effortless communication solutions by leveraging our SMS Notification API to elevate your sms marketing

Flexible

Our text message API is designed to be adaptable, allowing you to integrate SMS capabilities into your preferred programming language and framework.

Reliable

Experience the reliability of our SMS delivery infrastructure, ensuring your messages reach their destination safely and in a timely manner without ever have to worry.

Scalable

Whether you need to send a few messages or millions, our message API can handle your volume needs, providing a scalable solution to meet your requirements.

Global

With our SMS API, you can reach users globally in just minutes. Sign up for free, get your API key, and start leveraging the power of SMS communication.

Seamless SMS Integration With Our SMS API in Morocco

The usage of Bulk SMS in Morocco has been increasingly popular. The number of mobile subscribers reached over 43 million in 2018. Considering the fact that the total population of Morocco is around 34 million, the mobile subscription penetration stands at about 128%. This presents a promising A2P traffic opportunity for businesses. Don’t miss out on this opportunity to grow your business and leverage the power of Bulk SMS with a professional partner like SMS.to. Whether you are a local or international business, we can help you send SMS in Morocco and boost your marketing efforts.

  • Effortless Integration in Morocco
  • Enhanced Connectivity in Morocco
  • Seamless API in Morocco
  • Instant Messaging in Morocco
  • Programmatic Control in Morocco
  • Streamlined Communication in Morocco
easy SETUP!

SMS API For Developers

Elevate your Moroccan business communications with SMS.to’s flexible and dependable SMS API. Seamlessly integrate with CRMs, software, and other applications that require a reliable and secure API. Send SMS messages to all major Moroccan networks with ease.

				
					curl --location 'https://api.sms.to/sms/send' \
--header 'Authorization: Bearer <api_key>' \
--header 'Content-Type: application/json' \
--data '{
    "message": "This is test and \n this is a new line",
    "to": "+35799999999999",
    "bypass_optout": true,
    "sender_id": "SMSto",
    "callback_url": "https://example.com/callback/handler"
}'
				
			
				
					<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sms.to/sms/send',
  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 =>'{
    "message": "This is test and \\n this is a new line",
    "to": "+35799999999999",
    "bypass_optout": true,
    "sender_id": "SMSto",
    "callback_url": "https://example.com/callback/handler"
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <api_key>',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
				
			
				
					var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'POST',
  'hostname': 'api.sms.to',
  'path': '/sms/send',
  'headers': {
    'Authorization': 'Bearer <api_key>',
    'Content-Type': 'application/json'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "message": "This is test and \n this is a new line",
  "to": "+35799999999999",
  "bypass_optout": true,
  "sender_id": "SMSto",
  "callback_url": "https://example.com/callback/handler"
});

req.write(postData);

req.end();
				
			
				
					require "uri"
require "json"
require "net/http"

url = URI("https://api.sms.to/sms/send")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <api_key>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "message": "This is test and \n this is a new line",
  "to": "+35799999999999",
  "bypass_optout": true,
  "sender_id": "SMSto",
  "callback_url": "https://example.com/callback/handler"
})

response = https.request(request)
puts response.read_body
				
			
				
					import http.client
import json

conn = http.client.HTTPSConnection("api.sms.to")
payload = json.dumps({
  "message": "This is test and \n this is a new line",
  "to": "+35799999999999",
  "bypass_optout": True,
  "sender_id": "SMSto",
  "callback_url": "https://example.com/callback/handler"
})
headers = {
  'Authorization': 'Bearer <api_key>',
  'Content-Type': 'application/json'
}
conn.request("POST", "/sms/send", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
				
			
				
					OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"message\": \"This is test and \\n this is a new line\",\r\n    \"to\": \"+35799999999999\",\r\n    \"bypass_optout\": true,\r\n    \"sender_id\": \"SMSto\",\r\n    \"callback_url\": \"https://example.com/callback/handler\"\r\n}");
Request request = new Request.Builder()
  .url("https://api.sms.to/sms/send")
  .method("POST", body)
  .addHeader("Authorization", "Bearer <api_key>")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
				
			
				
					package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.sms.to/sms/send"
  method := "POST"

  payload := strings.NewReader(`{`+"
"+`
    "message": "This is test and \n this is a new line",`+"
"+`
    "to": "+35799999999999",`+"
"+`
    "bypass_optout": true,`+"
"+`
    "sender_id": "SMSto",`+"
"+`
    "callback_url": "https://example.com/callback/handler"`+"
"+`
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer <api_key>")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
				
			

Seamless Integrations
With Your Favorite Tools​

SMS integrations for your preferred platform

seamless integration mobile

Sign-Up for a Free Trial

Get free Call & SMS credits on Sign-Up

Learn how we collect and use your information by visiting our Privacy Notice
SMS.to SignUp

see coverage directory