Facebookpixel Dev DOC - SMSMobileAPI
 

Send SMS

This endpoint allows you to send an SMS from your mobile phone.

Endpoint: 

GET POST https://api.smsmobileapi.com/sendsms/

Parameters:

ParameterDescription
apikey
Required
Your unique API key.
recipients
Required
The recipient's phone number.
message
Required
The message to send (no 160-char limit).
port Define the SIM port to use for sending the SMS: 1, 2, or leave it empty.
If left empty, the SMS will be sent using the available SIM port automatically.

This parameter is available starting from Android version 4.1.15.0 and works when the app is in the foreground (first plan).
shorturl1 = convert URLs to short links
0 or empty = no conversion
sIdentifiantSelect which connected phone sends the SMS. Leave empty for first available device. Requires app 3.0.35.3+.
sendwa1 = send via WhatsApp.
sendsms1 = send via SMS (default if empty). Set to 0 to block SMS.
encrypt_messageyes = recipient needs a key to decrypt. Learn more
schedule_timestampUNIX timestamp (GMT 0) from which the SMS should be sent.

Example:

GET https://api.smsmobileapi.com/sendsms?apikey=YOUR_API_KEY&recipients=+1234567890&message=Hello%20World
Note: in case of delivery error caused by your operator, a default function retries up to 3 times.
 

Resend an unsent SMS

This API endpoint is used to resend an unsent SMS (only if the message has an error status).

Endpoint:

GET POST https://api.smsmobileapi.com/resend/

Parameter: 

ParameterDescription
guid
Required
GUID of the message to be resent.

Example: 

GET https://api.smsmobileapi.com/resend/?apikey=YOUR_API_KEY&guid=GUID_OF_THE_MESSAGE
 

Log of SMS sent from the API

This API endpoint is used to retrieve the log of SMS messages sent via the API.

Endpoint: 

GET https://api.smsmobileapi.com/log/sent/sms/

Parameter:

ParameterDescription
apikey
Required
Your API key.
guid_messageFilter by the unique identifier of the message.
beforeRetrieve messages sent before this timestamp or GUID.
error_api1 = list SMS with API request error.
error_mobile1 = list SMS with mobile processing error.
keywordFilter by recipient number or message content.

Example:

GET https://api.smsmobileapi.com/log/sent/sms?apikey=YOUR_API_KEY
 

List sent SMS from mobile

This API endpoint is used to list SMS messages sent from your mobile device and synchronized to your SMSMobileAPI account.

Important: This feature is available starting from Android version 4.1.20.

Important: This feature is not enabled by default in the Android app.

Privacy: All synchronized information is anonymized, confidential, and handled securely.

History limit: This API always returns data from the last 7 days only.

Note: If you send SMS using the standard API endpoint https://api.smsmobileapi.com/sendsms/, these SMS may also appear in this listing because they are physically sent from your mobile device.

Endpoint:

GET POST https://api.smsmobileapi.com/log/sent/frommobile/

Parameters: 

Parameter Description
apikey
Required
Your API key.
date Optional. Exact date filter in YYYY-MM-DD format.
date_from Optional. Start date of the period in YYYY-MM-DD format.
date_to Optional. End date of the period in YYYY-MM-DD format.
period Optional. Predefined period filter. Allowed values: today, yesterday, last_24h, last_3days, last_7days.
number Optional. Filter by recipient phone number.
sIdentifiant Optional. Filter by mobile identifier.
message Optional. Filter by SMS content.
search Optional. Global search on sIdentifiant, number, message, mobile_date_formatted, and synchro_time.
sort_by Optional. Sorting field. Allowed values: sIdentifiant, number, message, mobile_date_ms, mobile_date_formatted, synchro_time.
sort_order Optional. Sorting order: ASC or DESC.
limit Optional. Maximum number of returned rows. Maximum allowed value: 200.

Returned fields: 

Field Description
sIdentifiant Mobile identifier linked to the sent SMS.
number Recipient phone number.
message SMS content.
mobile_date_ms Original SMS timestamp in milliseconds.
mobile_date_formatted Formatted date received from the mobile device.
synchro_time Date and time when the SMS was synchronized to SMSMobileAPI.

Example: 

