Mobile Message API Documentation
The base URL for the API is https://api.mobilemessage.com.au/
. This documentation will help you understand how to send and receive SMS messages, set up webhooks for real-time notifications, and track message delivery statuses.
The Mobile Message API allows up to 5 simultaneous requests per account. If you exceed this limit, you'll receive an HTTP 429 error with the message: "Too many concurrent requests. Please wait."
Simply wait for an existing request to complete before trying again.
Authentication
Use Basic Authentication with your API username and password to access the endpoints. Follow these steps:
- Combine your
username:password
. - Encode the resulting string in Base64.
- Add this string to the
Authorization
header as:Authorization: Basic {base64_encoded_credentials}
.
Code Examples
curl -u user123:mypassword -X GET https://api.mobilemessage.com.au/v1/messages
import requests
from requests.auth import HTTPBasicAuth
response = requests.get('https://api.mobilemessage.com.au/v1/messages',
auth=HTTPBasicAuth('user123', 'mypassword'))
print(response.json())
const username = 'user123';
const password = 'mypassword';
fetch('https://api.mobilemessage.com.au/v1/messages', {
headers: {
'Authorization': 'Basic ' + btoa(`${username}:${password}`)
}
})
.then(response => response.json())
.then(data => console.log(data));
<?php
$ch = curl_init('https://api.mobilemessage.com.au/v1/messages');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "user123:mypassword");
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Base64;
public class APIRequest {
public static void main(String[] args) throws Exception {
String credentials = Base64.getEncoder().encodeToString("user123:mypassword".getBytes());
URL url = new URL("https://api.mobilemessage.com.au/v1/messages");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestProperty("Authorization", "Basic " + credentials);
connection.setRequestMethod("GET");
// Process the response...
}
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
class Program {
static async Task Main() {
var client = new HttpClient();
var byteArray = Encoding.ASCII.GetBytes("user123:mypassword");
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
var response = await client.GetAsync("https://api.mobilemessage.com.au/v1/messages");
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
Send SMS Messages
POST /v1/messages
This endpoint allows you to send one or more SMS messages. You can include up to 100 messages in a single request.
Request Parameters
Parameter | Type | Description |
---|---|---|
messages |
Array of Objects | A list of messages to be sent. |
Each message object should include:
Field | Type | Description |
---|---|---|
to |
String | The recipient's phone number, which can be in local Australian format or international format. |
message |
String | The message content (maximum 765 characters). You can include GSM characters, such as standard English letters, numbers, and punctuation, but emojis are not supported. |
sender |
String | The sender ID to display. This ID must be registered in your account first. |
custom_ref (optional) |
String | A custom reference to help track the message. |
Code Examples
curl -u user123:mypassword -X POST https://api.mobilemessage.com.au/v1/messages \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"to": "0412345678",
"message": "Hello, this is a test message",
"sender": "CompanyABC",
"custom_ref": "tracking001"
}
]
}'
import requests
from requests.auth import HTTPBasicAuth
data = {
"messages": [
{
"to": "0412345678",
"message": "Hello, this is a test message",
"sender": "CompanyABC",
"custom_ref": "tracking001"
}
]
}
response = requests.post('https://api.mobilemessage.com.au/v1/messages',
json=data, auth=HTTPBasicAuth('user123', 'mypassword'))
print(response.json())
const messageData = {
messages: [
{
to: "0412345678",
message: "Hello, this is a test message",
sender: "CompanyABC",
custom_ref: "tracking001"
}
]
};
fetch('https://api.mobilemessage.com.au/v1/messages', {
method: 'POST',
headers: {
'Authorization': 'Basic ' + btoa('user123:mypassword'),
'Content-Type': 'application/json'
},
body: JSON.stringify(messageData)
})
.then(response => response.json())
.then(data => console.log(data));
<?php
$data = [
"messages" => [
[
"to" => "0412345678",
"message" => "Hello, this is a test message",
"sender" => "CompanyABC",
"custom_ref" => "tracking001"
]
]
];
$ch = curl_init('https://api.mobilemessage.com.au/v1/messages');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "user123:mypassword");
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Base64;
public class SendSMS {
public static void main(String[] args) throws Exception {
String jsonInputString = "{\"messages\": [{\"to\": \"0412345678\", \"message\": \"Hello, this is a test message\", \"sender\": \"CompanyABC\", \"custom_ref\": \"tracking001\"}]}";
String credentials = Base64.getEncoder().encodeToString("user123:mypassword".getBytes());
URL url = new URL("https://api.mobilemessage.com.au/v1/messages");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic " + credentials);
connection.setRequestProperty("Content-Type", "application/json");
connection.setDoOutput(true);
try(OutputStream os = connection.getOutputStream()) {
os.write(jsonInputString.getBytes("utf-8"));
}
// Process the response...
}
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
class Program {
static async Task Main() {
var messageData = new {
messages = new[] {
new {
to = "0412345678",
message = "Hello, this is a test message",
sender = "CompanyABC",
custom_ref = "tracking001"
}
}
};
var client = new HttpClient();
var byteArray = Encoding.ASCII.GetBytes("user123:mypassword");
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
var content = new StringContent(JsonConvert.SerializeObject(messageData), Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.mobilemessage.com.au/v1/messages", content);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
Response Example
{
"status": "complete",
"total_cost": 1,
"results": [
{
"to": "0412345678",
"message": "Hello, this is a test message",
"sender": "CompanyABC",
"custom_ref": "tracking001",
"status": "success",
"cost": 1,
"message_id": "abcd1234-efgh-5678-ijkl-9876543210mn"
}
]
}
Lookup Sent Messages
GET /v1/messages
Retrieve details of a sent message using message_id
or custom_ref
as query parameters.
Query Parameters
Parameter | Type | Description |
---|---|---|
message_id |
String | The unique message ID (UUID). |
custom_ref |
String | Your custom reference. Use the "%" character for wildcard searches. |
Code Examples
curl -u user123:mypassword -X GET "https://api.mobilemessage.com.au/v1/messages?message_id=abcd1234-efgh-5678-ijkl-9876543210mn"
import requests
from requests.auth import HTTPBasicAuth
url = "https://api.mobilemessage.com.au/v1/messages?message_id=abcd1234-efgh-5678-ijkl-9876543210mn"
response = requests.get(url, auth=HTTPBasicAuth('user123', 'mypassword'))
print(response.json())
const messageId = "abcd1234-efgh-5678-ijkl-9876543210mn";
fetch(`https://api.mobilemessage.com.au/v1/messages?message_id=${messageId}`, {
headers: {
'Authorization': 'Basic ' + btoa('user123:mypassword')
}
})
.then(response => response.json())
.then(data => console.log(data));
<?php
$message_id = "abcd1234-efgh-5678-ijkl-9876543210mn";
$url = "https://api.mobilemessage.com.au/v1/messages?message_id=" . $message_id;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "user123:mypassword");
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Base64;
public class LookupMessage {
public static void main(String[] args) throws Exception {
String message_id = "abcd1234-efgh-5678-ijkl-9876543210mn";
URL url = new URL("https://api.mobilemessage.com.au/v1/messages?message_id=" + message_id);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
String credentials = Base64.getEncoder().encodeToString("user123:mypassword".getBytes());
connection.setRequestProperty("Authorization", "Basic " + credentials);
connection.setRequestMethod("GET");
// Process the response...
}
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program {
static async Task Main() {
string message_id = "abcd1234-efgh-5678-ijkl-9876543210mn";
string url = $"https://api.mobilemessage.com.au/v1/messages?message_id={message_id}";
var client = new HttpClient();
var byteArray = System.Text.Encoding.ASCII.GetBytes("user123:mypassword");
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
var response = await client.GetAsync(url);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
Response
The response will include details such as message status, cost, and the timestamp when the message was requested.
Example Response (JSON)
{
"status": "complete",
"results": [
{
"to": "+61412345678",
"message": "Hello, this is message 1",
"sender": "CompanyABC",
"custom_ref": "tracking001",
"status": "success",
"cost": 1,
"message_id": "abcd1234-efgh-5678-ijkl-9876543210mn",
"requested_at": "2024-09-30 14:35:00"
}
]
}
Account Credit Balance
GET /v1/account
Retrieve your current SMS credit balance using your authenticated credentials. No extra parameters are required.
Code Examples
# Execute the GET request and view the response
curl -u user123:mypassword -X GET https://api.mobilemessage.com.au/v1/account
# Example response output:
# {"status": "complete", "credit_balance": 1000}
import requests
from requests.auth import HTTPBasicAuth
url = "https://api.mobilemessage.com.au/v1/account"
response = requests.get(url, auth=HTTPBasicAuth('user123', 'mypassword'))
# Parse the JSON response
data = response.json()
credit_balance = data.get('credit_balance', 'N/A')
print(f"Credit Balance: {credit_balance}")
# Output might be: Credit Balance: 1000
// Using Fetch API to get and process account balance
fetch('https://api.mobilemessage.com.au/v1/account', {
method: 'GET',
headers: {
'Authorization': 'Basic ' + btoa('user123:mypassword'),
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => {
const creditBalance = data.credit_balance || 'N/A';
console.log("Credit Balance:", creditBalance);
})
.catch(error => console.error(error));
<?php
$url = "https://api.mobilemessage.com.au/v1/account";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "user123:mypassword");
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
$creditBalance = isset($data['credit_balance']) ? $data['credit_balance'] : 'N/A';
echo "Credit Balance: " . $creditBalance;
// Output might be: Credit Balance: 1000
?>
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Base64;
import org.json.JSONObject; // Requires org.json library
public class GetBalance {
public static void main(String[] args) throws Exception {
URL url = new URL("https://api.mobilemessage.com.au/v1/account");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
String credentials = Base64.getEncoder().encodeToString("user123:mypassword".getBytes());
connection.setRequestProperty("Authorization", "Basic " + credentials);
connection.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder responseStr = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
responseStr.append(inputLine);
}
in.close();
JSONObject json = new JSONObject(responseStr.toString());
int creditBalance = json.getInt("credit_balance");
System.out.println("Credit Balance: " + creditBalance);
}
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq; // Requires Newtonsoft.Json package
class Program {
static async Task Main() {
var client = new HttpClient();
var byteArray = Encoding.ASCII.GetBytes("user123:mypassword");
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
var response = await client.GetAsync("https://api.mobilemessage.com.au/v1/account");
var responseString = await response.Content.ReadAsStringAsync();
var json = JObject.Parse(responseString);
var creditBalance = json["credit_balance"];
Console.WriteLine("Credit Balance: " + creditBalance);
}
}
Example Successful Response (200)
{
"status": "complete",
"credit_balance": 1000
}
Example Error Responses
Account Not Found (404)
{
"error": "Account not found or no credit balance available."
}
Invalid Request Method (405)
{
"error": "Invalid request method. Only GET is allowed."
}
Delivery Receipts & Inbound Messages (Webhooks)
Configure webhooks to receive real-time notifications for inbound messages and delivery receipts.
Webhook URL Setup
Set your Inbound and/or Status URL in your account settings. These URLs will receive POST requests with a JSON payload when an event occurs.
Webhook Payload Structure
Field | Type | Description |
---|---|---|
to |
String | Recipient's phone number. |
message |
String | Content of the SMS. |
sender |
String | The sender's ID or phone number. |
received_at |
String | UTC timestamp when the event was received. |
type (inbound only) |
String | Either "inbound" or "unsubscribe" . |
original_message_id (inbound only) |
String | The UUID of the original outbound message. |
original_custom_ref (inbound only) |
String | Your custom reference for the original message. |
status (status webhooks only) |
String | Either "delivered" or "failed" . |
message_id (status webhooks only) |
String | The unique message ID. |
custom_ref (status webhooks only) |
String | Your custom reference (if provided) for the outbound message. |
Example Inbound Webhook Payload
{
"to": "61412345678",
"message": "Hello, this is message 1",
"sender": "61412345699",
"received_at": "2024-09-30 14:35:00",
"type": "inbound",
"original_message_id": "db6190e1-1ce8-4cdd-b871-244257d57abc",
"original_custom_ref": "tracking001"
}
Example Status Webhook Payload
{
"to": "61412345678",
"message": "Hello, this is message 1",
"sender": "Mobile MSG",
"custom_ref": "tracking001",
"status": "delivered",
"message_id": "044b035f-0396-4a47-8428-12d5273ab04a",
"received_at": "2024-09-30 14:35:00"
}
Inbound Webhook Examples
Below are sample implementations for receiving inbound SMS messages.
from flask import Flask, request
app = Flask(__name__)
@app.route('/webhook-inbound', methods=['POST'])
def inbound_webhook():
data = request.get_json(force=True)
# Extract inbound fields
to = data.get('to', '')
message = data.get('message', '')
sender = data.get('sender', '')
received_at = data.get('received_at', '')
inbound_type = data.get('type', '')
original_message_id = data.get('original_message_id', '')
original_custom_ref = data.get('original_custom_ref', '')
print("Inbound Webhook Received:")
print(f" To: {to}")
print(f" From: {sender}")
print(f" Received At: {received_at}")
print(f" Message: {message}")
print(f" Type: {inbound_type}")
print(f" Original Message ID: {original_message_id}")
print(f" Original Custom Ref: {original_custom_ref}")
# Respond with simple 'OK'
return "OK", 200
if __name__ == '__main__':
app.run(port=5000)
const express = require('express');
const app = express();
app.use(express.json());
app.post('/webhook-inbound', (req, res) => {
const {
to,
message,
sender,
received_at,
type,
original_message_id,
original_custom_ref
} = req.body;
console.log("Inbound Webhook Received:");
console.log(" To:", to);
console.log(" From:", sender);
console.log(" Received At:", received_at);
console.log(" Message:", message);
console.log(" Type:", type);
console.log(" Original Message ID:", original_message_id);
console.log(" Original Custom Ref:", original_custom_ref);
res.status(200).send("OK");
});
app.listen(3000, () => {
console.log('Inbound webhook server listening on port 3000');
});
<?php
// Simple inbound webhook example in PHP
$rawData = file_get_contents('php://input');
$data = json_decode($rawData, true);
$to = $data['to'] ?? '';
$message = $data['message'] ?? '';
$sender = $data['sender'] ?? '';
$receivedAt = $data['received_at'] ?? '';
$type = $data['type'] ?? '';
$originalMessageId = $data['original_message_id'] ?? '';
$originalCustomRef = $data['original_custom_ref'] ?? '';
error_log("Inbound Webhook Received:");
error_log(" To: $to");
error_log(" From: $sender");
error_log(" Received At: $receivedAt");
error_log(" Message: $message");
error_log(" Type: $type");
error_log(" Original Message ID: $originalMessageId");
error_log(" Original Custom Ref: $originalCustomRef");
// Send a simple OK response
http_response_code(200);
echo "OK";
import org.springframework.web.bind.annotation.*;
import org.springframework.http.ResponseEntity;
@RestController
public class InboundWebhookController {
@PostMapping("/webhook-inbound")
public ResponseEntity<String> handleInbound(@RequestBody InboundPayload payload) {
System.out.println("Inbound Webhook Received:");
System.out.println(" To: " + payload.getTo());
System.out.println(" From: " + payload.getSender());
System.out.println(" Received At: " + payload.getReceivedAt());
System.out.println(" Message: " + payload.getMessage());
System.out.println(" Type: " + payload.getType());
System.out.println(" Original Message ID: " + payload.getOriginalMessageId());
System.out.println(" Original Custom Ref: " + payload.getOriginalCustomRef());
return ResponseEntity.ok("OK");
}
}
// Example inbound payload model
class InboundPayload {
private String to;
private String message;
private String sender;
private String receivedAt;
private String type;
private String originalMessageId;
private String originalCustomRef;
// Getters and setters...
}
using Microsoft.AspNetCore.Mvc;
using System;
[ApiController]
[Route("webhook-inbound")]
public class InboundWebhookController : ControllerBase {
[HttpPost]
public IActionResult HandleInbound([FromBody] InboundPayload payload) {
Console.WriteLine("Inbound Webhook Received:");
Console.WriteLine($" To: {payload.To}");
Console.WriteLine($" From: {payload.Sender}");
Console.WriteLine($" Received At: {payload.ReceivedAt}");
Console.WriteLine($" Message: {payload.Message}");
Console.WriteLine($" Type: {payload.Type}");
Console.WriteLine($" Original Message ID: {payload.OriginalMessageId}");
Console.WriteLine($" Original Custom Ref: {payload.OriginalCustomRef}");
return Ok("OK");
}
}
public class InboundPayload {
public string To { get; set; }
public string Message { get; set; }
public string Sender { get; set; }
public string ReceivedAt { get; set; }
public string Type { get; set; }
public string OriginalMessageId { get; set; }
public string OriginalCustomRef { get; set; }
}
Status Webhook Examples
Below are sample implementations for receiving message delivery status updates. These use fields status
and message_id
, plus any custom reference used when sending the message.
from flask import Flask, request
app = Flask(__name__)
@app.route('/webhook-status', methods=['POST'])
def status_webhook():
data = request.get_json(force=True)
# Extract status-related fields
to = data.get('to', '')
message = data.get('message', '')
sender = data.get('sender', '')
custom_ref = data.get('custom_ref', '')
status = data.get('status', '')
message_id = data.get('message_id', '')
received_at = data.get('received_at', '')
print("Status Webhook Received:")
print(f" To: {to}")
print(f" From: {sender}")
print(f" Received At: {received_at}")
print(f" Message: {message}")
print(f" Custom Ref: {custom_ref}")
print(f" Status: {status}")
print(f" Message ID: {message_id}")
return "OK", 200
if __name__ == '__main__':
app.run(port=5000)
const express = require('express');
const app = express();
app.use(express.json());
app.post('/webhook-status', (req, res) => {
const {
to,
message,
sender,
custom_ref,
status,
message_id,
received_at
} = req.body;
console.log("Status Webhook Received:");
console.log(" To:", to);
console.log(" From:", sender);
console.log(" Received At:", received_at);
console.log(" Message:", message);
console.log(" Custom Ref:", custom_ref);
console.log(" Status:", status);
console.log(" Message ID:", message_id);
res.status(200).send("OK");
});
app.listen(3000, () => {
console.log('Status webhook server listening on port 3000');
});
<?php
$rawData = file_get_contents('php://input');
$data = json_decode($rawData, true);
$to = $data['to'] ?? '';
$message = $data['message'] ?? '';
$sender = $data['sender'] ?? '';
$customRef = $data['custom_ref'] ?? '';
$status = $data['status'] ?? '';
$messageId = $data['message_id'] ?? '';
$receivedAt = $data['received_at'] ?? '';
error_log("Status Webhook Received:");
error_log(" To: $to");
error_log(" From: $sender");
error_log(" Received At: $receivedAt");
error_log(" Message: $message");
error_log(" Custom Ref: $customRef");
error_log(" Status: $status");
error_log(" Message ID: $messageId");
http_response_code(200);
echo "OK";
import org.springframework.web.bind.annotation.*;
import org.springframework.http.ResponseEntity;
@RestController
public class StatusWebhookController {
@PostMapping("/webhook-status")
public ResponseEntity<String> handleStatus(@RequestBody StatusPayload payload) {
System.out.println("Status Webhook Received:");
System.out.println(" To: " + payload.getTo());
System.out.println(" From: " + payload.getSender());
System.out.println(" Received At: " + payload.getReceivedAt());
System.out.println(" Message: " + payload.getMessage());
System.out.println(" Custom Ref: " + payload.getCustomRef());
System.out.println(" Status: " + payload.getStatus());
System.out.println(" Message ID: " + payload.getMessageId());
return ResponseEntity.ok("OK");
}
}
// Example status payload model
class StatusPayload {
private String to;
private String message;
private String sender;
private String customRef;
private String status;
private String messageId;
private String receivedAt;
// Getters and setters...
}
using Microsoft.AspNetCore.Mvc;
using System;
[ApiController]
[Route("webhook-status")]
public class StatusWebhookController : ControllerBase {
[HttpPost]
public IActionResult HandleStatus([FromBody] StatusPayload payload) {
Console.WriteLine("Status Webhook Received:");
Console.WriteLine($" To: {payload.To}");
Console.WriteLine($" From: {payload.Sender}");
Console.WriteLine($" Received At: {payload.ReceivedAt}");
Console.WriteLine($" Message: {payload.Message}");
Console.WriteLine($" Custom Ref: {payload.CustomRef}");
Console.WriteLine($" Status: {payload.Status}");
Console.WriteLine($" Message ID: {payload.MessageId}");
return Ok("OK");
}
}
public class StatusPayload {
public string To { get; set; }
public string Message { get; set; }
public string Sender { get; set; }
public string CustomRef { get; set; }
public string Status { get; set; }
public string MessageId { get; set; }
public string ReceivedAt { get; set; }
}
Common API Errors and Solutions
Error Message | HTTP/Message Code | Description and Solution |
---|---|---|
Unauthorized |
401 | Invalid API username or password. Check your credentials and ensure they are encoded correctly in your request. |
Missing or invalid "messages" parameter. |
400 | The request body must contain a valid "messages" array. Ensure the JSON structure is correct and the "messages" array is present. |
Invalid phone number format |
error | The phone number provided is incorrectly formatted. Ensure numbers are in either Australian local or international format. |
Message content cannot be empty |
error | Your message content is empty. Include text content within the allowed 765-character limit. |
Invalid sender. You do not have permission to use this sender. |
error | You have attempted to use a sender ID not registered in your account. Register the sender ID first or select an authorised sender. To view your sender IDs, login to your account and click Settings > Sender IDs. |
The recipient has unsubscribed and cannot receive messages. |
blocked | The recipient has unsubscribed from your messages. Remove this number from your recipient list or contact the recipient directly. |
Message contains non-GSM characters |
error | Your message contains unsupported characters (e.g., emojis). Use standard GSM characters only. |
Message exceeds the maximum allowed length of 765 characters. |
error | Reduce your message length to a maximum of 765 characters. |
Insufficient credits to send the batch of messages. |
403 | You do not have enough SMS credits for the request. Please add more credits to your account. |
Too many concurrent requests. Please wait. |
429 | Your account has reached the maximum number of simultaneous requests (5). Wait briefly before trying again. |
Invalid request method. Only POST and GET are allowed. |
405 | The request method used is incorrect. Ensure you are using the correct HTTP method (POST or GET) for the endpoint. |
Simple API GET /simple/send‑sms
When you can’t send a JSON body, use our Simple API endpoint. All parameters go in the query string.
Example Request URL
https://api.mobilemessage.com.au/simple/send-sms?api_username=YOUR_USERNAME&api_password=YOUR_PASSWORD&sender=61412345678&to=61498765432&message=Hello+there&custom_ref=OptionalRef123
Query Parameters
Parameter | Required? | Description |
---|---|---|
api_username |
Yes | Your API username. |
api_password |
Yes | Your API password. |
sender |
Yes | Your approved sender ID or phone number (e.g., 61412345678 ). |
to |
Yes | Recipient’s phone number in international format (e.g., 61498765432 ). |
message |
Yes | URL‑encoded SMS text (spaces as + , special chars percent‑encoded). |
custom_ref |
No | Your own tracking reference (optional). |
Response
On success, you’ll get the same JSON structure as POST /v1/messages
but with only one result.
{
"status": "complete",
"total_cost": 1,
"results": [
{
"to": "61498765432",
"message": "Hello, there",
"sender": "61412345678",
"custom_ref": "OptionalRef123",
"status": "success",
"cost": 1,
"message_id": "abcd1234-efgh-5678-ijkl-9876543210mn"
}
]
}