For the complete documentation index, see llms.txt. This page is also available as Markdown.

Single Status

This request allows you to retrieve the status of a single SMS.

URL

GET https://api.smspartner.fr/v1/message-status

Required Parameters

Name
Value

messageId

Message ID. Found in the response of the send request.

phoneNumber

Recipient's mobile phone number

Optional Parameters

Name
Value

_format

json or xml

Requests

<?php
 
        // Prepare data for GET request
        $data = 'apiKey=YOUR_API_KEY&messageId=300&phoneNumber=06xxxxxxxx';
 
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL,'https://api.smspartner.fr/v1/message-status?'.$data);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_TIMEOUT, 10);
 
 
        $result = curl_exec($curl);
        curl_close($curl);
 
        // Process your response here
        echo $result;
?>
Imports System.IO
Imports System.Net
 
Module Module1
 
  Sub Main()
 
    Dim base_url As String = "http://api.smspartner.fr/v1/"
    Dim apiKey As String = "YOUR_APIKEY"
    Dim phoneNumber As String = "06XXXXXXXX"
    Dim messageId As Integer = XXX
 
    #check credits
    Dim url As String
    url = base_url & "message-status" & "?apiKey=" & apiKey & "&phoneNumber=" & phoneNumber & "&messageId=" & messageId
 
    Dim credits As String
    credits = apiRequest("GET", url, Nothing)
 
  End Sub
 
  Function apiRequest(method As String, url As String, parameters As String) As String
 
    Dim request As HttpWebRequest
    request = WebRequest.Create(url)
    request.Method = method
    request.Timeout = 10000   # timeout in ms
    request.ContentType = "application/json; charset=utf-8"
    request.ContentLength = 0
 
    #set POST data
    If Not String.IsNullOrEmpty(parameters) Then
      request.ContentLength = parameters.Length
      Using reqStream As StreamWriter = New StreamWriter(request.GetRequestStream())
        reqStream.Write(parameters)
      End Using
    End If
 
    #get response
    Dim returnValue As String = Nothing
    Using response As HttpWebResponse = request.GetResponse()
      If response.StatusCode = HttpStatusCode.OK Then
        Using resStream = response.GetResponseStream()
          If resStream IsNot Nothing Then
            Using reader As New StreamReader(resStream)
              returnValue = reader.ReadToEnd()
            End Using
          End If
        End Using
      End If
    End Using
    apiRequest = returnValue
 
  End Function
 
End Module

Response

  • Delivered: The message was successfully delivered to the recipient’s device or platform.

  • Not delivered: The message could not be delivered. Possible reasons include an invalid phone number or operator issues.

  • Waiting: The message is still in the process of being delivered and has not yet been confirmed as delivered or failed.

Errors

Error Codes

Response Code
Description

1

API key is required

2

Phone number is required

3

Message ID is required

4

Message not found

10

Invalid API key

200

Everything is OK!

Last updated