GET https://api.smsmobileapi.com/log/sent/frommobile/?apikey=YOUR_API_KEY

Example with filters:

GET https://api.smsmobileapi.com/log/sent/frommobile/?apikey=YOUR_API_KEY&date=2026-03-13&number=32470000000&sort_by=synchro_time&sort_order=DESC

Example with predefined period:

GET https://api.smsmobileapi.com/log/sent/frommobile/?apikey=YOUR_API_KEY&period=last_7days&limit=200
 

SMS Received

This API endpoint is used to retrieve SMS messages received on the smartphone. 

Endpoint:

GET https://api.smsmobileapi.com/getsms/

Parameter: 

ParameterDescription
apikey
Required
The API key you have or will receive.
sIdentifiantPhoneIsolate a phone linked to received SMS.
after_timestamp_unixList received SMS after a UNIX timestamp.
onlyunread"yes" = list only SMS not marked as read (API status).

Example:

GET https://api.smsmobileapi.com/getsms/?apikey=YOUR_API_KEY
 

Mark SMS Messages Received as Read

This API endpoint is used to mark one received SMS message as read in the API status only.
This does not change the read status on the smartphone.  

Endpoint:

GET https://api.smsmobileapi.com/getsms/set-read/

Parameter: 

ParameterDescription
apikey
Required
The API key you have or will receive.
guid_message
Required
GUID of the message to mark as read.

Example:

GET https://api.smsmobileapi.com/getsms/set-read/?apikey=YOUR_APIKEY&guid_message=GUID_MESSAGE
 

Update SMS alias

This API endpoint is used to update the alias of a received SMS using its GUID.

Note: The alias parameter can be empty. In that case, the alias will be cleared.

Endpoint:

GET POST https://api.smsmobileapi.com/getsms/update/

Parameters: 

Parameter Description
apikey
Required
Your API key.
guid
Required
GUID of the received SMS to update.
alias
Required
Alias to assign to this SMS. This value can be empty to clear the current alias.

Example: 

GET https://api.smsmobileapi.com/getsms/update/?apikey=YOUR_API_KEY&guid=GUID_OF_THE_MESSAGE&alias=John%20Doe

Example to clear the alias:

GET https://api.smsmobileapi.com/getsms/update/?apikey=YOUR_API_KEY&guid=GUID_OF_THE_MESSAGE&alias=
 

Delete SMS

This API endpoint is used to delete SMS messages from the server log of SMS Mobile API.

Endpoint: 

GET https://api.smsmobileapi.com/deletesms/

Parameter:

ParameterDescription
apikey
Required
The API key you have.
guid_messageThe unique ID of the message to delete.
date_startIf used alone, deletes all messages from the specified day.
date_start and date_endCombined to delete messages within a specified period.

Example:

GET https://api.smsmobileapi.com/deletesms/?apikey=YOUR_API_KEY

Note: Deleted SMS are only those stored in server logs. SMS on the device will not be deleted.

 

List SMS conversations

This API endpoint is used to list SMS conversations linked to your account.

Each conversation is grouped by phone number and contains the related incoming and outgoing SMS messages.

Note: The conversation starting point is defined by the origineConversation parameter:

  • received: conversations are first detected from received SMS in logsmsreceive
  • sent: conversations are first detected from sent SMS in logsmssent

Note: If numero is not provided, the API returns the latest conversations only. By default, the last 20 conversations are returned.

Note: For outgoing SMS, if timearea_of_message is available (example: UTC+02), the displayed date is automatically converted using this value. This converted date is also used for sorting.

Note: If resume=1, only the latest messages of each conversation are returned. Use resume_line_how to define how many latest messages should be included.

Endpoint:

GET POST https://api.smsmobileapi.com/conversation/sms/list/

Parameters: 

Parameter Description
apikey
Required
Your API key.
origineConversation
Required
Defines the starting point of the conversation listing. Allowed values: received or sent.
numero
Optional
Filter the result for one specific phone number only.
date_from
Optional
Start date filter for conversations and messages. Accepted format: YYYY-MM-DD or a full datetime value.
date_to
Optional
End date filter for conversations and messages. Accepted format: YYYY-MM-DD or a full datetime value.
sort
Optional
Sort order for conversations. Allowed values: DESC or ASC. Default: DESC.
limit
Optional
Maximum number of conversations to return when numero is not provided. Default: 20.
resume
Optional
If set to 1, only the latest messages of each conversation are returned.
resume_line_how
Optional
Number of latest messages to return per conversation when resume=1. Default: 1.

