SMS APIs

Integrate SMS into your System

APIs for sending SMS / TXT messages

Does your business have an application that needs to send SMS messages?

Do you think hosting an in-house SMS Messaging Server would be too costly?

With SMS4U these problems are solved... SMS4U provides different methods to send SMS messages over the Internet.

SMS4U supports APIs to send SMS messages over the internet using both HTTP and HTTPS protocols, SOAP as well as a REST API interface.

Feel free to contact SMS4U to discuss any other transfer methods you may require!

 

How do I use the Web API?

Using your application, you can send SMS messages with JSON/XML data format.
Sample JSON request as per below:

{
    "Sender": "application@domain.com",
    "APIKey": "ta8wr7ymd",
    "MessageData" :
    {
        "Message": "Hello, this is a test message from Department01. Thank you.",
        "Destinations" : 
        [
            { "Recipient": "+6421000002" }
        ]
    }
}

Supported libraries:

Follow the SMS REST API Guide for more information.

 

How do I use the HTTP/HTTPS API?

Using your web server or browser you can send SMS/TXT messages using HTTP POST or GET.
The required fields are: sender, token, number and message

An example of this is as follows:

https://api.tnz.co.nz/api/v2.03/HttpApi/SMS?Sender=xxx&Token=xxx&Number=xxx&Message=xxx

Download the SMS HTTP API Guide for more information.
The true URLs have been hidden for security purposes. Please contact us for the complete API documentation.

 

How do I use the SOAP API?

Using your SOAP application, you can send SMS messages.
The required fields are: sender, token, number and message

An example of this is as follows (PHP):

$request = array(
  'sender' => '[EmailAddress]',
  'token' => '[Your Token]',
  'number' => '[Destination Mobile Number]',
  'message' => '[SMS Message]',
  'smsemailreply' => '', //optional
  'messageid' => '', //optional
);

$client = new SoapClient('https://www.tnz.co.nz/xxx/xxx.wsdl'); //TBA
$result = $client->__soapCall('send_sms', array($request));
printf("Result = %s\n", $result->smsReturn);

Download the SMS SOAP API Guide for more information.
The true URLs have been hidden for security purposes. Please contact us for the complete API documentation.