SMS API

Integrate our SMS API directly into your website, software, or application. Integration is easy and completely free.

What is an SMS API?

An SMS API (Application Programming Interface) is a technical tool that allows an application, software, or website to send and receive SMS messages automatically.

In practice, it acts as a bridge between your IT system and mobile networks, giving you the ability to integrate messaging directly into your business processes. This is why you might also hear the term SMS Gateway when discussing APIs.

For example, a company can use an SMS API to send delivery notifications, OTP codes, or real-time alerts to its customers.

An SMS API to make your life easier

Our SMS sending API solution is available in various languages, including Python and PHP. Feel free to contact our technical team if you have any questions!

Sign up for free and test our SMS API in just a few clicks!

20 FREE SMS No commitment, no subscription

20 free SMS messages upon registration to allow you to try our service!

  1. $request = new HttpRequest();
  2. $request->setUrl('http://api.smspartner.fr/v1/send');
  3. $request->setMethod(HTTP_METH_POST);
  4.  
  5. $request->setHeaders(array(
  6. 'cache-control' => 'no-cache',
  7. 'Content-Type' => application/json',
  8. ));
  9.  
  10. $request->setBody('{
  11. "apiKey": "API_KEY",
  12. "phoneNumbers": "+336XXXXXX",
  13. "sender": "demo",
  14. "gamme": 1,
  15. "message": "C'est un message test"
  16. }');
  17.  
  18. try{
  19. $response = $request->send();
  20. echo $response->getBody();
  21. } catch (HttpException $ex) {
  22. echo $ex;
  23. }
  24.  
  1. var http = require("http");
  2. var options = {
  3. "method": "POST",
  4. "hostname": ["api","smspartner","fr"],
  5. "path": ["v1","send"],
  6. "headers": {
  7. "Content-Type": "application/json",
  8. "cache-control": "no-cache"
  9. }
  10. };
  11. var req = http.request(options, function (res) {
  12. var chunks = [];
  13. res.on("data", function (chunk) {
  14. chunks.push(chunk);
  15. });
  16. res.on("end", function () {
  17. var body = Buffer.concat(chunks);
  18. console.log(body.toString());
  19. });
  20. });
  21. req.write(JSON.stringify({ apiKey: 'API_KEY',
  22. phoneNumbers: '+336XXXXXX', sender: 'demo',
  23. gamme: 1, message: 'C\'est un message test' }));
  24. req.end();
  1. curl -X POST \
  2. http://api.smspartner.fr/v1/send \
  3. -H 'Content-Type: application/json' \
  4. -H 'cache-control: no-cache' \
  5. -d '{
  6. "apiKey": "API_KEY",
  7. "phoneNumbers": "+336XXXXXX",
  8. "sender": "demo",
  9. "gamme": 1,
  10. "message": "C'\''est un message test"
  11. }'
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  1. var client = new RestClient("http://api.smspartner.fr/v1/send");
  2. var request = new RestRequest(Method.POST);
  3. request.AddHeader("Postman-Token",
  4. "1a660c7e-ff23-41e4-b30a-808bee0a37f3");
  5. request.AddHeader("cache-control", "no-cache");
  6. request.AddHeader("Content-Type", "application/json");
  7. request.AddParameter("undefined", "{\n \"apiKey\": \"API_KEY\",\n
  8. \"phoneNumbers\": \"+336XXXXXX\",\n \"sender\":\"demo\",\n
  9. \"gamme\":1,\n \"message\": \"C'est un message test\"\n}",
  10. ParameterType.RequestBody);
  11. IRestResponse response = client.Execute(request);
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  1. import http.client
  2. import json
  3. conn = http.client.HTTPSConnection("api.smspartner.fr")
  4. payload = json.dumps({
  5. "apiKey": "your api key smspartner",
  6. "phoneNumbers": "+336xxxxxxxx",
  7. "sender": "Your sender name",
  8. "gamme": 1,
  9. "message": "Cest un message test PYTHON",
  10. "webhookUrl": "https://webhook.site/TOKEN"
  11. })
  12. headers = {
  13. 'Content-Type': 'application/json',
  14. 'Content-Length': str(len(payload)),
  15. 'cache-control': 'no-cache'
  16. }
  17. conn.request("POST", "/v1/send", payload, headers)
  18. res = conn.getresponse()
  19. data = res.read()
  20. print(data.decode("utf-8"))
  1. import java.net.HttpURLConnection;
  2. import java.net.URL;
  3. import java.io.OutputStream;
  4. import java.io.BufferedReader;
  5. import java.io.InputStreamReader;
  6. import java.util.stream.Collectors;
  7. import org.json.JSONObject;
  8. public class SMSRequest {
  9. public static void main(String[] args) {
  10. try {
  11. URL url = new URL("https://api.smspartner.fr/v1/send");
  12. HttpURLConnection conn = (HttpURLConnection) url.openConnection();
  13. conn.setRequestMethod("POST");
  14. conn.setRequestProperty("Content-Type", "application/json");
  15. conn.setRequestProperty("cache-control", "no-cache");
  16. conn.setDoOutput(true);
  17. JSONObject json = new JSONObject();
  18. json.put("apiKey", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
  19. json.put("phoneNumbers", "+336XXXXXXXX");
  20. json.put("virtualNumber", "+336XXXXXXXX");
  21. json.put("sender", "demo JAVA");
  22. json.put("gamme", 1);
  23. json.put("message", "C'est un message test en JAVA !");
  24. json.put("webhookUrl", "https://webhook.site/TOKEN");
  25. OutputStream os = conn.getOutputStream();
  26. os.write(json.toString().getBytes());
  27. os.flush();
  28. BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
  29. String response = br.lines().collect(Collectors.joining());
  30. System.out.println(response);
  31. conn.disconnect();
  32. } catch (Exception e) {
  33. e.printStackTrace();
  34. }
  35. }
  36. }
  1. package main
  2. import (
  3. "bytes"
  4. "io/ioutil"
  5. "log"
  6. "net/http"
  7. )
  8. func main() {
  9. url := "http://api.smspartner.fr/v1/send"
  10. method := "POST"
  11. payload := []byte(`{
  12. "apiKey": "API_KEY",
  13. "phoneNumbers": "+3516XXXXXX",
  14. "sender": "demo",
  15. "gamme": 1,
  16. "message": "C'est un message test"
  17. `)
  18. client := &http.Client{}
  19. req, err := http.NewRequest(method, url, bytes.NewBuffer(payload))
  20. if err != nil {
  21. log.Panic(err)
  22. }
  23. req.Header.Add("Cache-Control", "no-cache")
  24. req.Header.Add("Content-Type", "application/json")
  25. res, err := client.Do(req)
  26. if err != nil {
  27. log.Panic(err)
  28. }
  29. defer res.Body.Close()
  30. body, err := ioutil.ReadAll(res.Body)
  31. if err != nil {
  32. log.Panic(err)
  33. }
  34. log.Print(string(body))
  35. }
  1. require 'net/http'
  2. require 'uri'
  3. require 'json'
  4. uri = URI.parse("https://api.smspartner.fr/v1/send")
  5. header = {
  6. 'Content-Type': 'application/json',
  7. 'cache-control': 'no-cache'
  8. }
  9. data = {
  10. apiKey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  11. phoneNumbers: "+336XXXXXXXX",
  12. virtualNumber: "+336XXXXXXXX",
  13. sender: "demo RUBY",
  14. gamme: 1,
  15. message: "C'est un message test en RUBY !",
  16. webhookUrl: "https://webhook.site/TOKEN"
  17. }
  18. http = Net::HTTP.new(uri.host, uri.port)
  19. http.use_ssl = true
  20. request = Net::HTTP::Post.new(uri.request_uri, header)
  21. request.body = data.to_json
  22. response = http.request(request)
  23. puts response.body

Consult our documentation on our SMS sending API

API HTTP/HTTPS

Your account gives you immediate access to our free SMS API.

Connexion SMPP

Send your SMS messages directly from an SMPP account.

Solution Mail to SMS
Mail to SMS

Send one or more SMS messages by writing a simple email.

SDK SMS - SMS Partner
SDK SMS

Check out code examples shared by developers in our community.

SMS API Pricing

Our SMS solution is connected to over 220 countries, each with its own specific pricing.

Destination

Price per SMS

For a pack of
:
€ HT

Features

20 free SMS messages with orders of 200 SMS or more :

  • Instant or scheduled sending
  • Content customization
  • Stop SMS
  • International sending
  • Guaranteed sending

Sending SMS messages via API: Use cases

SMS APIs offer a multitude of uses for businesses, enabling them to automate and optimize customer communication. They are particularly useful for sending thousands of messages in seconds, while ensuring a seamless and personalized customer experience.

Among the most common use cases are:

✅ Sending OTP (One-Time Password) codes to secure connections.

✅ Confirming appointments or reservations.

✅ Order tracking notifications to keep customers informed in real time.

SMS APIs also allow for segmenting and personalizing marketing campaigns, such as promotions or discounts, while measuring their effectiveness through customer feedback.

Finally, they facilitate the automation of repetitive tasks (follow-ups, reminders, alerts) and the scheduling of automated messages, freeing up time for teams while improving communication.

SMS API available with

The guarantees of the SMS Partner API

Plan de travail 40 copie 23@3x

A team available to assist you 7 days a week

Plan de travail 40 copie 24@3x

A secure solution via the HTTPS API

Plan de travail 40 copie 21@3x

Offices located in Paris

Plan de travail 40 copie 20@3x

A proprietary technology

SMS API Features

  • STOP SMS

Legislation requires professionals to include the “Stop SMS” option in their promotional SMS messages.

  • Issuer’s name

Customize the sender name that will appear in messages sent during your campaigns. Personalizing it will help reassure your recipients.

  • Plan your campaigns

Select the date and time to send your messages in order to optimize your campaigns by choosing the opportune moment.

  • Delivery receipt

Receive delivery receipts for your SMS messages after each campaign. Analyze your feedback to optimize your future mailings.

  • “Sandbox” Test

Simply try out our SMS API by running tests in the “sandbox”. A tool to better implement our API on your site.

  • International SMS

Our API allows you to send international SMS messages to more than 220 countries worldwide at the best price (Some countries apply specific rules related to telecom networks).

  • Multi-account space

Sub-account management allows you to facilitate consumption for your customers/users. The API manages up to 10,000 sub-accounts.

  • Short URL

SMS Partner provides you with an API to create and manage your short URLs. Shorten your URLs and track the number of clicks.

  • Type of SMS

The SMS Partner API allows you to send Premium SMS messages, but also low-cost SMS messages depending on your needs.

  • Retrieve the answers

The API allows you to receive SMS replies to messages sent to you (short number / long number).

  • Sending SMS messages in batches

Send 500 SMS messages directly in a single request and save bandwidth on your server with batch SMS sending. Send SMS in bulk.

  • Number verification

Automatically verify the validity of your mobile phone numbers using a number verification via our dedicated HLR API.

AboutSMS API

How can I manage sending bulk SMS messages without overloading my server?

The API allows sending up to 500 SMS messages in a single request (batch sending), which optimizes bandwidth and reduces server load. SMS Partner offers a sandbox environment for testing integrations before production deployment.

What programming languages and frameworks are compatible with the SMS Partner API?

The SMS Partner API is compatible with several languages, including PHP, Node.js, Python, Java, Go, Ruby, and cURL. Ready-to-use code examples are available for each language, and detailed technical documentation is accessible to facilitate integration.

What security and legal compliance guarantees are offered by the SMS Partner API?

  • Data security: Phone numbers are protected and are never used by SMS Partner or third parties.
  • GDPR/CNIL compliance: The API automatically integrates the “Stop SMS” option for promotional campaigns and complies with anti-spam regulations.
  • Technical security: The API uses the HTTPS protocol to encrypt communications and offers an infrastructure hosted in France.

Enjoy our service with 20 free SMS messages, with no commitment or subscription required.

20 FREE SMSNo commitment, no subscription

Since 2014, over 5,000 clients have placed their trust in us.