SMS API

Add text messaging to your
software. Connect to our gateway
with an API key.

Why use our SMS API key SMS API key

Access to APIs and documentation is included in your account at no extra cost

It doesn’t matter what programming language you use, as long as it can connect to HTTP

Adding SMS to your software adds a level of personalisation and control

How a text messaging API works

When you sign up, you’ll get access to our API key for free. This allows you to
add SMS capabilities into your own tools, email, or website.

Your software

Our gateway

Mobile phone

Code in the language you like best

Our examples below are in PHP. Get our documentation, which provides language
agnostic examples so you can implement into C#, Ruby, Java and so on.

Send outgoing SMS

 				 					function sendSMS($content) {      $ch = curl_init('https://api.share-we.com/api-adv.php');      curl_setopt($ch, CURLOPT_POST, true);      curl_setopt($ch, CURLOPT_POSTFIELDS, $content);      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);      $output = curl_exec ($ch);      curl_close ($ch);      return $output;      }     $username = 'USERNAME';  $password = 'PASSWORD';  $destination = '0400000000'; //Multiple numbers can be entered, separated by a comma  $source    = 'MyCompany';  $text = 'This is our test message.';  $ref = 'abc123';         $content =  'username='.rawurlencode($username).              '&password='.rawurlencode($password).              '&to='.rawurlencode($destination).              '&from='.rawurlencode($source).              '&message='.rawurlencode($text).              '&ref='.rawurlencode($ref);     $share_we_response = sendSMS($content);  $response_lines = explode("\n", $share_we_response);      foreach( $response_lines as $data_line){      $message_data = "";      $message_data = explode(':',$data_line);      if($message_data[0] == "OK"){          echo "The message to ".$message_data[1]." was successful, with reference ".$message_data[2]."\n";      }elseif( $message_data[0] == "BAD" ){          echo "The message to ".$message_data[1]." was NOT successful. Reason: ".$message_data[2]."\n";      }elseif( $message_data[0] == "ERROR" ){          echo "There was an error with this request. Reason: ".$message_data[1]."\n";      }  }   				 			

Receive inbound SMS

 				 					$to = $_GET["to"]; //The receiving mobile number  $from = $_GET["from"]; //The sending mobile number  $message = urldecode($_GET["message"]); //SMS content     // You may wish to log this information in a database     // Lets send an email with the message data  $email_message = "Inbound SMS sent to $to.\nSent From: $from\nMessage: $message";  mail("email@example.com", "Inbound SMS", $message, "From: email@example.com"); 				 			

Receive message status

 				 					$mobile = $_GET["to"]; //The receiving mobile number  $ref = $_GET["ref"]; // Your reference number, if provided when sending  $smsref = $_GET["smsref"]; // Reference number  $status = $_GET["status"]; // Message status     // You may wish to log this information in a database     // Lets send an email with the updated data  $message = "Status update for SMS sent to $mobile.\nOur reference: $ref\nShare We Reference: $smsref\nThe message status is now $status.";  mail("email@example.com", "SMS Status Update", $message, "From: email@example.com"); 				 			

Fetch credit balance

 				 					function sendSMS($content) {      $ch = curl_init('https://api.share-we.com/api-adv.php');      curl_setopt($ch, CURLOPT_POST, true);      curl_setopt($ch, CURLOPT_POSTFIELDS, $content);      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);      $output = curl_exec ($ch);      curl_close ($ch);      return $output;      }     $username = 'USERNAME';  $password = 'PASSWORD';  $action    = 'balance';         $content =  'username='.rawurlencode($username).              '&password='.rawurlencode($password).              '&action='.rawurlencode($action);                   $share_we_response = sendSMS($content);  $share_we_response = explode(':', $share_we_response);     if($share_we_response[0] == "OK"){      echo "Share We balance is ".$share_we_response[1];  }elseif( $share_we_response[0] == "ERROR" ){      echo "There was an error with this request. Reason: ".$share_we_response[1]."\n";  } 				 			

Ways to use our SMS gateway

Access to both of our APIs and full documentation is included for free. plus, we have a support team available to give developerd a helping hand.

Build your own SMS integration by connecting your application to Share We using the HTTP protocol.

This full-featured API allows you to send and receive text messages, check credit balance, and get SMS delivery status. This API is ideal for sending bulk SMS as well as single messages.

All you’ll need is the ability to make an HTTPS or HTTP connection with our URL. Our API documentation contains all the required information, and our PHP SDK includes examples in PHP.

SHARE WE | Developers
SHARE WE | Developers

Email to SMS API

Use our lightweight API to send text messages over email easily. Many software packages with SMS capabilities can use the email-to-SMS gateway.

It’ll be as simple as using your contact’s phone number as the email address: [mobilenumber]@e2s.smsbroadcast.com.au — The first 160 characters will then get sent to your recipient as a text message.

You’ll just need to sign up to Share We and add your email address to your account settings. The API key itself is free of charge.

Website add-on

Add SMS functionality to a website for a bit of personalisation and interactivity. There are a few different reasons to use an SMS service:

  •   Notifications: get an SMS when users complete an action, like filling in a form
  •   User verification: use SMS to confirm users are human and not spam
  •   2-factor authentication: send verification codes by SMS for security
SHARE WE | Developers

Frequently asked questions

Access to both APIs is included free when you set up your self-serve account. Plus, you’ll get full documentation to get you started with sending SMS to customers and staff.

Yes! You’ll have the option to reach out to our support staff if you need help implementing SMS into your software.

SMS credits cost as low as 3.7 cents each. Your first credit purchase will be 40% off, and they won’t expire, so it’s a good idea to stock up! Check out our pay-as-you-go pricing model here.

Get set up in 30 seconds

Start sending and receiving SMS online. No software is required.

All USA networks

We deliver through onshore connections with Telstra, Optus and Vodafone without low-grade international routes.

Guaranteed lowest prices

You can sign up without needing to speak to a sales rep, which reduces our costs and allows us to offer you lower prices.

16 years of experience

We have been around for a long time. Our team of SMS experts are happy to walk you through the ins and outs of SMS.