Documentation technique
API SMS Pro Mobile
Une API REST unique pour envoyer des SMS transactionnels et marketing dans toute la zone CEDEAO, avec accusés de réception en temps réel.
Authentification
Chaque requête doit porter une clé API générée depuis le tableau de bord, section Clés API. Les clés sont révocables et le HTTPS est obligatoire.
Authorization: Bearer smspm_votre_cle
Envoyer un SMS
POST /api/public/v1/sms
| Champ | Type | Requis | Description |
|---|---|---|---|
| to | string[] | oui | Numéros au format E.164 (ex. +2250700000000). |
| message | string | oui | Contenu du SMS (160 caractères par segment GSM-7). |
| sender_id | string | non | Nom d'expéditeur validé pour votre compte. |
| scheduled_at | ISO 8601 | non | Date d'envoi programmé (UTC). |
| reference | string | non | Votre identifiant interne, renvoyé dans le webhook. |
Exemples par langage
cURL
curl -X POST https://www.smsmobilepro.com/api/public/v1/sms \
-H "Authorization: Bearer smspm_votre_cle" \
-H "Content-Type: application/json" \
-d '{"to":["+2250700000000"],"message":"Bonjour","sender_id":"MASOCIETE"}'PHP
$ch = curl_init("https://www.smsmobilepro.com/api/public/v1/sms");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer smspm_votre_cle",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"to" => ["+2250700000000"],
"message" => "Bonjour",
"sender_id" => "MASOCIETE",
]),
]);
$response = curl_exec($ch);Python
import requests
requests.post(
"https://www.smsmobilepro.com/api/public/v1/sms",
headers={"Authorization": "Bearer smspm_votre_cle"},
json={"to": ["+2250700000000"], "message": "Bonjour", "sender_id": "MASOCIETE"},
timeout=30,
)Node.js
await fetch("https://www.smsmobilepro.com/api/public/v1/sms", {
method: "POST",
headers: {
Authorization: "Bearer smspm_votre_cle",
"Content-Type": "application/json",
},
body: JSON.stringify({
to: ["+2250700000000"],
message: "Bonjour",
sender_id: "MASOCIETE",
}),
});Java
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.smsmobilepro.com/api/public/v1/sms"))
.header("Authorization", "Bearer smspm_votre_cle")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(
"{\"to\":[\"+2250700000000\"],\"message\":\"Bonjour\",\"sender_id\":\"MASOCIETE\"}"))
.build();
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());C#
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer smspm_votre_cle");
var body = new StringContent(
"{\"to\":[\"+2250700000000\"],\"message\":\"Bonjour\",\"sender_id\":\"MASOCIETE\"}",
Encoding.UTF8, "application/json");
await client.PostAsync("https://www.smsmobilepro.com/api/public/v1/sms", body);WinDev
req est un restRequête
req.Méthode = httpPost
req.URL = "https://www.smsmobilepro.com/api/public/v1/sms"
req.Entête["Authorization"] = "Bearer smspm_votre_cle"
req.Entête["Content-Type"] = "application/json"
req.Contenu = '{"to":["+2250700000000"],"message":"Bonjour","sender_id":"MASOCIETE"}'
rep est un restRéponse = RESTEnvoie(req)Webhook de statut
Renseignez une URL de callback dans vos paramètres : chaque changement d'état est poussé en POST JSON.
{
"message_id": "5f2c...",
"reference": "cmd-10245",
"to": "+2250700000000",
"status": "delivered",
"updated_at": "2026-08-21T09:12:04Z"
}- queued
Message accepté et placé en file d'envoi.
- sent
Message remis à l'opérateur.
- delivered
Accusé de réception confirmé par le mobile.
- failed
Échec définitif (numéro invalide, opérateur injoignable...).
Besoin d'aide pour intégrer ?
Notre équipe technique accompagne votre intégration PHP, WinDev, ERP ou mobile.