Behavior details: 

  • Incoming SMS are read from logsmsreceive.
  • Outgoing SMS are read from logsmssent.
  • Incoming messages always return direction = "incoming".
  • Outgoing messages always return direction = "outgoing".
  • The contact alias is taken from logsmsreceive.alias when available.
  • For incoming SMS, the mobile SID comes from sIdentifiant_pour_read.
  • For outgoing SMS, the mobile SID comes from send_from_mobile_sIdentifiant.
  • For outgoing SMS, the displayed date is adjusted with timearea_of_message if this field is not empty.

Example 1 - List latest conversations from received SMS: 

GET https://api.smsmobileapi.com/conversation/sms/list/?apikey=YOUR_API_KEY&origineConversation=received

Example 2 - List latest conversations from sent SMS:

GET https://api.smsmobileapi.com/conversation/sms/list/?apikey=YOUR_API_KEY&origineConversation=sent

Example 3 - Filter one specific phone number:

GET https://api.smsmobileapi.com/conversation/sms/list/?apikey=YOUR_API_KEY&origineConversation=received&numero=%2B32470000001

Example 4 - Filter by date range:

GET https://api.smsmobileapi.com/conversation/sms/list/?apikey=YOUR_API_KEY&origineConversation=received&date_from=2026-03-01&date_to=2026-03-31

Example 5 - Resume mode with the last 3 messages per conversation:

GET https://api.smsmobileapi.com/conversation/sms/list/?apikey=YOUR_API_KEY&origineConversation=sent&resume=1&resume_line_how=3

Successful response example: 

{
  "success": true,
  "origineConversation": "received",
  "resume": 0,
  "resume_line_how": null,
  "conversations": [
    {
      "phone_number": "+10470000001",
      "contact_alias": "John Doe",
      "messages": [
        {
          "direction": "incoming",
          "message_id": "msg_1001",
          "date": "2026-03-13 08:45:12",
          "timestamp_utc": "2026-03-13T08:45:12Z",
          "message": "Hello, I would like more information.",
          "status": "received",
          "mobile_sid": "device_sid_1"
        },
        {
          "direction": "outgoing",
          "message_id": "msg_1002",
          "date": "2026-03-13 10:46:03",
          "timestamp_utc": "2026-03-13T08:46:03Z",
          "message": "Of course, what would you like to know?",
          "status": "sent",
          "mobile_sid": "device_sid_2"
        }
      ]
    }
  ]
}

Response fields:

Field Description
success Indicates whether the request was successful.
origineConversation The starting mode used to build the conversation list.
resume Indicates whether resume mode is enabled.
resume_line_how Number of latest lines returned per conversation when resume mode is enabled.
conversations Array of conversations.
phone_number Phone number used to identify the conversation.
contact_alias Alias linked to the phone number when available.
messages Array of SMS messages inside the conversation.
direction incoming for received SMS, outgoing for sent SMS.
message_id Unique identifier of the message.
date Display date of the message. For outgoing SMS, this value can be adjusted using timearea_of_message.
timestamp_utc UTC timestamp of the message.
message Message content.
status received for incoming SMS, sent for outgoing SMS.
mobile_sid SID of the mobile device that received or sent the message.

Error example:

{
  "success": false,
  "error": "Missing required parameter: apikey"
}

Notes:

  • If numero is provided, the API returns only the conversation linked to this phone number.
  • If numero is not provided, the API returns the latest conversations according to the selected origin mode.
  • Incoming and outgoing messages are merged into a single timeline for each phone number.
  • Outgoing message sorting takes the adjusted local date into account when timearea_of_message is available.
  • Resume mode is useful for dashboards, widgets, previews, and conversation summaries.

Gateway – List connected mobiles

List mobiles connected to your SMS Gateway.

Endpoint:

GET POST https://api.smsmobileapi.com/gateway/mobile/list/

Parameters:

ParameterDescription
apikey
Required
Your API key.
sidFilter by exact SID (sIdentifiant_pour_check).
searchSearch in fields (sid, date, battery, version, label...).

