5c SMS & Dingo Mail API
One API for business messaging across two channels: SMS through 5c SMS and email through Dingo Mail. Send and track SMS, hold two-way conversations, read inbound messages, and manage opt-outs, sender IDs and virtual numbers. Send transactional and bulk email from your own verified sending domains, with delivery status on every message. Endpoints are secure, JSON over HTTPS, and grouped in the sidebar by area.
Getting started
Step 1: Generate your API key.
- Go to https://www.5centsms.com.au/dashboard/api
- In API Key Management, set a Key Alias to identify the key.
- Click Create New API Key.
- Copy the generated Key ID and Key Secret.
The same key authenticates both the 5c SMS endpoints and the Dingo Mail email endpoints.
Important: Store your credentials securely. The Key Secret is shown only once and cannot be retrieved again.
Step 2: Send your first SMS.
curl -X POST https://www.5centsms.com.au/api/v5/sms \
-H "Content-Type: application/json" \
-d '{
"key-id": "Paste Key ID here",
"key-secret": "Paste Key Secret here",
"sender": "0404123123",
"to": "Paste recipient number here",
"message": "Hello World"
}'
Step 3: Send your first email.
curl -X POST https://api.dingomail.com.au/api/v5/email \
-H "Content-Type: application/json" \
-d '{
"key-id": "Paste Key ID here",
"key-secret": "Paste Key Secret here",
"SenderEmail": "news@mail.example.com",
"SenderName": "Example",
"Subject": "Hello",
"Text": "Hello World",
"Recipient": "Paste recipient email here"
}'
Email sends from a verified sending domain. Register one with Create Domain (under Email Domains) or in the dashboard, then use any address at that domain as the SenderEmail.
Authentication
Every request authenticates with your key-id and key-secret supplied in the JSON request body (set them once as the key_id / key_secret collection variables and they apply to every request here). All requests must use HTTPS — a plain HTTP request is rejected with 400 HTTPS Required.
Responses & errors
Every response is JSON and carries an error field. The HTTP status follows from it:
- HTTP 200 — success;
erroris an empty string (""). - HTTP 400 — the request failed; the reason is in
error. - HTTP 401 — authentication failed (see the table below).
- HTTP 503 — the API is in maintenance; retry shortly.
An unsupported method/path combination returns Unsupported method. Please see our API Docs.
Authentication errors (HTTP 401):
| Error | Cause |
|---|---|
Failed (Invalid Key ID) |
The key-id is missing or not recognised. |
Failed (Invalid Key Secret) |
The key-secret does not match the key. |
Failed (Invalid API ID or Key) |
The key id/secret pair is invalid. |
Failed (Invalid Username or API Key) |
Legacy credential pair is invalid. |
API hosts
Two base URLs back this collection, preset as variables:
https://www.5centsms.com.au/api/v5(5c SMS): SMS, Conversations, Account, Logins, Sender IDs, Virtual Numbers.https://api.dingomail.com.au/api/v5(Dingo Mail): Email and Email Domains.
Pagination
List endpoints return results newest-first, one page at a time. To fetch the next page, pass the last item's id as the after query parameter. after is a 24-character hex cursor (a MongoDB ObjectId), not an offset or page number.
Each list response includes next_page — a ready-to-use relative path already containing the after value for the following page — and count (items on the current page). Follow next_page until it is absent or empty.
Page sizes are fixed per endpoint:
| Endpoint | Page size |
|---|---|
| List Sent SMS | 20 |
| List Emails | 20 (override with limit, 1–100) |
| List Inbound Messages | 50 |
| List Opt-outs | 1000 |
A malformed after returns HTTP 400 — Failed (Invalid Page) on the SMS / Inbox / Opt-out endpoints, Invalid after parameter on List Emails (which also rejects a bad limit with Invalid limit parameter). Logins, Sender IDs, Virtual Numbers, and Email Domains return full unpaginated lists.
Message status codes
The status field on a message maps to a human-readable status_text. For the full list of status codes and their meanings, see Message Status List.
Data retention
Message data is retained for 365 days from the date of processing, after which it is permanently purged. Contact support if you require a different retention timeframe.
Using Postman
Download this collection and import it into Postman (Import → File, or paste the raw link). Set the key_id and key_secret collection variables once under the collection's Variables tab, then open any request and click Send. Each request's Documentation pane (the right-hand panel) shows its parameters, response fields, and errors.
SMS: https://www.5centsms.com.au/api/v5
Email: https://api.dingomail.com.au/api/v5{
"key-id": "your-key-id",
"key-secret": "your-key-secret"
}POST Send SMS
POST https://www.5centsms.com.au/api/v5/sms
Include key-id and key-secret in the JSON body of every request.
Send a single SMS to one or more recipients.
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
sender |
string | Yes | Sender ID. Max 13 characters; max 11 if alphanumeric ([0-9a-zA-Z] only). |
to |
string | Yes | Recipient number(s), comma-separated. International or 04 format. |
message |
string | Yes | Message content. Hex-encoded UTF-16 when unicode is true. |
test |
boolean | No | Simulate the send — no SMS delivered, no credits charged. Default false. |
unicode |
boolean | No | Send as UTF-16; message must be hex-encoded. Must be enabled on your account. Default false. |
schedule |
integer | No | UNIX epoch seconds for future delivery, max 356 days ahead. |
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
messages |
array | One entry per recipient. |
messages[].destination |
string | Recipient number. |
messages[].id |
string | Message id. |
messages[].status |
integer | Status code (see Introduction). |
messages[].status_text |
string | Human-readable status. |
messages[].credits |
number | Credits charged. |
messages[].schedule |
integer | Scheduled epoch — only when the message is scheduled (status 1005). |
Errors
| Error | HTTP | Cause |
|---|---|---|
Failed (Invalid Sender ID) |
400 | sender missing, >13 chars, or alphanumeric >11 chars / invalid characters. |
Failed (Invalid Destination) |
400 | to missing. |
Failed (Invalid Message) |
400 | message missing. |
Notes
- With
unicode, emoji and non-GSM text are supported; e.g.Testing🎉hex-encodes to00540065007300740069006E0067D83CDF89. - Use
test: trueto verify integration without sending or charging.
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X POST https://www.5centsms.com.au/api/v5/sms \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"sender": "0404123123",
"to": "0412333555",
"message": "Hello World",
"test": false,
"unicode": false,
"schedule": 0
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/sms"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"sender": "0404123123",
"to": "0412333555",
"message": "Hello World",
"test": false,
"unicode": false,
"schedule": 0
}''')
response = requests.request("POST", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"sender": "0404123123",
"to": "0412333555",
"message": "Hello World",
"test": false,
"unicode": false,
"schedule": 0
});
const req = https.request("https://www.5centsms.com.au/api/v5/sms", {
method: "POST",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/sms");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"sender": "0404123123",
"to": "0412333555",
"message": "Hello World",
"test": false,
"unicode": false,
"schedule": 0
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"sender": "0404123123",
"to": "0412333555",
"message": "Hello World",
"test": false,
"unicode": false,
"schedule": 0
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/sms"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://www.5centsms.com.au/api/v5/sms");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}"",
""sender"": ""0404123123"",
""to"": ""0412333555"",
""message"": ""Hello World"",
""test"": false,
""unicode"": false,
""schedule"": 0
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"sender": "0404123123",
"to": "0412333555",
"message": "Hello World",
"test": false,
"unicode": false,
"schedule": 0
}`)
req, _ := http.NewRequest("POST", "https://www.5centsms.com.au/api/v5/sms", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/sms")
request = Net::HTTP::Post.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"sender": "0404123123",
"to": "0412333555",
"message": "Hello World",
"test": false,
"unicode": false,
"schedule": 0
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"messages": [
{
"destination": "0412333555",
"id": "683554c596937cc4b90f5cf7",
"status": 1011,
"status_text": "Sending...",
"credits": 1
}
]
}{
"error": "Failed (Invalid Sender ID)"
}{
"error": "Failed (Invalid API ID or Key)"
}GET List Sent SMS
GET https://www.5centsms.com.au/api/v5/sms
Include key-id and key-secret in the JSON body of every request.
List your sent messages, newest first (20 per page).
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
messages |
array | Sent messages this page. |
messages[].destination |
string | Recipient number. |
messages[].id |
string | Message id. |
messages[].status |
integer | Status code (see Introduction). |
messages[].status_text |
string | Human-readable status. |
messages[].message_text |
string | Message content. |
messages[].credits |
number | Credits charged. |
messages[].send_timestamp |
integer | Epoch seconds when sent. |
messages[].delivery_timestamp |
integer | Epoch seconds when delivery confirmed. |
messages[].delivery_network |
string | Delivering network, when known. |
next_page |
string | Relative path for the next page. |
count |
integer | Messages on this page. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Failed (Invalid Page) |
400 | after is not a valid 24-hex cursor. |
Notes
- See Pagination in the Introduction for the
aftercursor convention.
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Query parameters
| Parameter | Example | Description |
|---|---|---|
after | 24-hex cursor — the `id` of the last message on the previous page. |
curl -X GET https://www.5centsms.com.au/api/v5/sms \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/sms"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/sms", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/sms");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/sms"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/sms");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/sms", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/sms")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"messages": [
{
"destination": "0412333555",
"id": "683554c596937cc4b90f5cf7",
"status": 1002,
"status_text": "Sent (Delivery Confirmed)",
"message_text": "Hello World",
"credits": 1,
"send_timestamp": 1717000000,
"delivery_timestamp": 1717000020,
"delivery_network": "Telstra"
}
],
"next_page": "/api/v5/sms?after=683554c596937cc4b90f5cf7",
"count": 1
}{
"error": "Failed (Invalid API ID or Key)"
}GET Get SMS Status
GET https://www.5centsms.com.au/api/v5/sms/:id
Include key-id and key-secret in the JSON body of every request.
Fetch the current status and details of a single sent message.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
message |
object | The message (same fields as List Sent SMS). |
Errors
| Error | HTTP | Cause |
|---|---|---|
Failed (Unauthorised) |
400 | Message not found, or not owned by this account. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Path variables
| Variable | Example | Description |
|---|---|---|
id | Message id. |
curl -X GET https://www.5centsms.com.au/api/v5/sms/:id \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/sms/:id"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/sms/:id", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/sms/:id");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/sms/:id"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/sms/:id");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/sms/:id", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/sms/:id")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"message": {
"destination": "0412333555",
"id": "683554c596937cc4b90f5cf7",
"status": 1002,
"status_text": "Sent (Delivery Confirmed)",
"message_text": "Hello World",
"credits": 1,
"send_timestamp": 1717000000,
"delivery_timestamp": 1717000020,
"delivery_network": "Telstra"
}
}{
"error": "Failed (Invalid API ID or Key)"
}DELETE Cancel / Delete SMS
DELETE https://www.5centsms.com.au/api/v5/sms/:id
Include key-id and key-secret in the JSON body of every request.
Cancel a still-scheduled message (status 1005), or delete a sent message's record.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Failed (Unauthorised) |
400 | Message not found, or not owned by this account. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Path variables
| Variable | Example | Description |
|---|---|---|
id | Message id. |
curl -X DELETE https://www.5centsms.com.au/api/v5/sms/:id \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/sms/:id"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("DELETE", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/sms/:id", {
method: "DELETE",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/sms/:id");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/sms/:id"))
.header("Content-Type", "application/json")
.method("DELETE", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://www.5centsms.com.au/api/v5/sms/:id");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("DELETE", "https://www.5centsms.com.au/api/v5/sms/:id", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/sms/:id")
request = Net::HTTP::Delete.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": ""
}{
"error": "Failed (Invalid API ID or Key)"
}GET List Inbound Messages
GET https://www.5centsms.com.au/api/v5/inbox
Include key-id and key-secret in the JSON body of every request.
List inbound (received) messages, newest first (50 per page).
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
messages |
array | Inbound messages this page. |
messages[].id |
string | Inbound message id. |
messages[].to |
string | Your number that received it. |
messages[].from |
string | Sender number. |
messages[].message |
string | Message content. |
messages[].date |
integer | Epoch seconds received. |
messages[].contact_name |
string | Matched contact name, when known. |
next_page |
string | Relative path for the next page. |
count |
integer | Messages on this page. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Failed (Invalid Page) |
400 | after is not a valid 24-hex cursor. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Query parameters
| Parameter | Example | Description |
|---|---|---|
after | 24-hex cursor — the `id` of the last message on the previous page. |
curl -X GET https://www.5centsms.com.au/api/v5/inbox \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/inbox"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/inbox", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/inbox");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/inbox"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/inbox");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/inbox", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/inbox")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"messages": [
{
"id": "683554c596937cc4b90f5cf7",
"to": "0400000000",
"from": "0412333555",
"message": "STOP",
"date": 1717000000,
"contact_name": "Jane"
}
],
"next_page": "/api/v5/inbox?after=683554c596937cc4b90f5cf7",
"count": 1
}{
"error": "Failed (Invalid API ID or Key)"
}DELETE Delete Inbound Message
DELETE https://www.5centsms.com.au/api/v5/inbox/:id
Include key-id and key-secret in the JSON body of every request.
Delete a single inbound message record.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Failed (Unauthorised) |
400 | Message not found, or not owned by this account. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Path variables
| Variable | Example | Description |
|---|---|---|
id | Inbound message id. |
curl -X DELETE https://www.5centsms.com.au/api/v5/inbox/:id \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/inbox/:id"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("DELETE", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/inbox/:id", {
method: "DELETE",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/inbox/:id");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/inbox/:id"))
.header("Content-Type", "application/json")
.method("DELETE", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://www.5centsms.com.au/api/v5/inbox/:id");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("DELETE", "https://www.5centsms.com.au/api/v5/inbox/:id", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/inbox/:id")
request = Net::HTTP::Delete.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": ""
}{
"error": "Failed (Invalid API ID or Key)"
}GET List Opt-outs
GET https://www.5centsms.com.au/api/v5/optouts
Include key-id and key-secret in the JSON body of every request.
List numbers that have opted out, newest first (1000 per page).
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
numbers |
array | Opted-out numbers this page. |
numbers[].id |
string | Opt-out record id. |
numbers[].number |
string | Opted-out number. |
numbers[].timestamp |
integer | Epoch seconds of opt-out. |
count |
integer | Records on this page. |
next_page |
string | Relative path for the next page. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Failed (Invalid Page) |
400 | after is not a valid 24-hex cursor. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Query parameters
| Parameter | Example | Description |
|---|---|---|
after | 24-hex cursor — the `id` of the last record on the previous page. |
curl -X GET https://www.5centsms.com.au/api/v5/optouts \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/optouts"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/optouts", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/optouts");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/optouts"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/optouts");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/optouts", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/optouts")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"numbers": [
{
"id": "683554c596937cc4b90f5cf7",
"number": "0412333555",
"timestamp": 1717000000
}
],
"count": 1
}{
"error": "Failed (Invalid API ID or Key)"
}DELETE Delete Opt-out
DELETE https://www.5centsms.com.au/api/v5/optouts/:number
Include key-id and key-secret in the JSON body of every request.
Remove a number from your opt-out list.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
message |
string | Confirmation message. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Path variables
| Variable | Example | Description |
|---|---|---|
number | The opted-out number to remove. |
curl -X DELETE https://www.5centsms.com.au/api/v5/optouts/:number \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/optouts/:number"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("DELETE", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/optouts/:number", {
method: "DELETE",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/optouts/:number");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/optouts/:number"))
.header("Content-Type", "application/json")
.method("DELETE", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://www.5centsms.com.au/api/v5/optouts/:number");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("DELETE", "https://www.5centsms.com.au/api/v5/optouts/:number", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/optouts/:number")
request = Net::HTTP::Delete.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"message": "Number removed."
}{
"error": "Failed (Invalid API ID or Key)"
}GET List Conversations
GET https://www.5centsms.com.au/api/v5/conversations?per_page=50
Include key-id and key-secret in the JSON body of every request.
List the account's two-way SMS conversations, newest activity first, cursor-paginated. Requires Conversations (threads) enabled and at least one virtual mobile number (VMN).
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
conversations |
array | One entry per conversation, newest activity first. |
conversations[].id |
string | Conversation id. |
conversations[].remote_number |
string | Contact number, normalised to 61 international form. |
conversations[].contact_name |
string | Matched contact name, or empty. |
conversations[].last_message_at |
integer | Epoch seconds of the latest message. |
conversations[].unread |
boolean | Unread flag. |
conversations[].has_inbound |
boolean | True once the contact has replied. |
conversations[].last_local_number |
string | The VMN this thread is on. |
conversations[].created_at |
integer | Epoch seconds the conversation began. |
next_cursor |
string or null | Pass as before for the next page; null on the last page. |
count |
integer | Conversations on this page. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Conversations are not enabled for this account. Enable Conversations in your 5cSMS dashboard settings, or contact support to turn on two-way messaging. |
400 | Account lacks the ENABLE_THREADS flag. Response also carries error_code: "threads_disabled". |
Conversations require a dedicated virtual mobile number (VMN). Add a VMN in your 5cSMS dashboard under Virtual Numbers, then inbound replies will thread automatically. |
400 | Threads on but the account has no VMN. Response also carries error_code: "no_vmn". |
Failed (Method Not Supported) |
400 | A POST or DELETE was sent to any /conversations route. The endpoint is read-only. |
Notes
- Gate failures return an extra
error_codefield (threads_disabledorno_vmn) so an integrator can branch programmatically. - Follow
next_cursor(passed back as thebeforeparameter) until it is null. qmatches digits in the remote number;replies=1andunread=1are independent filters.- To send, use
POST /api/v5/sms. Replies thread into the conversation automatically.
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Query parameters
| Parameter | Example | Description |
|---|---|---|
before | Cursor from a previous response's next_cursor. Omit for the first page. | |
per_page | 50 | Page size, max 200. Default 50. |
q | Digit search on the contact number. | |
replies | 1 | Set to 1 to return only conversations that have an inbound reply. |
unread | 1 | Set to 1 to return only unread conversations. |
curl -X GET https://www.5centsms.com.au/api/v5/conversations?per_page=50 \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/conversations?per_page=50"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/conversations?per_page=50", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/conversations?per_page=50");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/conversations?per_page=50"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/conversations?per_page=50");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/conversations?per_page=50", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/conversations?per_page=50")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"conversations": [
{
"id": "66b0a1c2d3e4f5a6b7c8d9e0",
"remote_number": "61412345678",
"contact_name": "Jane Smith",
"last_message_at": 1749600120,
"unread": true,
"has_inbound": true,
"last_local_number": "61480000000",
"created_at": 1749000000
}
],
"next_cursor": "1749600120_66b0a1c2d3e4f5a6b7c8d9e0",
"count": 1
}{
"error": "Conversations are not enabled for this account. Enable Conversations in your 5cSMS dashboard settings, or contact support to turn on two-way messaging.",
"error_code": "threads_disabled"
}{
"error": "Failed (Invalid API ID or Key)"
}GET Resolve Conversation by Number
GET https://www.5centsms.com.au/api/v5/conversations?number=0412345678
Include key-id and key-secret in the JSON body of every request.
Resolve a single conversation by the remote phone number. The number is normalised to 61 international form, so 04..., +61..., and 61... inputs all resolve.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
conversation |
object or null | The matching conversation summary (same fields as a List entry, plus contact_name), or null when the number has no thread. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Conversations are not enabled for this account. Enable Conversations in your 5cSMS dashboard settings, or contact support to turn on two-way messaging. |
400 | Account lacks the ENABLE_THREADS flag. Response also carries error_code: "threads_disabled". |
Conversations require a dedicated virtual mobile number (VMN). Add a VMN in your 5cSMS dashboard under Virtual Numbers, then inbound replies will thread automatically. |
400 | Threads on but the account has no VMN. Response also carries error_code: "no_vmn". |
Notes
- A number with no conversation returns
{"error": "", "conversation": null}. This is a success, not an error. - Gate failures return an extra
error_codefield (threads_disabledorno_vmn).
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Query parameters
| Parameter | Example | Description |
|---|---|---|
number | 0412345678 | Required. Recipient MSISDN in 04..., +61..., or 61... form; normalised to 61 international form. |
curl -X GET https://www.5centsms.com.au/api/v5/conversations?number=0412345678 \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/conversations?number=0412345678"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/conversations?number=0412345678", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/conversations?number=0412345678");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/conversations?number=0412345678"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/conversations?number=0412345678");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/conversations?number=0412345678", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/conversations?number=0412345678")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"conversation": {
"id": "66b0a1c2d3e4f5a6b7c8d9e0",
"remote_number": "61412345678",
"contact_name": "Jane Smith",
"last_message_at": 1749600120,
"unread": true,
"has_inbound": true,
"last_local_number": "61480000000",
"created_at": 1749000000
}
}{
"error": "",
"conversation": null
}{
"error": "Failed (Invalid API ID or Key)"
}GET Get Conversation Messages
GET https://www.5centsms.com.au/api/v5/conversations/:id
Include key-id and key-secret in the JSON body of every request.
Fetch the conversation summary plus the most recent page of messages (oldest to newest within the page). Opening a conversation marks it read.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
conversation |
object | Conversation summary, including contact_name. |
messages |
array | Messages, oldest to newest within the page. |
messages[].id |
string | Message id. |
messages[].message |
string | Message text. |
messages[].timestamp |
integer | Epoch seconds. |
messages[].type |
string | MT (sent) or MO (received). |
messages[].status |
integer or null | Delivery status code (MT only). See the message status table in the Introduction. |
messages[].status_text |
string | Human-readable status, e.g. "Delivered" (MT only). |
messages[].scheduled |
boolean | Present and true when the message is scheduled (MT only). |
messages[].cancelled |
boolean | Present and true when the message was cancelled (MT only). |
messages[].cancellable |
boolean | Present and true when the message can still be cancelled (MT only). |
messages[].images |
array | Image URLs (MMS only). |
has_more |
boolean | True when older messages remain (page back with action=older). |
oldest_mo_ts |
integer | Oldest received-message watermark on this page (use as before_mo). |
oldest_mt_ts |
integer | Oldest sent-message watermark on this page (use as before_mt). |
newest_mo_ts |
integer | Newest received-message watermark (use as since_mo when polling). |
newest_mt_ts |
integer | Newest sent-message watermark (use as since_mt when polling). |
Errors
| Error | HTTP | Cause |
|---|---|---|
Conversations are not enabled for this account. Enable Conversations in your 5cSMS dashboard settings, or contact support to turn on two-way messaging. |
400 | Account lacks the ENABLE_THREADS flag. Response also carries error_code: "threads_disabled". |
Conversations require a dedicated virtual mobile number (VMN). Add a VMN in your 5cSMS dashboard under Virtual Numbers, then inbound replies will thread automatically. |
400 | Threads on but the account has no VMN. Response also carries error_code: "no_vmn". |
Failed (Conversation Not Found) |
400 | The id was not found or is not owned by this account. |
Notes
- Side effect: opening a conversation marks it read (
unreadbecomes false). - Page back through history with the Page Older Messages request, and fetch new messages with the Poll Conversation request.
- To send a reply, use
POST /api/v5/sms. Replies thread into the conversation automatically.
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Query parameters
| Parameter | Example | Description |
|---|---|---|
limit | 50 | Page size, 1 to 100. Default 50. |
Path variables
| Variable | Example | Description |
|---|---|---|
id | 66b0a1c2d3e4f5a6b7c8d9e0 | Conversation id. |
curl -X GET https://www.5centsms.com.au/api/v5/conversations/:id \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/conversations/:id"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/conversations/:id", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/conversations/:id");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/conversations/:id"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/conversations/:id");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/conversations/:id", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/conversations/:id")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"conversation": {
"id": "66b0a1c2d3e4f5a6b7c8d9e0",
"remote_number": "61412345678",
"contact_name": "Jane Smith",
"last_message_at": 1749600120,
"unread": false,
"has_inbound": true,
"last_local_number": "61480000000",
"created_at": 1749000000
},
"messages": [
{
"id": "66a0a1c2d3e4f5a6b7c8d9e0",
"message": "Your booking is confirmed",
"timestamp": 1749600060,
"type": "MT",
"status": 1002,
"status_text": "Sent (Delivery Confirmed)"
},
{
"id": "66a1a1c2d3e4f5a6b7c8d9e0",
"message": "Yes please",
"timestamp": 1749600120,
"type": "MO"
}
],
"has_more": false,
"oldest_mo_ts": 1749600120,
"oldest_mt_ts": 1749600060,
"newest_mo_ts": 1749600120,
"newest_mt_ts": 1749600060
}{
"error": "Failed (Conversation Not Found)"
}{
"error": "Failed (Invalid API ID or Key)"
}GET Poll Conversation
GET https://www.5centsms.com.au/api/v5/conversations/:id?action=poll&since_mo=1749600120&since_mt=1749600060
Include key-id and key-secret in the JSON body of every request.
Return only messages newer than the supplied watermarks. Use the newest_mo_ts and newest_mt_ts from the initial load (or the previous poll) as since_mo and since_mt. A poll that returns new messages marks the conversation read.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
messages |
array | Only messages newer than the watermarks (same message shape as Get Conversation Messages). |
now |
integer | Server epoch seconds, for poll cadence. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Conversations are not enabled for this account. Enable Conversations in your 5cSMS dashboard settings, or contact support to turn on two-way messaging. |
400 | Account lacks the ENABLE_THREADS flag. Response also carries error_code: "threads_disabled". |
Conversations require a dedicated virtual mobile number (VMN). Add a VMN in your 5cSMS dashboard under Virtual Numbers, then inbound replies will thread automatically. |
400 | Threads on but the account has no VMN. Response also carries error_code: "no_vmn". |
Failed (Conversation Not Found) |
400 | The id was not found or is not owned by this account. |
Failed (Invalid Watermark) |
400 | since_mo or since_mt is missing or not a digit string. |
Notes
- Side effect: a poll that returns one or more new messages marks the conversation read.
since_moandsince_mtmust be integer epoch-second values.
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Query parameters
| Parameter | Example | Description |
|---|---|---|
action | poll | Required. Set to poll. |
since_mo | 1749600120 | Required. Received-message watermark (epoch seconds); use the prior response's newest_mo_ts. |
since_mt | 1749600060 | Required. Sent-message watermark (epoch seconds); use the prior response's newest_mt_ts. |
Path variables
| Variable | Example | Description |
|---|---|---|
id | 66b0a1c2d3e4f5a6b7c8d9e0 | Conversation id. |
curl -X GET https://www.5centsms.com.au/api/v5/conversations/:id?action=poll&since_mo=1749600120&since_mt=1749600060 \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/conversations/:id?action=poll&since_mo=1749600120&since_mt=1749600060"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/conversations/:id?action=poll&since_mo=1749600120&since_mt=1749600060", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/conversations/:id?action=poll&since_mo=1749600120&since_mt=1749600060");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/conversations/:id?action=poll&since_mo=1749600120&since_mt=1749600060"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/conversations/:id?action=poll&since_mo=1749600120&since_mt=1749600060");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/conversations/:id?action=poll&since_mo=1749600120&since_mt=1749600060", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/conversations/:id?action=poll&since_mo=1749600120&since_mt=1749600060")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"messages": [
{
"id": "66a2a1c2d3e4f5a6b7c8d9e0",
"message": "On my way",
"timestamp": 1749600300,
"type": "MO"
}
],
"now": 1749600305
}{
"error": "Failed (Invalid API ID or Key)"
}GET Page Older Messages
GET https://www.5centsms.com.au/api/v5/conversations/:id?action=older&before_mo=1749600120&before_mt=1749600060
Include key-id and key-secret in the JSON body of every request.
Page back through history older than the supplied cursors. Use the oldest_mo_ts and oldest_mt_ts from the previous page as before_mo and before_mt.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
messages |
array | The older page (same message shape as Get Conversation Messages). |
has_more |
boolean | True when still-older messages remain. |
oldest_mo_ts |
integer | Oldest received-message watermark on this page (use as the next before_mo). |
oldest_mt_ts |
integer | Oldest sent-message watermark on this page (use as the next before_mt). |
Errors
| Error | HTTP | Cause |
|---|---|---|
Conversations are not enabled for this account. Enable Conversations in your 5cSMS dashboard settings, or contact support to turn on two-way messaging. |
400 | Account lacks the ENABLE_THREADS flag. Response also carries error_code: "threads_disabled". |
Conversations require a dedicated virtual mobile number (VMN). Add a VMN in your 5cSMS dashboard under Virtual Numbers, then inbound replies will thread automatically. |
400 | Threads on but the account has no VMN. Response also carries error_code: "no_vmn". |
Failed (Conversation Not Found) |
400 | The id was not found or is not owned by this account. |
Failed (Invalid Watermark) |
400 | before_mo or before_mt is missing or not a digit string. |
Notes
- This request does not mark the conversation read (unlike the initial load and a poll that returns new messages).
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Query parameters
| Parameter | Example | Description |
|---|---|---|
action | older | Required. Set to older. |
before_mo | 1749600120 | Required. Use the prior response's oldest_mo_ts. |
before_mt | 1749600060 | Required. Use the prior response's oldest_mt_ts. |
limit | 50 | Page size, 1 to 100. Default 50. |
Path variables
| Variable | Example | Description |
|---|---|---|
id | 66b0a1c2d3e4f5a6b7c8d9e0 | Conversation id. |
curl -X GET https://www.5centsms.com.au/api/v5/conversations/:id?action=older&before_mo=1749600120&before_mt=1749600060 \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/conversations/:id?action=older&before_mo=1749600120&before_mt=1749600060"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/conversations/:id?action=older&before_mo=1749600120&before_mt=1749600060", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/conversations/:id?action=older&before_mo=1749600120&before_mt=1749600060");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/conversations/:id?action=older&before_mo=1749600120&before_mt=1749600060"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/conversations/:id?action=older&before_mo=1749600120&before_mt=1749600060");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/conversations/:id?action=older&before_mo=1749600120&before_mt=1749600060", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/conversations/:id?action=older&before_mo=1749600120&before_mt=1749600060")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"messages": [
{
"id": "669f0a1c2d3e4f5a6b7c8d90",
"message": "Earlier message",
"timestamp": 1749500050,
"type": "MO"
}
],
"has_more": true,
"oldest_mo_ts": 1749500050,
"oldest_mt_ts": 1749500000
}{
"error": "Failed (Invalid API ID or Key)"
}POST Send Email
POST https://api.dingomail.com.au/api/v5/email
Include key-id and key-secret in the JSON body of every request.
Send a transactional email. The sender must be on a registered, validated domain (see Email Domains).
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
SenderEmail |
string | Yes | From address. Must be on a registered, validated domain. |
Subject |
string | Yes | Email subject. |
Text |
string | Yes | Plain-text body. |
Html |
string | No | HTML body. Defaults to Text if omitted. |
SenderName |
string | No | Display name for the From address. |
Recipient |
string or array | Conditional | To recipient(s). At least one of Recipient / CC / BCC is required; combined max 50. |
CC |
string or array | Conditional | CC recipient(s). |
BCC |
string or array | Conditional | BCC recipient(s). |
ReplyTo |
string | No | Reply-To address. |
Attachments |
array | No | Array of {url, filename?}. Requires the DINGO_ATTACHMENT account flag; max 5. |
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
messages |
array | One entry per send. |
messages[].Id |
string | Email id. |
messages[].Status |
string | Email status. |
messages[].Recipients |
object | {To, CC, TotalCount} — BCC omitted for privacy. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Email not enabled. Please contact us. |
400 | Email is not enabled on this account. |
Required parameter: {field} missing |
400 | A required field (SenderEmail / Subject / Text) is missing. |
Required parameter: At least one of Recipient, CC, or BCC must be provided |
400 | No recipient supplied. |
Too many recipients. Maximum 50 allowed, got {n}. |
400 | Combined recipients exceed 50. |
Invalid email addresses: {list} |
400 | One or more recipient addresses are malformed. |
Invalid Sender Email |
400 | SenderEmail is malformed. |
Invalid Sender Domain |
400 | Sender domain is not registered/validated on this account. |
Attachments not enabled for this account |
403 | Attachments require the DINGO_ATTACHMENT flag. |
Maximum {n} attachments allowed |
400 | Too many attachments (max 5). |
Each attachment must have a url field |
400 | An attachment entry is missing url. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X POST https://api.dingomail.com.au/api/v5/email \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"SenderEmail": "news@mail.example.com",
"SenderName": "Example",
"Subject": "Welcome",
"Text": "Hello there",
"Html": "<p>Hello there</p>",
"Recipient": "jane@example.com",
"ReplyTo": "support@example.com"
}'import requests
import json
url = "https://api.dingomail.com.au/api/v5/email"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"SenderEmail": "news@mail.example.com",
"SenderName": "Example",
"Subject": "Welcome",
"Text": "Hello there",
"Html": "<p>Hello there</p>",
"Recipient": "jane@example.com",
"ReplyTo": "support@example.com"
}''')
response = requests.request("POST", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"SenderEmail": "news@mail.example.com",
"SenderName": "Example",
"Subject": "Welcome",
"Text": "Hello there",
"Html": "<p>Hello there</p>",
"Recipient": "jane@example.com",
"ReplyTo": "support@example.com"
});
const req = https.request("https://api.dingomail.com.au/api/v5/email", {
method: "POST",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://api.dingomail.com.au/api/v5/email");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"SenderEmail": "news@mail.example.com",
"SenderName": "Example",
"Subject": "Welcome",
"Text": "Hello there",
"Html": "<p>Hello there</p>",
"Recipient": "jane@example.com",
"ReplyTo": "support@example.com"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"SenderEmail": "news@mail.example.com",
"SenderName": "Example",
"Subject": "Welcome",
"Text": "Hello there",
"Html": "<p>Hello there</p>",
"Recipient": "jane@example.com",
"ReplyTo": "support@example.com"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dingomail.com.au/api/v5/email"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.dingomail.com.au/api/v5/email");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}"",
""SenderEmail"": ""news@mail.example.com"",
""SenderName"": ""Example"",
""Subject"": ""Welcome"",
""Text"": ""Hello there"",
""Html"": ""<p>Hello there</p>"",
""Recipient"": ""jane@example.com"",
""ReplyTo"": ""support@example.com""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"SenderEmail": "news@mail.example.com",
"SenderName": "Example",
"Subject": "Welcome",
"Text": "Hello there",
"Html": "<p>Hello there</p>",
"Recipient": "jane@example.com",
"ReplyTo": "support@example.com"
}`)
req, _ := http.NewRequest("POST", "https://api.dingomail.com.au/api/v5/email", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://api.dingomail.com.au/api/v5/email")
request = Net::HTTP::Post.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"SenderEmail": "news@mail.example.com",
"SenderName": "Example",
"Subject": "Welcome",
"Text": "Hello there",
"Html": "<p>Hello there</p>",
"Recipient": "jane@example.com",
"ReplyTo": "support@example.com"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"messages": [
{
"Id": "683554c596937cc4b90f5cf7",
"Status": "queued",
"Recipients": {
"To": [
"jane@example.com"
],
"CC": [],
"TotalCount": 1
}
}
]
}{
"error": "Invalid Sender Domain"
}{
"error": "Failed (Invalid API ID or Key)"
}GET List Emails
GET https://api.dingomail.com.au/api/v5/email
Include key-id and key-secret in the JSON body of every request.
List sent emails, newest first.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
emails |
array | Emails this page. |
emails[].id |
string | Email id. |
emails[].status |
string | Email status. |
emails[].from |
string | From address. |
emails[].sender_name |
string | From display name. |
emails[].to |
array | To recipients. |
emails[].cc |
array | CC recipients. |
emails[].subject |
string | Subject. |
emails[].created_at |
integer | Epoch seconds created. |
emails[].method |
string | Send method. |
count |
integer | Emails on this page. |
next_page |
string | Relative path for the next page — present only when count >= limit. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Invalid after parameter |
400 | after is not a valid 24-hex cursor. |
Invalid limit parameter |
400 | limit is outside 1–100. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Query parameters
| Parameter | Example | Description |
|---|---|---|
after | 24-hex cursor — the `id` of the last email on the previous page. | |
limit | 20 | Page size, 1–100. Default 20. |
curl -X GET https://api.dingomail.com.au/api/v5/email \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://api.dingomail.com.au/api/v5/email"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://api.dingomail.com.au/api/v5/email", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://api.dingomail.com.au/api/v5/email");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dingomail.com.au/api/v5/email"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.dingomail.com.au/api/v5/email");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://api.dingomail.com.au/api/v5/email", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://api.dingomail.com.au/api/v5/email")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"emails": [
{
"id": "683554c596937cc4b90f5cf7",
"status": "sent",
"from": "news@mail.example.com",
"sender_name": "Example",
"to": [
"jane@example.com"
],
"cc": [],
"subject": "Welcome",
"created_at": 1717000000,
"method": "api"
}
],
"count": 1
}{
"error": "Failed (Invalid API ID or Key)"
}GET Get Email
GET https://api.dingomail.com.au/api/v5/email/:id
Include key-id and key-secret in the JSON body of every request.
Fetch a single email, including its full text and HTML bodies.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
email |
object | id, status, from, sender_name, to, cc, subject, text, html, reply_to, created_at, method. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Invalid email ID |
400 | id is not a valid 24-hex id. |
Email not found |
400 | No such email, or not owned by this account. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Path variables
| Variable | Example | Description |
|---|---|---|
id | Email id. |
curl -X GET https://api.dingomail.com.au/api/v5/email/:id \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://api.dingomail.com.au/api/v5/email/:id"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://api.dingomail.com.au/api/v5/email/:id", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://api.dingomail.com.au/api/v5/email/:id");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dingomail.com.au/api/v5/email/:id"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.dingomail.com.au/api/v5/email/:id");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://api.dingomail.com.au/api/v5/email/:id", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://api.dingomail.com.au/api/v5/email/:id")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"email": {
"id": "683554c596937cc4b90f5cf7",
"status": "sent",
"from": "news@mail.example.com",
"sender_name": "Example",
"to": [
"jane@example.com"
],
"cc": [],
"subject": "Welcome",
"text": "Hello there",
"html": "<p>Hello there</p>",
"reply_to": "support@example.com",
"created_at": 1717000000,
"method": "api"
}
}{
"error": "Failed (Invalid API ID or Key)"
}GET Get Balance
GET https://www.5centsms.com.au/api/v5/balance
Include key-id and key-secret in the JSON body of every request.
Get your account's credit balance and billing mode.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
balance |
object | Balance details. |
balance.postpaid |
boolean | True if the account is postpaid. |
balance.credits |
number | Available credits. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X GET https://www.5centsms.com.au/api/v5/balance \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/balance"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/balance", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/balance");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/balance"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/balance");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/balance", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/balance")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"balance": {
"postpaid": false,
"credits": 1234.5
}
}{
"error": "Failed (Invalid API ID or Key)"
}POST Pre-warm Send Queue
POST https://www.5centsms.com.au/api/v5/prewarm
Include key-id and key-secret in the JSON body of every request.
Pre-warm the send queue ahead of a large campaign. Requires the QUEUE_PREWARM account flag; usable once per 60 minutes.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
message |
string | Confirmation message. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Account does not have queue pre-warming enabled |
400 | QUEUE_PREWARM flag not set on the account. |
Queue was already pre-warmed recently. Please wait {n} minutes before trying again. |
400 | Pre-warmed within the last 60 minutes. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X POST https://www.5centsms.com.au/api/v5/prewarm \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/prewarm"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("POST", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/prewarm", {
method: "POST",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/prewarm");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/prewarm"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://www.5centsms.com.au/api/v5/prewarm");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("POST", "https://www.5centsms.com.au/api/v5/prewarm", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/prewarm")
request = Net::HTTP::Post.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"message": "Queue pre-warming initiated."
}{
"error": "Account does not have queue pre-warming enabled"
}{
"error": "Failed (Invalid API ID or Key)"
}POST Create Login
POST https://www.5centsms.com.au/api/v5/logins
Include key-id and key-secret in the JSON body of every request.
Create (or re-invite) a sub-login on your account.
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Login's display name. |
email |
string | Yes | Login's email address. |
role |
string | No | One of admin, manager, sender, reporting. Default admin. |
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
login_id |
string | The login's id. |
is_new |
boolean | True if a new login was created. |
message |
string | Confirmation message. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Missing required field: name |
400 | name not supplied. |
Missing required field: email |
400 | email not supplied. |
Invalid email address |
400 | email is malformed. |
Invalid role. Must be one of: admin, manager, sender, reporting |
400 | role is not an allowed value. |
Login already exists on this account |
400 | A login with that email already exists here. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X POST https://www.5centsms.com.au/api/v5/logins \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"name": "Jane Smith",
"email": "jane@example.com",
"role": "admin"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/logins"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"name": "Jane Smith",
"email": "jane@example.com",
"role": "admin"
}''')
response = requests.request("POST", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"name": "Jane Smith",
"email": "jane@example.com",
"role": "admin"
});
const req = https.request("https://www.5centsms.com.au/api/v5/logins", {
method: "POST",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/logins");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"name": "Jane Smith",
"email": "jane@example.com",
"role": "admin"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"name": "Jane Smith",
"email": "jane@example.com",
"role": "admin"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/logins"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://www.5centsms.com.au/api/v5/logins");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}"",
""name"": ""Jane Smith"",
""email"": ""jane@example.com"",
""role"": ""admin""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"name": "Jane Smith",
"email": "jane@example.com",
"role": "admin"
}`)
req, _ := http.NewRequest("POST", "https://www.5centsms.com.au/api/v5/logins", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/logins")
request = Net::HTTP::Post.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"name": "Jane Smith",
"email": "jane@example.com",
"role": "admin"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"login_id": "683554c596937cc4b90f5cf7",
"is_new": true,
"message": "Login created"
}{
"error": "Invalid role. Must be one of: admin, manager, sender, reporting"
}{
"error": "Failed (Invalid API ID or Key)"
}GET List Logins
GET https://www.5centsms.com.au/api/v5/logins
Include key-id and key-secret in the JSON body of every request.
List all logins on your account.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
logins |
array | Logins on the account. |
logins[].login_id |
string | Login id. |
logins[].name |
string | Display name. |
logins[].email |
string | Email address. |
logins[].role |
string | Role. |
count |
integer | Number of logins. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X GET https://www.5centsms.com.au/api/v5/logins \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/logins"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/logins", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/logins");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/logins"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/logins");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/logins", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/logins")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"logins": [
{
"login_id": "683554c596937cc4b90f5cf7",
"name": "Jane Smith",
"email": "jane@example.com",
"role": "admin"
}
],
"count": 1
}{
"error": "Failed (Invalid API ID or Key)"
}POST Change Login Role
POST https://www.5centsms.com.au/api/v5/logins/:login_id
Include key-id and key-secret in the JSON body of every request.
Change a login's role.
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
action |
string | Yes | Must be change_role. |
role |
string | Yes | One of admin, manager, sender, reporting. |
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
login_id |
string | The login's id. |
role |
string | The new role. |
message |
string | Confirmation message. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Invalid login_id format |
400 | login_id is not a valid id. |
Missing required field: role |
400 | role not supplied. |
Invalid role. Must be one of: admin, manager, sender, reporting |
400 | role is not an allowed value. |
Login not found on this account |
400 | No such login on this account. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Path variables
| Variable | Example | Description |
|---|---|---|
login_id | Login id. |
curl -X POST https://www.5centsms.com.au/api/v5/logins/:login_id \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"action": "change_role",
"role": "manager"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/logins/:login_id"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"action": "change_role",
"role": "manager"
}''')
response = requests.request("POST", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"action": "change_role",
"role": "manager"
});
const req = https.request("https://www.5centsms.com.au/api/v5/logins/:login_id", {
method: "POST",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/logins/:login_id");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"action": "change_role",
"role": "manager"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"action": "change_role",
"role": "manager"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/logins/:login_id"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://www.5centsms.com.au/api/v5/logins/:login_id");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}"",
""action"": ""change_role"",
""role"": ""manager""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"action": "change_role",
"role": "manager"
}`)
req, _ := http.NewRequest("POST", "https://www.5centsms.com.au/api/v5/logins/:login_id", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/logins/:login_id")
request = Net::HTTP::Post.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"action": "change_role",
"role": "manager"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"login_id": "683554c596937cc4b90f5cf7",
"role": "manager",
"message": "Role updated"
}{
"error": "Failed (Invalid API ID or Key)"
}DELETE Delete Login
DELETE https://www.5centsms.com.au/api/v5/logins/:login_id
Include key-id and key-secret in the JSON body of every request.
Remove a login from your account.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
login_id |
string | The removed login's id. |
message |
string | Confirmation message. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Invalid login_id format |
400 | login_id is not a valid id. |
Login not found on this account |
400 | No such login on this account. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Path variables
| Variable | Example | Description |
|---|---|---|
login_id | Login id. |
curl -X DELETE https://www.5centsms.com.au/api/v5/logins/:login_id \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/logins/:login_id"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("DELETE", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/logins/:login_id", {
method: "DELETE",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/logins/:login_id");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/logins/:login_id"))
.header("Content-Type", "application/json")
.method("DELETE", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://www.5centsms.com.au/api/v5/logins/:login_id");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("DELETE", "https://www.5centsms.com.au/api/v5/logins/:login_id", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/logins/:login_id")
request = Net::HTTP::Delete.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"login_id": "683554c596937cc4b90f5cf7",
"message": "Login removed from account"
}{
"error": "Failed (Invalid API ID or Key)"
}GET List Sender IDs
GET https://www.5centsms.com.au/api/v5/senderid
Include key-id and key-secret in the JSON body of every request.
List the sender IDs registered on your account.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
senderids |
array | Registered sender IDs. |
senderids[].id |
string | Sender ID record id. |
senderids[].senderid |
string | The sender ID value. |
senderids[].status |
string | Approval status. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X GET https://www.5centsms.com.au/api/v5/senderid \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/senderid"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/senderid", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/senderid");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/senderid"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/senderid");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/senderid", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/senderid")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"senderids": [
{
"id": "683554c596937cc4b90f5cf7",
"senderid": "EXAMPLE",
"status": "approved"
}
]
}{
"error": "Failed (Invalid API ID or Key)"
}POST Create Sender ID
POST https://www.5centsms.com.au/api/v5/senderid
Include key-id and key-secret in the JSON body of every request.
Register a new sender ID for approval.
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
senderid |
string | Yes | The sender ID to register. |
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
message |
string | Confirmation message. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Missing Sender ID |
400 | senderid not supplied. |
Invalid new Sender ID |
400 | senderid is not valid. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X POST https://www.5centsms.com.au/api/v5/senderid \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"senderid": "EXAMPLE"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/senderid"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"senderid": "EXAMPLE"
}''')
response = requests.request("POST", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"senderid": "EXAMPLE"
});
const req = https.request("https://www.5centsms.com.au/api/v5/senderid", {
method: "POST",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/senderid");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"senderid": "EXAMPLE"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"senderid": "EXAMPLE"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/senderid"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://www.5centsms.com.au/api/v5/senderid");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}"",
""senderid"": ""EXAMPLE""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"senderid": "EXAMPLE"
}`)
req, _ := http.NewRequest("POST", "https://www.5centsms.com.au/api/v5/senderid", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/senderid")
request = Net::HTTP::Post.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"senderid": "EXAMPLE"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"message": "Sender ID created"
}{
"error": "Invalid new Sender ID"
}{
"error": "Failed (Invalid API ID or Key)"
}DELETE Delete Sender ID
DELETE https://www.5centsms.com.au/api/v5/senderid/:id
Include key-id and key-secret in the JSON body of every request.
Remove a sender ID from your account.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Path variables
| Variable | Example | Description |
|---|---|---|
id | Sender ID record id. |
curl -X DELETE https://www.5centsms.com.au/api/v5/senderid/:id \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/senderid/:id"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("DELETE", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/senderid/:id", {
method: "DELETE",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/senderid/:id");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/senderid/:id"))
.header("Content-Type", "application/json")
.method("DELETE", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://www.5centsms.com.au/api/v5/senderid/:id");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("DELETE", "https://www.5centsms.com.au/api/v5/senderid/:id", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/senderid/:id")
request = Net::HTTP::Delete.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": ""
}{
"error": "Failed (Invalid API ID or Key)"
}GET List Virtual Numbers
GET https://www.5centsms.com.au/api/v5/virtualnumber
Include key-id and key-secret in the JSON body of every request.
List the virtual numbers on your account.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
virtualnumbers |
array | Virtual numbers. |
virtualnumbers[].id |
string | Virtual number record id. |
virtualnumbers[].number |
string | Number in international format. |
virtualnumbers[].number_formatted |
string | Human-formatted number. |
virtualnumbers[].country |
string | Country code. |
virtualnumbers[].type |
string | standard or unified. |
count |
integer | Number of virtual numbers. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X GET https://www.5centsms.com.au/api/v5/virtualnumber \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/virtualnumber"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/virtualnumber", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/virtualnumber");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/virtualnumber"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://www.5centsms.com.au/api/v5/virtualnumber");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://www.5centsms.com.au/api/v5/virtualnumber", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/virtualnumber")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"virtualnumbers": [
{
"id": "683554c596937cc4b90f5cf7",
"number": "61400000000",
"number_formatted": "0400 000 000",
"country": "AU",
"type": "standard"
}
],
"count": 1
}{
"error": "Failed (Invalid API ID or Key)"
}POST Purchase Virtual Number
POST https://www.5centsms.com.au/api/v5/virtualnumber
Include key-id and key-secret in the JSON body of every request.
Purchase a virtual number. Charges the card on file and creates a monthly subscription. Default limit 2 numbers unless the MORE_VMNS flag is set.
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
country |
string | Yes | Only AU is supported for API purchases. |
type |
string | No | standard or unified. Default standard; unified requires the ENABLE_UNIFIED flag. |
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
message |
string | Confirmation message. |
virtualnumber |
object | {id, number, number_formatted, country}. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Missing required parameter: country |
400 | country not supplied. |
Invalid country. Currently only AU is supported for API requests. |
400 | country is not AU. |
Invalid type. Must be "standard" or "unified". |
400 | type is not an allowed value. |
Your account is not enabled for Unified Mobile Numbers. Please contact us. |
400 | type: unified without the ENABLE_UNIFIED flag. |
Your account is currently on hold. Please contact us to purchase a virtual number. |
400 | Account is on hold. |
Maximum virtual numbers reached. Contact us to request increaed quota. |
400 | Number limit reached (default 2). |
No payment method on file. Please add a payment method in the dashboard. |
400 | No card on file. |
Invalid subscription plan |
400 | Subscription plan could not be resolved. |
Your payment was declined by your bank. |
400 | Card charge declined. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X POST https://www.5centsms.com.au/api/v5/virtualnumber \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"country": "AU",
"type": "standard"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/virtualnumber"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"country": "AU",
"type": "standard"
}''')
response = requests.request("POST", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"country": "AU",
"type": "standard"
});
const req = https.request("https://www.5centsms.com.au/api/v5/virtualnumber", {
method: "POST",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/virtualnumber");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"country": "AU",
"type": "standard"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"country": "AU",
"type": "standard"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/virtualnumber"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://www.5centsms.com.au/api/v5/virtualnumber");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}"",
""country"": ""AU"",
""type"": ""standard""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"country": "AU",
"type": "standard"
}`)
req, _ := http.NewRequest("POST", "https://www.5centsms.com.au/api/v5/virtualnumber", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/virtualnumber")
request = Net::HTTP::Post.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"country": "AU",
"type": "standard"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"message": "Virtual number purchased",
"virtualnumber": {
"id": "683554c596937cc4b90f5cf7",
"number": "61400000000",
"number_formatted": "0400 000 000",
"country": "AU"
}
}{
"error": "Invalid country. Currently only AU is supported for API requests."
}{
"error": "Failed (Invalid API ID or Key)"
}DELETE Delete Virtual Number
DELETE https://www.5centsms.com.au/api/v5/virtualnumber/:id
Include key-id and key-secret in the JSON body of every request.
Release a virtual number and cancel its subscription.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
message |
string | Confirmation message. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Invalid virtual number ID format |
400 | id is not a valid id. |
Virtual number not found |
400 | No such virtual number. |
Unauthorized - you do not own this virtual number |
400 | Number not owned by this account. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Path variables
| Variable | Example | Description |
|---|---|---|
id | Virtual number record id. |
curl -X DELETE https://www.5centsms.com.au/api/v5/virtualnumber/:id \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://www.5centsms.com.au/api/v5/virtualnumber/:id"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("DELETE", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://www.5centsms.com.au/api/v5/virtualnumber/:id", {
method: "DELETE",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://www.5centsms.com.au/api/v5/virtualnumber/:id");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://www.5centsms.com.au/api/v5/virtualnumber/:id"))
.header("Content-Type", "application/json")
.method("DELETE", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://www.5centsms.com.au/api/v5/virtualnumber/:id");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("DELETE", "https://www.5centsms.com.au/api/v5/virtualnumber/:id", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://www.5centsms.com.au/api/v5/virtualnumber/:id")
request = Net::HTTP::Delete.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"message": "Virtual number released"
}{
"error": "Failed (Invalid API ID or Key)"
}GET List Domains
GET https://api.dingomail.com.au/api/v5/domain
Include key-id and key-secret in the JSON body of every request.
List the email domains registered on your account.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
domains |
array | Registered domains. |
domains[].id |
string | Domain record id. |
domains[].domain |
string | Domain name. |
domains[].subdomain |
string | Sending subdomain. |
domains[].status |
string | Verification status. |
domains[].dkim_names |
array | DKIM record names. |
domains[].verification |
string | SES verification state. |
count |
integer | Number of domains. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X GET https://api.dingomail.com.au/api/v5/domain \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://api.dingomail.com.au/api/v5/domain"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://api.dingomail.com.au/api/v5/domain", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://api.dingomail.com.au/api/v5/domain");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dingomail.com.au/api/v5/domain"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.dingomail.com.au/api/v5/domain");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://api.dingomail.com.au/api/v5/domain", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://api.dingomail.com.au/api/v5/domain")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"domains": [
{
"id": "683554c596937cc4b90f5cf7",
"domain": "example.com",
"subdomain": "email",
"status": "verified",
"dkim_names": [
"k1._domainkey"
],
"verification": "verified"
}
],
"count": 1
}{
"error": "Failed (Invalid API ID or Key)"
}GET Get Domain
GET https://api.dingomail.com.au/api/v5/domain/:id
Include key-id and key-secret in the JSON body of every request.
Fetch a single email domain, including its DKIM and verification details.
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
domain |
object | id, domain, subdomain, status, dkim_names, verification. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Failed (Domain not found or unauthorized) |
400 | No such domain, or not owned by this account. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
Path variables
| Variable | Example | Description |
|---|---|---|
id | Domain record id. |
curl -X GET https://api.dingomail.com.au/api/v5/domain/:id \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'import requests
import json
url = "https://api.dingomail.com.au/api/v5/domain/:id"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}''')
response = requests.request("GET", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
});
const req = https.request("https://api.dingomail.com.au/api/v5/domain/:id", {
method: "GET",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://api.dingomail.com.au/api/v5/domain/:id");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dingomail.com.au/api/v5/domain/:id"))
.header("Content-Type", "application/json")
.method("GET", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.dingomail.com.au/api/v5/domain/:id");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}`)
req, _ := http.NewRequest("GET", "https://api.dingomail.com.au/api/v5/domain/:id", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://api.dingomail.com.au/api/v5/domain/:id")
request = Net::HTTP::Get.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"domain": {
"id": "683554c596937cc4b90f5cf7",
"domain": "example.com",
"subdomain": "email",
"status": "verified",
"dkim_names": [
"k1._domainkey"
],
"verification": "verified"
}
}{
"error": "Failed (Invalid API ID or Key)"
}POST Create Domain
POST https://api.dingomail.com.au/api/v5/domain
Include key-id and key-secret in the JSON body of every request.
Register a new email domain. Email must be enabled and your plan's domain limit must not be exceeded.
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
domain |
string | Yes | Domain name (valid domain format). |
subdomain |
string | No | Sending subdomain; letters, numbers, hyphens. Default email. If a full host is supplied it is auto-corrected and a warning is returned. |
Response fields
| Field | Type | Description |
|---|---|---|
error |
string | Empty on success. |
message |
object | {id, domain}. |
warning |
string | Present only when the subdomain was auto-corrected. |
Errors
| Error | HTTP | Cause |
|---|---|---|
Email not enabled. Please contact us. |
400 | Email is not enabled on this account. |
Domain limit reached. Your plan allows {n} domain{s}. Please upgrade your plan or contact us. |
400 | Plan domain limit reached. |
Missing Domain |
400 | domain not supplied. |
Invalid Domain |
400 | domain is not a valid domain. |
Domain already registered. Please contact us. |
400 | Domain already exists. |
Invalid subdomain. Use only letters, numbers, and hyphens. |
400 | subdomain contains invalid characters. |
Request headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json |
curl -X POST https://api.dingomail.com.au/api/v5/domain \
-H "Content-Type: application/json" \
-d '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"domain": "example.com",
"subdomain": "email"
}'import requests
import json
url = "https://api.dingomail.com.au/api/v5/domain"
payload = json.loads('''{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"domain": "example.com",
"subdomain": "email"
}''')
response = requests.request("POST", url, json=payload)
print(response.text)const https = require("https");
const body = JSON.stringify({
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"domain": "example.com",
"subdomain": "email"
});
const req = https.request("https://api.dingomail.com.au/api/v5/domain", {
method: "POST",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) }
}, res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(data));
});
req.write(body);
req.end();<?php
$ch = curl_init("https://api.dingomail.com.au/api/v5/domain");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"domain": "example.com",
"subdomain": "email"
}'
]);
echo curl_exec($ch);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"domain": "example.com",
"subdomain": "email"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dingomail.com.au/api/v5/domain"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.dingomail.com.au/api/v5/domain");
request.Content = new StringContent(@"{
""key-id"": ""{{key_id}}"",
""key-secret"": ""{{key_secret}}"",
""domain"": ""example.com"",
""subdomain"": ""email""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"domain": "example.com",
"subdomain": "email"
}`)
req, _ := http.NewRequest("POST", "https://api.dingomail.com.au/api/v5/domain", body)
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}require "net/http"
require "uri"
uri = URI("https://api.dingomail.com.au/api/v5/domain")
request = Net::HTTP::Post.new(uri, "Content-Type" => "application/json")
request.body = '{
"key-id": "{{key_id}}",
"key-secret": "{{key_secret}}",
"domain": "example.com",
"subdomain": "email"
}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body{
"error": "",
"message": {
"id": "683554c596937cc4b90f5cf7",
"domain": "example.com"
}
}{
"error": "Invalid Domain"
}{
"error": "Failed (Invalid API ID or Key)"
}