ES
Recursos API LabsMobile

API for sending SMS
Simplify your communication

Automate your SMS sending by integrating with LabsMobile's SMS API: easy, reliable and at the best price.

Try now
at no cost
Recursos API LabsMobile

What is the SMS API?

LabsMobile's API to Send SMS is your perfect ally to automate and enhance your communications. Easily integrate SMS sending into your applications or systems, and enjoy a fast, secure and highly efficient solution.

With the LabsMobile API, you optimize each message, guaranteeing an instant connection with your customers at the best price. Discover how to transform your SMS sending with our API!

What we offer you for your SMS API integration

Deliverability

Direct routes with immediate delivery confirmation

Security

Secure integration for your software and data.

Support

Expert technical support, close and available.

Efficiency

Maximum reliability and the best value for money

All included! you only pay for the SMS sent

Join thousands of customers that have chosen LabsMobile

Meet a few of the thousands of satisfied professionals

4.8 on Google

Resources for your SMS messaging API integration

Recursos API LabsMobile

Official SDK libraries

Do you use Node.js or PHP? Then use our libraries to make your integration even easier, faster and more comfortable.

We have created for you these libraries so that you can natively connect to our SMS API. Install the library and call the functions. Save time and make a secure and 100% reliable integration.

Recursos API LabsMobile

SMS API Documentation

Check out our documentation API and all the resources we offer to make it quick and easy to integrate with our SMS platform.

SMS API Documentation

And you can also consult the code examples. As easy as copy&paste and adapt the code to your environment and particular case.

View all
code examples
Send your first SMS
curl --user myUsername:myToken -X POST \
  https://api.labsmobile.com/json/send \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{"message":"Your verification code is 123", "tpoa":"Sender","recipient":[{"msisdn":"12015550123"}]}'
              
#include <stdio.h> 
#include <curl/curl.h> 

int main(void) {
    CURL *curl;
    CURLcode res;
    curl = curl_easy_init();
    if(curl) {
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
        curl_easy_setopt(curl, CURLOPT_URL, "https://api.labsmobile.com/json/send");
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
        curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
        curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_BASIC);
        curl_easy_setopt(curl, CURLOPT_USERNAME, "myUsername");
        curl_easy_setopt(curl, CURLOPT_PASSWORD, "myToken");
        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, "Cache-Control: no-cache");
        headers = curl_slist_append(headers, "Content-Type: application/json");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        const char *data = "{\r\n  \"message\":\"Your verification code is 123\",\r\n  \"tpoa\":\"Sender\",\r\n  \"recipient\":\r\n    [\r\n      {\r\n        \"msisdn\":\"12015550123\"\r\n      }\r\n    ]\r\n}\r\n\r\n";
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
        res = curl_easy_perform(curl);
        if(res != CURLE_OK)
            fprintf(stderr, "curl_easy_perform() failed: %s\n",
                      curl_easy_strerror(res));
        curl_easy_cleanup(curl);
    }
    return 0;
}

            
using System;
using RestSharp;

namespace SendPostUni
{
  class Program
  {
    static void MainSend(string[] args)
    {
      var client = new RestClient("https://api.labsmobile.com");
      var request = new RestRequest("/json/send", Method.Post);
      request.AddHeader("Cache-Control", "no-cache");
      request.AddHeader("Content-Type", "application/json");
      request.AddHeader("Authorization", "Basic " + Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("myUsername" + ":" + "myToken")));
      request.AddParameter("application/json", "{\r\n  \"message\":\"Your verification code is 123\",\r\n  \"tpoa\":\"Sender\",\r\n  \"recipient\":\r\n    [\r\n      {\r\n        \"msisdn\":\"12015550123\"\r\n      }\r\n    ]\r\n}\r\n\r\n", ParameterType.RequestBody);
      RestResponse response = client.Execute(request);
      if (response.ErrorException != null)
      {
        Console.WriteLine("Error: " + response.ErrorException.Message);
      }
      else
      {
        Console.WriteLine("Response content: " + response.Content);
      }
    }
  }
}

            
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;

public class App {
  public static void main(String[] args) throws UnirestException {
    Unirest.setTimeouts(0, 0);
    HttpResponse<String> response = Unirest.post("https://api.labsmobile.com/json/send")
        .header("Content-Type", "application/json")
        .basicAuth("myUsername", "myToken")
        .header("Cache-Control", "no-cache")
        .body(
          "{\"message\":\"Your verification code is 123\", \"tpoa\":\"Sender\",\"recipient\":[{\"msisdn\":\"12015550123\"}]}")
        .asString();
    System.out.println("Status code: " + response.getBody());
  }
}
            