Example:

GET https://api.smsmobileapi.com/gateway/mobile/list/?apikey=YOUR_API_KEY
Note: Received SMS statistics are available starting from version 3.0.33.3+ of the mobile app.

Gateway – Update a mobile label

Update the label (nom_reference) of a connected mobile.

Endpoint:

GET POST https://api.smsmobileapi.com/gateway/mobile/update/

Parameters:

ParameterDescription
apikey
Required
Your API key.
sid
Required
The device SID (sIdentifiant_pour_check).
label New label
phone_number New phone number

Example:

GET https://api.smsmobileapi.com/gateway/mobile/update/?apikey=YOUR_API_KEY&sid=SID&label=OfficePhone

Important: label is required but can be empty (label=).

Gateway – Delete a connected mobile

Remove a connected mobile from your gateway (deletes all history rows for this SID).

Endpoint:

GET POST https://api.smsmobileapi.com/gateway/mobile/delete/

Parameters:

ParameterDescription
apikey
Required
Your API key.
sid
Required
The device SID (sIdentifiant_pour_check).

Example:

GET https://api.smsmobileapi.com/gateway/mobile/delete/?apikey=YOUR_API_KEY&sid=SID
 

Webhook – SMS Received

This webhook system sends a POST request to the configured URL whenever an SMS is received. The system ensures real-time updates by delivering the SMS details to the specified webhook URL.

How to Configure the Webhook in the Dashboard

Follow these steps to set up your webhook URL in the dashboard:

  1. Log in to your account on the SMS Mobile API Dashboard.
  2. Navigate to the Webhook Settings section.
  3. Enter your webhook URL (e.g., https://example.com/webhook-endpoint).
  4. Click on the Save Webhook button. 
  5. Once saved, the system will start sending SMS details to the configured URL.

Webhook Payload

When an SMS is received, the system sends the following JSON payload to your webhook URL:

{
    "date": "2025-01-20",
    "hour": "10:15:00",
    "time_received": "2025-01-20 10:14:50",
    "message": "Hello, this is a test.",
    "number": "+123456789",
    "guid": "abcde12345"
}

Payload Fields:

  • date: Date when the SMS was added (YYYY-MM-DD).
  • hour: Hour when the SMS was added (HH:mm:ss).
  • time_received: Time when the SMS was received.
  • message: Content of the SMS. 
  • number: Sender's phone number.
  • guid: Unique identifier of the SMS.

Example Webhook Endpoint

Your server should be ready to handle incoming POST requests. Below is an example PHP script to process the webhook payload:

<?php
$payload = file_get_contents('php://input');
$data = json_decode($payload, true);

if ($data) {
    file_put_contents('sms_log.txt', print_r($data, true), FILE_APPEND);
    http_response_code(200);
    echo "Webhook received successfully.";
} else {
    http_response_code(400);
    echo "Invalid payload.";
}
?>

Testing the Webhook

To test your webhook configuration, use tools like:

Troubleshooting

  • Ensure the webhook URL is correct and publicly accessible.
  • Verify that your server is returning an HTTP 200 status code for successful requests.
  • Check your server logs for any errors in processing the payload.

Enriched SMS

Coming soon

Authentication

 

The SMSMobile API supports two authentication methods: using a simple API Key or the OAuth2 protocol with a client ID and client secret.

1. API Key Authentication

 This method requires an API Key that can be included as a parameter in either a GET or POST request.

2. OAuth2 Authentication

OAuth2 provides a more secure authentication method.
Use a client ID and client secret to obtain an access token, then include it in the Authorization header.

The client_id and client_secret are available in your dashboard.
Download the mobile app now or access your dashboard.

Obtaining an Access Token

curl -X POST https://api.smsmobileapi.com/oauth2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET"

Using the Access Token:

curl -X POST https://api.smsmobileapi.com/sendsms \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "recipients=+1234567890" \
-d "message=Hello"

Which Method Should You Use?

- Use API Key Authentication for quick and straightforward integrations.

- Use OAuth2 Authentication for enhanced security and scalability.

Send SMS

WSDL URL

https://api.smsmobileapi.com/sendsms/wsdl/sendsms.wsdl

Parameters:

- recipients: The mobile number of the recipient.
- message: The message to send.
- apikey: The API key you have or will receive.

Example

require_once "lib/nusoap.php";

$client = new nusoap_client("https://api.smsmobileapi.com/sendsms/wsdl/sendsms.wsdl", true);
$error = $client->getError();

$result = $client->call("sendSms", array("recipients" =>$_GET['recipients'],"message" =>$_GET['message'],"apikey" =>$_GET['apikey']));

print_r($result);

Send SMS & WhatsApp

Basic cURL Command

curl -X POST https://api.smsmobileapi.com/sendsms/ \
-d "recipients=PHONE_NUMBER" \
-d "message=YOUR_MESSAGE" \
-d "apikey=YOUR_API_KEY"
-d "sendwa=1"
-d "sendsms=1"

Send SMS & WhatsApp

Use our official Python Module : https://smsmobileapi.com/python/

import requests

url = "https://api.smsmobileapi.com/sendsms/"

payload = {"recipients":"PHONE_NUMBER","message":"YOUR_MESSAGE","apikey":"YOUR_API_KEY"}

response = requests.post(url, data=payload)
print(response.text)

SMS Mobile API - PHP SDK (Composer)

composer require smsmobileapi/sdk

GitHub: https://github.com/SmsMobileApi/smsmobileapi-php/tree/main

Send SMS & WhatsApp

const url = "https://api.smsmobileapi.com/sendsms/";
const data = {recipients:"PHONE_NUMBER", message:"YOUR_MESSAGE", apikey:"YOUR_API_KEY"};
fetch(url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(data)})
.then(r=>r.text()).then(console.log);

