Use the SMPP Server for convert SMPP to HTTP

1. Create an API-key

To start using the HTTP API, create your own API key in your account.

2. Add ESME

Add an SMPP profile (ESME) so that the client can connect to the SMPP Server.

3. Retrieve the SMS

Receive all sent SMS over the SMPP protocol in real time on your «Webhook URL».

4. Send Status (DLR)

Send status (DLR) via HTTP, and our SMPP-Converter will forward it to the ESME by «client_id».

Create API key

Creation of an API Key

To perform all HTTP requests to our API, mandatory authorization using an API key in the headers is required. Access levels can be configured for each key.

In the user's account section under «API Keys» generate Your API-key using the form:
IP Whitelist - this is an optional parameter, but we recommend filling it out if you know the IP addresses from which you will be calling our endpoints;
Can Send SMS - enabling this allows sending SMS via SMPP Client;
Can Fetch SMS Out - allows retrieving the history of all sent SMS;
Can Manage SMSC - grants full control (CRUD) over SMS providers;
Can Fetch SMSC-Logs - allows searching and exporting of SMPP Client logs.
Can Send DLR - enabling this allows sending DLR (status of SMS) via SMPP Server;
Can Fetch SMS In - allows retrieving the history of all received SMS by ESMEs;
Can Manage ESME - grants full control (CRUD) over SMPP profiles;
Can Fetch ESME-Logs - allows searching and exporting of SMPP Server logs.

      
                        
    import requests
    
    response = requests.post('https://smpp-converter.com/api/client/create/',
        headers={
            'X-API-Key': 'Your API-key'
        },
        json={
            'username': 'myclient1',
            'password': 'qwerty123',
            'allow_ip': '11.22.33.44,55.66.77.88',
            'throughput': 0,
            'binds': 3,
            'webhook': 'https://myapp.com/receive-sms/',
            'enabled': True,
        })
    
    print(response.json())
                        
                    
      
                            
    $ch = curl_init('https://smpp-converter.com/api/client/create/');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        'Content-Type: application/json',
        'X-API-Key: Your API-key'
    ]);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
        'username' => 'myclient1',
        'password' => 'qwerty123',
        'allow_ip' => '11.22.33.44,55.66.77.88',
        'throughput' => 0,
        'binds' => 3,
        'webhook' => 'https://myapp.com/receive-sms/',
        'enabled' => true,
    ]));
    
    $response = curl_exec($ch);
    curl_close($ch);
    
    echo $response;
                            
                        
      
                            
    fetch('https://smpp-converter.com/api/client/create/', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'X-API-Key': 'Your API-key'
        },
        body: JSON.stringify({
            username: 'myclient1',
            password: 'qwerty123',
            allow_ip: '11.22.33.44,55.66.77.88',
            throughput: 0,
            binds: 3,
            webhook: 'https://myapp.com/receive-sms/',
            enabled: true
        })
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));
                            
                        
                            
    package main
    
    import (
    	"bytes"
    	"encoding/json"
    	"fmt"
    	"net/http"
    )
    
    func main() {
    	url := "https://smpp-converter.com/api/client/create/"
    	payload := map[string]interface{}{
    		"username":       "myclient1",
    		"password":       "qwerty123",
            "allow_ip":       "11.22.33.44,55.66.77.88",
    		"throughput":     0,
    		"binds":          3,
            "webhook":        "https://myapp.com/receive-sms/",
    		"enabled":        true,
    	}
    
    	jsonData, err := json.Marshal(payload)
    	if err != nil {
    		fmt.Println("Error marshaling JSON:", err)
    		return
    	}
    
    	req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
    	if err != nil {
    		fmt.Println("Error creating request:", err)
    		return
    	}
    
    	req.Header.Set("Content-Type", "application/json")
    	req.Header.Set("X-API-Key", "Your API-key")
    
    	client := &http.Client{}
    	resp, err := client.Do(req)
    	if err != nil {
    		fmt.Println("Error making request:", err)
    		return
    	}
    	defer resp.Body.Close()
    
    	var result map[string]interface{}
    	json.NewDecoder(resp.Body).Decode(&result)
    	fmt.Println(result)
    }
                            
                        
                            
    import java.net.URI;
    import java.net.http.HttpClient;
    import java.net.http.HttpRequest;
    import java.net.http.HttpResponse;
    import com.google.gson.JsonObject;
    import com.google.gson.JsonParser;
    
    public class Main {
        public static void main(String[] args) throws Exception {
            HttpClient client = HttpClient.newHttpClient();
    
            JsonObject json = new JsonObject();
            json.addProperty("username", "myclient1");
            json.addProperty("password", "qwerty123");
            json.addProperty("allow_ip", "11.22.33.44,55.66.77.88");
            json.addProperty("throughput", 0);
            json.addProperty("binds", 3);
            json.addProperty("webhook", "https://myapp.com/receive-sms/");
            json.addProperty("enabled", true);
    
            HttpRequest request = HttpRequest.newBuilder()
                    .uri(URI.create("https://smpp-converter.com/api/client/create/"))
                    .header("Content-Type", "application/json")
                    .header("X-API-Key", "Your API-key")
                    .POST(HttpRequest.BodyPublishers.ofString(json.toString()))
                    .build();
    
            HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
            System.out.println(response.body());
        }
    }
                            
                        
    HTTP Response (Status 200):
                    
    OK
                    
                    
    HTTP Response (Status 400):
                    
    {
    "username":[
        "This field is required."
    ],
    "binds":[
        "This field is required."
    ],
    ...
    }
                    
                    
    HTTP Response (Status 403):
                    
    Insufficient api_key.permissions to perform this operation.
                    
                    

    Adding and editing ESMEs

    You can add an SMPP-profile (ESME) through the web form in your account. However, if you need to manage the CRUD process for ESMEs from your application, use the HTTP API.
    To add an SMPP profile, perform a POST request to endpoint https://smpp-converter.com/api/client/create/ with the following JSON parameters:

    username - required, string, max. 16 characters. Client login for SMPP connection;
    password - optional, string, max. 9 characters. Client password for SMPP connection;
    allow_ip - optional, string, max. 255 characters. Comma-separated IPv4 addresses from which the client can connect to the SMPP server;
    throughput - optional, number, max. 3000. SMS throughput per minute for a single connection. For example, 60 means the client will not be able to send more than 1 SMS per second. By default, 0 means no limits (~50 SMS/sec.);
    binds - required, number, max. 30. Specifies to the SMPP Server how many simultaneous connections (binds) the client can open;
    webhook - optional, string, max. 255 characters. The «Webhook URL» will be called via HTTP each time an SMS is received from this client (ESME);
    enabled - required, boolean value. Active or inactive connection. When deactivated, an «unbind» command will be sent immediately to the ESME, and the connection will be closed.

    To edit an SMPP-profile (ESME), perform a PUT request to the endpoint https://smpp-converter.com/api/client/update/ with JSON parameters similar to those used for creation. When editing, the SMPP Server will automatically perform a secure reconnection with the new parameters.

                                  
      import requests
      
      resp = requests.get('https://smpp-converter.com/api/client/list/', 
          headers={
              'X-API-Key': 'Your API-key',
          })
      print(resp.json())
                                  
                              
        
                                  
      $ch = curl_init('https://smpp-converter.com/api/client/list/');
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: Your API-key']);
      $response = curl_exec($ch);
      curl_close($ch);
      
      echo $response;
                                  
                              
        
                                  
      fetch('https://smpp-converter.com/api/client/list/', {
          headers: {
              'X-API-Key': 'Your API-key'
          }
      })
      .then(response => response.json())
      .then(data => console.log(data))
      .catch(error => console.error('Error:', error));
                                  
                              
                                  
      package main
      
      import (
          "fmt"
          "io/ioutil"
          "net/http"
      )
      
      func main() {
          req, _ := http.NewRequest("GET", "https://smpp-converter.com/api/client/list/", nil)
          req.Header.Set("X-API-Key", "Your API-key")
      
          client := &http.Client{}
          resp, _ := client.Do(req)
          defer resp.Body.Close()
      
          body, _ := ioutil.ReadAll(resp.Body)
          fmt.Println(string(body))
      }
                                  
                              
                                  
      import java.net.URI;
      import java.net.http.HttpClient;
      import java.net.http.HttpRequest;
      import java.net.http.HttpResponse;
      
      public class Main {
          public static void main(String[] args) throws Exception {
              HttpClient client = HttpClient.newHttpClient();
              HttpRequest request = HttpRequest.newBuilder()
                      .uri(URI.create("https://smpp-converter.com/api/client/list/"))
                      .header("X-API-Key", "Your API-key")
                      .build();
      
              HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
              System.out.println(response.body());
          }
      }
                                  
                              
      HTTP Response (Status 200):
                              
      {
          "clients": [
              {
                  "id": 1234,
                  "username": "myclient1",
                  "password": "qwerty123",
                  "allow_ip": "11.22.33.44,55.66.77.88",
                  "throughput": 0,
                  "binds": 3,
                  "webhook": "https://myapp.com/sent-sms-status/",
                  "enabled": true,
                  "updated": 1721751278,
                  "created": 1721748953,
              },
          ...
          ],
          "connections": {
              "BIND_TX": [
                  {
                      "client_id": 1234,
                      "bindType": "BIND_TX",
                      "systemType": "",
                      "status": "BOUND_TX",
                      "connectionId": "bea1d715-e8d6-4625-b141-aaedc3e20d75",
                      "localAddr": "188.245.90.194:2775",
                      "remoteAddr": "12.34.56.78:12345",
                      "inflightCount": 0,
                      "queueCount": 0,
                      "connected": 1721935169
                  },
              ...
              ],
              "BIND_RX": [
                  {
                      "client_id": 1234,
                      "bindType": "BIND_RX",
                      "status": "BOUND_RX",
                      "connectionId": "e813626e-8490-42a6-abae-f3b8bd1a1616",
                      "localAddr": "188.245.90.194:2775",
                      "remoteAddr": "12.34.56.78:23456",
                      "inflightCount": 0,
                      "queueCount": 0,
                      "connected": 1721935169
                  },
                  ...
              ],
              "BIND_TRX": [
                  {
                      "client_id": 1234,
                      "bindType": "BIND_TRX",
                      "status": "BOUND_TRX",
                      "connectionId": "d41d1f18-f22d-4a29-9403-f064871ad8c0",
                      "localAddr": "188.245.90.194:2775",
                      "remoteAddr": "12.34.56.78:34567",
                      "inflightCount": 0,
                      "queueCount": 0,
                      "connected": 1721935159
                  },
              ...
              ]
          }
      }
                              
                          
      HTTP Response (Status 403):
                              
      Insufficient api_key.permissions to perform this operation.
                              
                          

      Retrieving the list of ESMEs

      You can view the list and connection statuses of SMPP-profiles in your account under the ESME List» tab. However, if you need to display the list in your application, use the HTTP API. To retrieve the list of ESMEs, make a GET request to the endpoint https://smpp-converter.com/api/client/list/

      The response will contain a two-dimensional array:
      clients - a list of ESMEs;
      connections - active connections (binds).

      The list of «clients»:
      id - unique numerical ID of the SMPP-profile (ESME) in the our database;
      username - username of the ESME;
      password - password of the ESME;
      allow_ip - сomma-separated list of IPv4 addresses from which the client can connect;
      throughput - SMS throughput per minute for a single connection;
      binds - how many simultaneous connections (binds) the ESME can open;
      webhook - The «Webhook URL» will be called via HTTP each time an SMS is received from this client (ESME);
      enabled - whether the connection to the ESME is enabled or disabled;
      updated - Unix Timestamp of the last change to the ESME parameters;
      created - Unix Timestamp of the ESME addition;

      The list of «connections» can be of 3 types: BIND_TX - SMS sending only mode, BIND_RX - receiving delivery reports (DLR) mode or BIND_TRX - sending SMS and receiving DLR:
      client_id - numeric ID of the SMPP profile in the our database;
      bindType - connection mode to the SMPP Server. It can be «BIND_TX» - Transmitter, «BIND_RX» - Receiver, or «BIND_TRX» - Transceiver;
      status - connection status (bind status). It can be «DIAL» - establishing connection, «OPEN» - authorization, «BOUND_TX» - connected as Transmitter, «BOUND_RX» - connected as Receiver, «BOUND_TRX» - connected as Transceiver, «UNBINDING» - disconnecting, or «CLOSED» - connection closed;
      connectionId - unique string ID of the connection;
      localAddr - connection address on the SMPP server side;
      remoteAddr - connection address on the ESME side;
      inflightCount - number of DLR in the process of being sent;
      queueCount - DLR queue awaiting submit. This may occur if the client is not have connections as a «Receiver» or «Transceiver»;
      connected - Unix Timestamp of the last status change of the connection.

          
                            
        import requests
        
        resp = requests.delete('https://smpp-converter.com/api/client/delete/1234/', 
            headers={
                'X-API-Key': 'Your API-key',
            })
        print(resp.json())
                            
                        
          
                                
        $ch = curl_init('https://smpp-converter.com/api/client/delete/1234/');
        curl_setopt_array($ch, [
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_CUSTOMREQUEST => 'DELETE',
            CURLOPT_HTTPHEADER => ['X-API-Key: Your API-key']
        ]);
        $response = curl_exec($ch);
        curl_close($ch);
        
        echo $response;                
                                
                            
          
                                
        fetch('https://smpp-converter.com/api/client/delete/1234/', {
            method: 'DELETE',
            headers: {
                'X-API-Key': 'Your API-key'
            }
        })
        .then(response => response.json())
        .then(data => console.log(data))
        .catch(error => console.error('Error:', error));
                                
                            
                                
        package main
        
        import (
            "fmt"
            "net/http"
            "io/ioutil"
        )
        
        func main() {
            req, _ := http.NewRequest("DELETE", "https://smpp-converter.com/api/client/delete/1234/", nil)
            req.Header.Set("X-API-Key", "Your API-key")
        
            resp, _ := http.DefaultClient.Do(req)
            defer resp.Body.Close()
        
            body, _ := ioutil.ReadAll(resp.Body)
            fmt.Println(string(body))
        }
                                
                            
                                
        import java.net.URI;
        import java.net.http.HttpClient;
        import java.net.http.HttpRequest;
        import java.net.http.HttpResponse;
        
        public class Main {
            public static void main(String[] args) throws Exception {
                HttpClient client = HttpClient.newHttpClient();
                HttpRequest request = HttpRequest.newBuilder()
                        .uri(URI.create("https://smpp-converter.com/api/client/delete/1234/"))
                        .header("X-API-Key", "Your API-key")
                        .DELETE()
                        .build();
        
                HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
                System.out.println(response.body());
            }
        }
                                
                            
        HTTP Response (Status 200):
                            
        OK
                            
                        
        HTTP Response (Status 403):
                            
        Insufficient api_key.permissions to perform this operation.
                            
                        

        Deleting an ESME

        You can delete an SMPP-profile (ESME) from your account. However, if you need to control the CRUD process for the ESMEs from your application, use the HTTP API.
        To delete an ESME, make a DELETE request to the endpoint https://smpp-converter.com/api/client/delete/XXX/ - where XXX is the numeric ID of the ESME id.
        If the ESME is enabled and a connection is established at the time of deletion, the SMPP Server will immediately send an «unbind» command and close the connection.

            
                              
          import json
          
          request_body = '{"client_id": 1234, "msg_id": "074b8a96-f983-4b0b-8079-4d4c8502ff02", "sender": "Mysender", "receiver": "390991234567", ...}'
          
          data = json.loads(request_body)
          
          print(data)
          # {'client_id': 1234, 'msg_id': '074b8a96-f983-4b0b-8079-4d4c8502ff02', 'sender': 'Mysender', 'receiver': '390991234567', ...}
                              
                          
            
                                  
          $request_body = '{"client_id": 1234, "msg_id": "074b8a96-f983-4b0b-8079-4d4c8502ff02", "sender": "Mysender", "receiver": "390991234567", ...}';
          
          $data = json_decode($request_body, true);
          
          print_r($data);
          // Array ( [client_id] => 1234 [msg_id] => 074b8a96-f983-4b0b-8079-4d4c8502ff02 [sender] => Mysender [receiver] => 390991234567 ... )                            
                                  
                              
            
                                  
          const requestBody = '{"client_id": 1234, "msg_id": "074b8a96-f983-4b0b-8079-4d4c8502ff02", "sender": "Mysender", "receiver": "390991234567", ...}';
          
          const data = JSON.parse(requestBody);
          
          console.log(data);
          // { client_id: 1234, msg_id: '074b8a96-f983-4b0b-8079-4d4c8502ff02', sender: 'Mysender', receiver: '390991234567', ... }
                                  
                              
                                  
          package main
          
          import (
              "encoding/json"
              "fmt"
          )
          
          func main() {
              requestBody := `{"client_id": 1234, "msg_id": "074b8a96-f983-4b0b-8079-4d4c8502ff02", "sender": "Mysender", "receiver": "390991234567", ...}`
          
              var data map[string]interface{}
              err := json.Unmarshal([]byte(requestBody), &data)
              if err != nil {
                  fmt.Println("Error:", err)
                  return
              }
          
              fmt.Println(data)
              // map[client_id:1234 msg_id:074b8a96-f983-4b0b-8079-4d4c8502ff02 sender:Mysender, receiver:390991234567 ...]
          }
                                  
                              
                                  
          import com.fasterxml.jackson.databind.ObjectMapper;
          import java.io.IOException;
          import java.util.Map;
          
          public class JsonExample {
              public static void main(String[] args) {
                  String requestBody = "{\"client_id\": 1234, \"msg_id\": \"074b8a96-f983-4b0b-8079-4d4c8502ff02\", \"sender\": \"Mysender\", \"receiver\": \"390991234567\", ...}";
          
                  ObjectMapper mapper = new ObjectMapper();
                  try {
                      Map data = mapper.readValue(requestBody, Map.class);
                      System.out.println(data);
                      // {client_id=1234, msg_id=074b8a96-f983-4b0b-8079-4d4c8502ff02, sender=Mysender, receiver=390991234567, ...}
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
          }
                                  
                              
          HTTP Request:
                              
          {
              "client_id":1234,
              "msg_id":"074b8a96-f983-4b0b-8079-4d4c8502ff02",
              "sender":"Mysender",
              "receiver":"390991234567",
              "service_type":"",
              "src_ton":5,
              "src_npi":0,
              "dst_ton":1,
              "dst_npi":1,
              "message":"I am test SMS message",
              "data_coding":0,
              "reference":0,
              "total_parts":1,
              "part_number":1,
              "smsc_time":1721980552913
          }
                                  
                          

          Receiving SMS

          To receive SMS, specify the «Webhook URL» when creating or editing the ESME. The each SMS/segment will be sent via POST method.

          The parameters we pass:
          client_id - unique numerical identifier for the SMPP profile (ESME). It is used to identify the user who sent the SMS for further message processing in your system;
          msg_id - unique string identifier for the SMS assigned by the SMPP Server, which was provided to the SMS provider (SMSC) in the «submit_sm_resp»;
          sender - sender's name in the SMS;
          receiver - recipient's address of the SMS;
          service_type - is used by some ESME to specify the SMS application service;
          src_ton - type of number for sender name;
          src_npi - numbering plan indicator for sender name;
          dst_ton - type of number for receiver;
          dst_npi - numbering plan indicator for receiver;
          message - text of the sent SMS. If the message is multipart, the text of the SMS part (maximum of 70, 140 or 160 characters depending on the encoding);
          data_coding - numeric value of the SMS text encoding. 0: if 7-bit, 2: 8-bit and 8: 16-bit;
          reference - unique number for the multipart SMS used for all parts of the SMS that form the combined message;
          total_parts - numeric value of the number of segments in the sent SMS. If the message is split into 3 parts, then «total_parts=3»;
          part_number - numeric value of the segment in the sent SMS (from 1 to 10). When splitting the message into segments, «part_number» is unique for each segment within a single SMS (reference);
          smsc_time - Unix Timestamp (with milliseconds) when the SMPP Server received the SMS.

          The server response must be «status=200 OK»; otherwise, the SMPP-Converter will attempt to resend the request.

              
                                
            import requests
            
            resp = requests.post('https://smpp-converter.com/api/message/esme/create/', 
                headers={
                    'X-API-Key': 'Your API-key',
                },
                json=[{
                    'client_id': 1234,
                    'msg_id': '074b8a96-f983-4b0b-8079-4d4c8502ff02',
                    'status': 'delivered',
                    'err_code': 0,
                    },
                    {
                    'client_id': 1234,
                    'msg_id': '219c2a23-71f7-463b-9379-011198c26499',
                    'status': 'rejected',
                    'err_code': 69,
                    },
                ])
            print(resp.json())
                                
                            
              
                                    
            $ch = curl_init('https://smpp-converter.com/api/message/esme/create/');
            curl_setopt_array($ch, [
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => json_encode([
            [
                'client_id' => 1234,
                'msg_id' => '074b8a96-f983-4b0b-8079-4d4c8502ff02',
                'status' => 'delivered',
                'err_code' => 0,
            ],
            [
                'client_id' => 1234,
                'msg_id' => '219c2a23-71f7-463b-9379-011198c26499',
                'status' => 'rejected',
                'err_code' => 69,
            ]
            ]),
            CURLOPT_HTTPHEADER => [
                'X-API-Key: Your API-key',
                'Content-Type: application/json'
            ]
            ]);
            
            $response = curl_exec($ch);
            curl_close($ch);
            
            echo $response;
                                    
                                
                                    
            fetch('https://smpp-converter.com/api/message/esme/create/', {
                method: 'POST',
                headers: {
                    'X-API-Key': 'Your API-key',
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify([
                    {
                        client_id: 1234,
                        msg_id: '074b8a96-f983-4b0b-8079-4d4c8502ff02',
                        status: 'delivered',
                        err_code: 0,
                    },
                    {
                        client_id: 1234,
                        msg_id: '219c2a23-71f7-463b-9379-011198c26499',
                        status: 'rejected',
                        err_code: 69,
                    }
                ])
            })
            .then(response => response.json())
            .then(data => console.log(data))
            .catch(error => console.error('Error:', error));
                                    
                                
                                    
            package main
            
            import (
                "bytes"
                "encoding/json"
                "fmt"
                "net/http"
            )
            
            func main() {
                data := []map[string]interface{}{
                    {
                        "client_id": 1234,
                        "msg_id":   "074b8a96-f983-4b0b-8079-4d4c8502ff02",
                        "status":   "delivered",
                        "err_code": 0,
                    },
                    {
                        "client_id": 1234,
                        "msg_id":   "219c2a23-71f7-463b-9379-011198c26499",
                        "status":   "rejected",
                        "err_code": 69,
                    },
                }
            
                jsonData, _ := json.Marshal(data)
            
                req, _ := http.NewRequest("POST", "https://smpp-converter.com/api/message/esme/create/", bytes.NewBuffer(jsonData))
                req.Header.Set("X-API-Key", "Your API-key")
                req.Header.Set("Content-Type", "application/json")
            
                client := &http.Client{}
                resp, _ := client.Do(req)
                defer resp.Body.Close()
            
                body, _ := io.ReadAll(resp.Body)
                fmt.Println(string(body))
            }
                                    
                                
                                    
            import java.net.URI;
            import java.net.http.HttpClient;
            import java.net.http.HttpRequest;
            import java.net.http.HttpResponse;
            import java.util.List;
            import com.fasterxml.jackson.databind.ObjectMapper;
            
            public class Main {
                public static void main(String[] args) throws Exception {
                    HttpClient client = HttpClient.newHttpClient();
                    ObjectMapper mapper = new ObjectMapper();
            
                    String json = mapper.writeValueAsString(List.of(
                        Map.of(
                            "client_id", 1234,
                            "msg_id", "074b8a96-f983-4b0b-8079-4d4c8502ff02",
                            "status", "delivered",
                            "err_code", 0,
                        ),
                        Map.of(
                            "client_id", 1234,
                            "msg_id", "219c2a23-71f7-463b-9379-011198c26499",
                            "status", "rejected",
                            "err_code", 69,
                        )
                    ));
            
                    HttpRequest request = HttpRequest.newBuilder()
                            .uri(URI.create("https://smpp-converter.com/api/message/esme/create/"))
                            .header("X-API-Key", "Your API-key")
                            .header("Content-Type", "application/json")
                            .POST(HttpRequest.BodyPublishers.ofString(json))
                            .build();
            
                    HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
                    System.out.println(response.body());
                }
            }
                                    
                                
            HTTP Response (Status 200):
                            
            OK
                            
                            
            HTTP Response (Status 400):
                                
            {
            "client_id":[
                "This field is required."
            ],
            "msg_id":[
                "This field is required.",
            ],
            "status":[
                "This field is required."
            ],
            ...
            }
                                
                            
            HTTP Response (Status 403):
                                
            Insufficient api_key.permissions to perform this operation.
                                
                            

            Sending Status of SMS (DLR)

            To send an Status of SMS (DLR), make a POST request to the endpoint https://smpp-converter.com/api/message/esme/create/ with the following JSON parameters:

            client_id - (required, number) unique ID for the ESME to which the DLR needs to be sent;
            msg_id - (required, string, max. 255 characters) unique ID for the SMS/segment in response to which a delivery report (DLR) needs to be sent;
            status - (required, string, max. 25 characters) final status of the SMS/segment. Possible values: «delivered, rejected, undelivered, expired, unknown»;
            err_code - (optional, number, max. 255) the SMPP error code describes the reason for status «rejected, undelivered, expired, unknown». The full list is available at the link SMPP error codes;

            Up to 1000 DLR can be sent in a single HTTP request. You can send the status only once for a single SMS/segment.

                                          
              import requests
              
              resp = requests.get('https://smpp-converter.com/api/message/esme/list/', 
                  headers={
                      'X-API-Key': 'Your API-key',
                  },
                  params={
                      'page': 1,
                      'status': 'delivered', 
                      'start_date': '2024-08-25',
                      'end_date': '2024-08-27',
                  })
              print(resp.json())
                                          
                                      
                
                                          
              $ch = curl_init('https://smpp-converter.com/api/message/esme/list/?' . http_build_query([
                  'page' => 1,
                  'status' => 'delivered',
                  'start_date' => '2024-08-25',
                  'end_date' => '2024-08-27',
              ]));
              
              curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($ch, CURLOPT_HTTPHEADER, [
                  'X-API-Key: Your API-key',
              ]);
              
              $response = curl_exec($ch);
              curl_close($ch);
              
              $data = json_decode($response, true);
              print_r($data);
                                          
                                      
                
                                          
              fetch('https://smpp-converter.com/api/message/esme/list/?' + new URLSearchParams({
                  page: 1,
                  status: 'delivered',
                  start_date: '2024-08-25',
                  end_date: '2024-08-27'
              }), {
                  headers: { 'X-API-Key': 'Your API-key' }
              })
              .then(response => response.json())
              .then(data => console.log(data))
              .catch(error => console.error('Error:', error));
                                          
                                      
                                          
              package main
              
              import (
                  "fmt"
                  "io/ioutil"
                  "net/http"
                  "net/url"
              )
              
              func main() {
                  baseURL := "https://smpp-converter.com/api/message/esme/list/"
                  params := url.Values{}
                  params.Add("page", "1")
                  params.Add("status", "delivered")
                  params.Add("start_date", "2024-08-25")
                  params.Add("end_date", "2024-08-27")
              
                  fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
                  req, err := http.NewRequest("GET", fullURL, nil)
                  if err != nil {
                      fmt.Println("Error creating request:", err)
                      return
                  }
                  req.Header.Add("X-API-Key", "Your API-key")
              
                  client := &http.Client{}
                  resp, err := client.Do(req)
                  if err != nil {
                      fmt.Println("Error making request:", err)
                      return
                  }
                  defer resp.Body.Close()
              
                  body, err := ioutil.ReadAll(resp.Body)
                  if err != nil {
                      fmt.Println("Error reading response body:", err)
                      return
                  }
              
                  fmt.Println(string(body))
              }
                                          
                                      
                                          
              import java.io.BufferedReader;
              import java.io.InputStreamReader;
              import java.net.HttpURLConnection;
              import java.net.URL;
              import java.net.URLEncoder;
              
              public class Main {
                  public static void main(String[] args) throws Exception {
                      String baseUrl = "https://smpp-converter.com/api/message/esme/list/";
                      String params = String.format("?page=%s&status=%s&start_date=%s&end_date=%s", 
                          URLEncoder.encode("1", "UTF-8"), 
                          URLEncoder.encode("delivered", "UTF-8"), 
                          URLEncoder.encode("2024-08-25", "UTF-8"), 
                          URLEncoder.encode("2024-08-27", "UTF-8")
                      );
              
                      URL url = new URL(baseUrl + params);
                      HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                      conn.setRequestMethod("GET");
                      conn.setRequestProperty("X-API-Key", "Your API-key");
              
                      BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                      String inputLine;
                      StringBuilder content = new StringBuilder();
                      while ((inputLine = in.readLine()) != null) {
                          content.append(inputLine);
                      }
                      in.close();
                      conn.disconnect();
              
                      System.out.println(content.toString());
                  }
              }
                                          
                                      
              HTTP Response (Status 200):
                                      
              {
                  "count": 1234567,
                  "next": "https://smpp-converter.com/api/message/esme/list/?page=2",
                  "previous": null,
                  "results": [
                    {
                      "id": 1234567,
                      "client_id": 1234,
                      "msg_id": "074b8a96-f983-4b0b-8079-4d4c8502ff02",
                      "sender": "MySender",
                      "receiver": "380991234567",
                      "reference": 0,
                      "parts_count": 1,
                      "part": 1,
                      "amount_usd": "0.00100000",
                      "msg_prefix": "Have ",
                      "msg_suffix": " day!",
                      "smsc_time": 1724601175951,
                      "dlr_time": 1724601177612,
                      "coding": 0,
                      "err_code": 0,
                      "callback_code": 0,
                      "status": "delivered",
                      "updated": "2024-08-25T15:52:55.742160Z",
                      "created": "2024-08-25T15:52:55.327667Z"
                    },
                  ...
                  ]
              }
                                      
                                  
              HTTP Response (Status 403):
                                      
              Insufficient api_key.permissions to perform this operation.
                                      
                                  

              Retrieve a list of received SMS

              You can view the list of received SMS in your account under the «Received SMS» tab. However, if you need to display the list in your application, use the HTTP API. To retrieve the list of received SMS, perform a GET request to the endpoint https://smpp-converter.com/api/message/esme/list/

              Parameters to be passed:
              page - page number. By default, «page=1», which returns the most recent records;
              page_size - maximum number of 1000. Defines the number of records per page. By default, «page_size=25»;
              client_id - number IDs of SMS profiles (ESMEs), separated by commas. Searches for all SMS received from the specified ESMEs. Example: «client_id=1234,1235»;
              msg_id - unique string identifier of the SMS/segment. Search by exact match;
              receiver - recipient's phone number in international format (without special characters). Search by exact match;
              status - search for received SMS/segmets by their status. Possible values are «pending, rejected, delivered, undelivered, expired, unknown»;
              start_date - string parameter defining the start date of the search. Format: 2006-01-02;
              end_date - string parameter defining the end date of the search. Format: 2006-01-02;

              The response will be a two-dimensional array:
              count - total number of records found based on the specified criteria and filters;
              next - URL of the next page. If the value is NULL, it indicates that this is the last page;
              previous - URL of the previous page. If the value is NULL, it indicates that this is the first page;
              results - list of found SMS/segments.

              Each SMS/segment object consists of:
              id - unique number ID of the SMS/segment in our system;
              client_id - unique number ID of the SMPP-profile (ESME) through which the SMS/segment was received;
              msg_id - string ID of the SMS/segment;
              sender - sender's name in the SMS;
              receiver - recipient's phone number;
              reference - unique number for the multipart SMS used for all parts of the SMS that form the combined message;
              parts_count - number of segments in the SMS. Defaults to 1 if the message was not split into parts.;
              part - sequential number of the segment. Defaults to 1 for messages without splitting;
              amount_usd - commission deducted from the balance for conversion;
              msg_prefix - first 5 characters of the SMS/segment text;
              msg_suffix - last 5 characters of the SMS/segment text. It may be empty or less than 5 characters;
              smsc_time - Unix Timestamp (with milliseconds) when the SMPP Server received the SMS/segment;
              dlr_time - Unix Timestamp (with milliseconds) when the SMPP Server sent the delivery report (deliver_sm or data_sm) to the ESME;
              coding - numeric value of the SMS text encoding. 0: if 7-bit, 2: 8-bit and 8: 16-bit;
              err_code - SMPP error code. A value of 0 indicates no errors;
              callback_code - HTTP status code of the «Webhook URL» response. A value of 0 indicates that the «Webhook URL» was not specified in the SMPP-profile (ESME);
              status - status of the SMS/segment. It can be «pending, rejected, delivered, undelivered, expired, unknown»;
              updated - date in ISO 8601 format of the last update to the SMS/segment;
              created - date in ISO 8601 format of SMS/segment creation in SMPP-Converter;

                                            
                resp = requests.get('https://smpp-converter.com/api/log/esme/list/', 
                    headers={
                        'X-API-Key': 'Your API-key',
                    },
                    params={
                        'dateFrom': '2024-08-25', 
                        'dateTo': '2024-08-26', 
                        'clientIds[]': [1234],
                    })
                print(resp.json())
                                            
                                        
                  
                                            
                $params = [
                    'dateFrom' => '2024-08-25',
                    'dateTo' => '2024-08-26',
                    'clientIds' => [1234],
                ];
                
                $url = "https://smpp-converter.com/api/log/esme/list/?" . http_build_query($params);
                
                $ch = curl_init($url);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: Your API-key']);
                $response = curl_exec($ch);
                curl_close($ch);
                
                print_r(json_decode($response, true));
                                            
                                        
                  
                                            
                const params = new URLSearchParams({
                    dateFrom: '2024-08-25',
                    dateTo: '2024-08-26',
                    'clientIds[]': 1234
                });
                
                fetch(`https://smpp-converter.com/api/log/esme/list/?${params.toString()}`, {
                    headers: {
                        'X-API-Key': 'Your API-key'
                    }
                })
                .then(response => response.json())
                .then(data => console.log(data))
                .catch(error => console.error('Error:', error));
                                            
                                        
                                            
                package main
                
                import (
                    "encoding/json"
                    "fmt"
                    "net/http"
                    "net/url"
                )
                
                func main() {
                    params := url.Values{
                        "dateFrom":  {"2024-08-25"},
                        "dateTo":    {"2024-08-26"},
                        "clientIds[]": {1234},
                    }
                
                    reqURL := fmt.Sprintf("%s?%s", "https://smpp-converter.com/api/log/esme/list/", params.Encode())
                    req, _ := http.NewRequest("GET", reqURL, nil)
                    req.Header.Set("X-API-Key", "Your API-key")
                
                    resp, _ := http.DefaultClient.Do(req)
                    defer resp.Body.Close()
                
                    var result map[string]interface{}
                    json.NewDecoder(resp.Body).Decode(&result)
                
                    fmt.Println(result)
                }
                                            
                                        
                                            
                import java.net.URI;
                import java.net.http.HttpClient;
                import java.net.http.HttpRequest;
                import java.net.http.HttpResponse;
                import java.net.URLEncoder;
                import java.nio.charset.StandardCharsets;
                import java.util.Map;
                import java.util.StringJoiner;
                
                public class Main {
                    public static void main(String[] args) throws Exception {
                        Map params = Map.of(
                            "dateFrom", "2024-08-25",
                            "dateTo", "2024-08-26",
                            "clientIds[]", 1234
                        );
                
                        StringJoiner sj = new StringJoiner("&");
                        for (Map.Entry entry : params.entrySet()) {
                            sj.add(URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8) + "=" 
                                + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8));
                        }
                
                        String url = "https://smpp-converter.com/api/log/esme/list/?" + sj.toString();
                
                        HttpClient client = HttpClient.newHttpClient();
                        HttpRequest request = HttpRequest.newBuilder()
                            .uri(URI.create(url))
                            .header("X-API-Key", "Your API-key")
                            .build();
                
                        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
                
                        System.out.println(response.body());
                    }
                }                                
                                            
                                        
                HTTP Response (Status 200):
                                        
                [
                    {
                        "date": "2024-08-25",
                        "name": "1234.log",
                        "size": 3539546,
                        "modTime": "2024-08-25T23:59:55.816298164"
                    },
                    {
                        "date": "2024-08-26",
                        "name": "1234.log",
                        "size": 2382360,
                        "modTime": "2024-08-26T12:04:11.817023138"
                    },
                ...
                ]
                                        
                                    
                HTTP Response (Status 403):
                                        
                Insufficient api_key.permissions to perform this operation.
                                        
                                    

                Retrieving the list of SMPP Server logs

                You can view the list of ESME logs in your account under the «SMPP Logs» tab. However, if you need to display the list in your application, use the HTTP API. To retrieve the list of SMPP log files, perform a GET request to the endpoint https://smpp-converter.com/api/log/esme/list/

                Parameters to be passed:
                dateFrom - required string parameter defining the start date of the search. Format: 2006-01-02;
                dateTo - required string parameter defining the end date of the search. Format: 2006-01-02;
                clientIds - number IDs of SMPP-profiles (ESMEs). Example: clientIds[]=1234&clientIds[]=1235».

                The response will include a list of log files and their properties. Each object consists of:
                date - date in the format «2006-01-02». A new SMPP log file is created daily for each ESME, and logs are written to it until a new file is created;
                name - filename. Required for detailed viewing or downloading the logs;
                size - the file size in bytes;
                modTime - date/time in ISO 8601 format of the last modification.

                CONCAT(date, name) forms a unique file identifier. To subsequently download or view its contents, you need to provide this concatenated params (date + name) to identify the log file on the server.

                                              
                  import requests
                  
                  resp = requests.get('https://smpp-converter.com/api/log/esme/download/', 
                      headers={
                          'X-API-Key': 'Your API-key',
                      },
                      params={'files[]': ['2024-08-251234.log']})
                  print(resp.text)
                                              
                                          
                                              
                  $curl = curl_init();
                  
                  curl_setopt_array($curl, array(
                      CURLOPT_URL => 'https://smpp-converter.com/api/log/esme/download/?files[]=2024-08-251234.log',
                      CURLOPT_RETURNTRANSFER => true,
                      CURLOPT_HTTPHEADER => array(
                      'X-API-Key: Your API-key'
                      ),
                  ));
                  
                  $response = curl_exec($curl);
                  curl_close($curl);
                  
                  echo $response;
                                              
                                          
                                              
                  fetch('https://smpp-converter.com/api/log/esme/download/?files[]=2024-08-251234.log', {
                      method: 'GET',
                      headers: {
                          'X-API-Key': 'Your API-key'
                      }
                  })
                  .then(response => response.text())
                  .then(data => console.log(data))
                  .catch(error => console.error('Error:', error));
                                              
                                          
                                              
                  package main
                  
                  import (
                      "fmt"
                      "io/ioutil"
                      "net/http"
                  )
                  
                  func main() {
                      client := &http.Client{}
                      req, err := http.NewRequest("GET", "https://smpp-converter.com/api/log/esme/download/?files[]=2024-08-251234.log", nil)
                      if err != nil {
                          fmt.Println("Error creating request:", err)
                          return
                      }
                  
                      req.Header.Set("X-API-Key", "Your API-key")
                  
                      resp, err := client.Do(req)
                      if err != nil {
                          fmt.Println("Error making request:", err)
                          return
                      }
                      defer resp.Body.Close()
                  
                      body, err := ioutil.ReadAll(resp.Body)
                      if err != nil {
                          fmt.Println("Error reading response body:", err)
                          return
                      }
                  
                      fmt.Println(string(body))
                  }
                                              
                                          
                                              
                  import java.net.URI;
                  import java.net.http.HttpClient;
                  import java.net.http.HttpRequest;
                  import java.net.http.HttpResponse;
                  
                  public class Main {
                      public static void main(String[] args) {
                          HttpClient client = HttpClient.newHttpClient();
                  
                          HttpRequest request = HttpRequest.newBuilder()
                                  .uri(URI.create("https://smpp-converter.com/api/log/esme/download/?files[]=2024-08-251234.log"))
                                  .header("X-API-Key", "Your API-key")
                                  .build();
                  
                          client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
                                  .thenApply(HttpResponse::body)
                                  .thenAccept(System.out::println)
                                  .join();
                      }
                  }
                                              
                                          
                  HTTP Response (Status 200):
                                          
                  ...
                  INFO[2024-07-29 21:02:05][1beb339d-24dd-4abc-a1c3-9e77d88856ab]: <<<<< 000000450000000400000000000000080005004d7953656e6465720001013338303939313233343536370000000000000100000110486176652061206e6963652064617921
                  SUBMIT_SM: 
                  {
                      "Header": {
                      "command_length": 69,
                      "command_id": 4,
                      "command_status": 0,
                      "sequence_number": 8
                      },
                      "service_type": "",
                      "source_addr_ton": 5,
                      "source_addr_npi": 0,
                      "source_addr": "MySender",
                      "dest_addr_ton": 1,
                      "dest_addr_npi": 1,
                      "destination_addr": "380991234567",
                      "esm_class": 0,
                      "protocol_id": 0,
                      "priority_flag": 0,
                      "schedule_delivery_time": "",
                      "validity_period": "",
                      "registered_delivery": 1,
                      "replace_if_present_flag": false,
                      "message": {
                          "data_coding": 0,
                          "sm_default_msg_id": 1,
                          "short_message": "Have a nice day!"
                      }
                  }
                  INFO[2024-07-29 21:02:06][1beb339d-24dd-4abc-a1c3-9e77d88856ab]: >>>>> 000000518000000400000000000000083635356131623936613663393062353238643632333937636165633363313564356437646464636361636166396161653666656564323263306239663962313500
                  SUBMIT_SM_RESP: 
                  {
                  "Header": {
                      "command_length": 81,
                      "command_id": 2147483652,
                      "command_status": 0,
                      "sequence_number": 8
                  },
                  "message_id": "074b8a96-f983-4b0b-8079-4d4c8502ff02"
                  }
                  ...
                                          
                                      
                  HTTP Response (Status 403):
                                          
                  Insufficient api_key.permissions to perform this operation.
                                          
                                      

                  Viewing/Exporting SMPP Server Logs

                  You can view or download SMPP logs in your account under the «SMPP Logs» tab. However, if you need to export logs to your application, use the HTTP API. To view an SMPP log file or export an archive, perform a GET request to the endpoint https://smpp-converter.com/api/log/esme/download/

                  Parameters to be passed:
                  files - CONCAT(date, client_id, ".log") is the ID of SMPP files. Example: «files[]=2024-08-251234.log»;

                  If the number of «files[]» is greater than 1, the server response will be a ZIP archive containing the files of the requested SMPP logs.
                  If the number of «files[]» is equal to 1, the server response will contain the contents of the SMPP log file with GZIP compression.