<?php 
$auth_basic = base64_encode("myUsername:myToken");

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.labsmobile.com/json/send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
    "message":"Your verification code is 123",
    "tpoa":"Sender",
    "recipient":
      [
        {
          "msisdn":"12015550123"
        }
      ]
  }',
  CURLOPT_HTTPHEADER => array(
    "Authorization: Basic ".$auth_basic,
    "Cache-Control: no-cache",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
            
import requests, base64, json


userToken = "myUsername:myToken"
credentials = (base64.b64encode(userToken.encode()).decode())

url = "https://api.labsmobile.com/json/send"

payload = json.dumps({
  "message": "Your verification code is 123",
  "tpoa": "Sender",
  "recipient": [
    {
      "msisdn": "12015550123"
    }
  ]
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Basic %s' % credentials,
  'Cache-Control': "no-cache"
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

            
const axios = require('axios');

const data = JSON.stringify({
  "message": "Your verification code is 123",
  "tpoa": "Sender",
  "recipient": [
    {
      "msisdn": "12015550123"
    }
  ]
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.labsmobile.com/json/send',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Basic ' + Buffer.from("myUsername:myToken").toString('base64')
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});



            
require "uri"
require "json"
require 'base64'
require "net/http"

url = URI("https://api.labsmobile.com/json/send")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic " + Base64.strict_encode64("myUsername:myToken")
request.body = JSON.dump({
  "message": "Your verification code is 123",
  "tpoa": "Sender",
  "recipient": [
    {
      "msisdn": "12015550123"
    }
  ]
})

response = https.request(request)
puts response.read_body
              

Plugins and modules

Take advantage of LabsMobile's official plugins and modules compatible with a multitude of platforms and software such as CRM, eCommerce, Frameworks, etc.

Install easily and without programming these plugins or modules and enjoy SMS communication and all the features of the LabsMobile platform.

View all plugins and modules

The step-by-step of the API integration for sending SMS messages

Create an account here and login to your account.
1
Generate an API token in the API Configuration section.
2
See the API documentation and the code examples suitable for your integration.
3
Performs the first SMS sendings in simulated mode.
4
Make your first SMS pack recharge.
5
Set up your account with automatic recharges, reports, country and IP filters.
6
If you have any doubts, watch this video!

Get your welcome SMS pack and send your first SMS with our API

Do you need technical support?

We are always at your side. You will always have the following support channels available:

Looking for a technical agent?
Chat
You can also consult:
Knowledge base
Videotutorials

Frequently asked questions about sending SMS via API

The SMS API, like all LabsMobile services, has no additional cost. You only pay for the messages sent.

Therefore, all accounts have unlimited access to the API at no cost. There is also no setup fee, maintenance fee or any other extra cost.

All accounts have unlimited access to the API at no cost.

You only pay for the SMS sent through the API which have a unit price depending on the country of destination, type of SMS and volume of the pack.

More information in the SMS prices section and in How to calculate the price of an SMS

You can obtain technical support through these channels:

You can also consult all online resources for technical support:

More information about our Care and Support Service

An API of an SMS platform allows developers to integrate messaging capabilities into their applications.

Facilitates the sending and receiving of automated text messages between any application and users via an SMS service.

The SMS platform provides a reference documentation, code examples, plugins and modules that facilitate the integration and use of the SMS API.

The API SMS allows fast, reliable and direct communication with any user, crucial for urgent notifications or identity verification via SMS authentication.

The API SMS also facilitates the sending of mass messages for marketing or alerts, with the ability to personalize and segment according to the target audience.

It also facilitates the mass sending of messages for marketing or alerts, with the ability to personalize and segment according to the target audience.

Supports message scheduling and offers real-time reporting on the status of messages sent. It easily integrates with any existing system or application, allowing automating processes and improving operational efficiency.

The main features are:

  • - Sending messages individually or in bulk with all functionalities.
  • - Sending messages individually or in bulk with all functionalities.
  • - Reception of messages on contracted virtual numbers.
  • - Reception of messages on contracted virtual numbers.
  • - Reception of messages on contracted virtual numbers.
  • - Receiving status (delivery or error).
  • - Consultation of account balance and unit prices.
  • - Consultation of account balance and unit prices.

More information in the SMS API documentation

Connecting and integrating with LabsMobile's SMS API is very easy. Follow these steps:

  1. Create an account here and log in with your credentials.
  2. Generate an API token in the API Settings section.
  3. Consult the API documentation, code examples and recommendations to make your integration.
  4. Make the first sendings in simulated mode.
  5. Calculate your quote and purchase your first SMS pack.
  6. Set up your account with security filters (IP and countries), automatic reloads and activity reports.

Contact us or view the API integration tutorial video if you have questions.

The LabsMobile API is compatible with any programming environment and language such as Node.js, JAVA, PHP, Python, Rust, C#, Perl, etc.

Our REST API uses the HTTP protocol and POST, GET or JSON variables which are standard and 100% compatible with all systems and applications.

We also provide a complete technical documentation and examples of code in the most used languages.

See more frequently asked questions in our Knowledge Base .

Get Started Now with Our SMS Sending API

Try it without restrictions, with initial credits, with full functionality and no limitations.