Send SMS & WhatsApp

const axios = require("axios");
axios.post("https://api.smsmobileapi.com/sendsms/", {recipients:"PHONE_NUMBER", message:"YOUR_MESSAGE", apikey:"YOUR_API_KEY"})
.then(r=>console.log(r.data));

Send SMS & WhatsApp

require "net/http"
require "uri"
uri = URI.parse("https://api.smsmobileapi.com/sendsms/")
req = Net::HTTP::Post.new(uri)
req.set_form_data({"recipients"=>"PHONE_NUMBER","message"=>"YOUR_MESSAGE","apikey"=>"YOUR_API_KEY"})
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true){|http| http.request(req)}
puts res.body
Depending on the version of Android installed on a mobile phone, the operating system may hinder the proper functioning of automatic sending and receiving of SMS messages when the SmsMobileApi application is not in the foreground.
This issue arises from a process that attempts to run in the background when the application is not actively launched. However, due to Android's battery optimization measures, which vary across different versions, this background process may not initiate correctly. Android's battery optimization is designed to limit the background activity of apps to conserve battery life, which can inadvertently affect apps that require background processes to function properly.

To address this issue, users can manually configure their Android settings to allow the SmsMobileApi to use resources without restrictions.
This involves adjusting the battery optimization settings for the specific app, essentially instructing Android that the SmsMobileApi is permitted to run in the background and use resources as needed. By doing so, the application should be able to automatically send and receive SMS messages even when it is not the active application in the foreground. This adjustment ensures that the necessary background process can operate uninterrupted, circumventing the battery optimization features that might otherwise prevent its proper execution.


FAQ For Developer

Accordion Sample DescriptionTo generate an API key, download our application onto your mobile phone and create an account at no cost. An API key will be automatically generated and linked to your mobile phone. You will also receive an email with all the necessary information. This process ensures that you can quickly and easily start using our services with minimal setup.
In your mobile application, navigate to the SETTINGS or HELP menu, where your API key is visible at all times. This ensures that you can easily access your API key whenever you need it for integrating or using our services.
Yes, we do not require any proof of identity for creating an API key. The communication between our API and your mobile phone is therefore 100% anonymous. This approach allows users to maintain their privacy while utilizing our services.

Get Started with SMSmobileAPI Today!

Experience the freedom and flexibility of managing your SMS services on the go. Download our mobile app now and take the first step towards seamless SMS integration.

Download the App
💬 Live Chat
💬 Live Chat Available
Have any questions or need assistance ?
Our team is here to help you!

Enter your email address
to help us follow up on your request :
Dashboard