Introduction
All endpoints live under /v1. Send request bodies as JSON with Content-Type: application/json; every response is JSON. Amounts are in Australian dollars (AUD).
Sending is prepaid: the full cost of a send is deducted from your balance when you submit it. Any message that cannot be handed to the network (for example if our upstream gateway is unavailable, or you cancel a scheduled send in the portal) is refunded to your balance automatically.
Authentication
Create an API key in the portal under Settings → API key. The key starts with hsk_ and is shown only once — store it securely. Generating a new key immediately disables the old one.
Send the key as a bearer token on every request:
Authorization: Bearer hsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
A missing header returns 401 missing_api_key, an unknown key 401 invalid_api_key, and a suspended account 403 account_suspended.
Phone numbers
Only Australian mobile numbers are accepted. Any of these forms work, and spaces, dashes, dots and brackets are ignored:
| Format | Example |
|---|---|
| Local | 0412 345 678 |
| International | +61412345678 |
| International, no plus | 61412345678 |
Numbers are normalised to 614xxxxxxxx, which is the form used in responses. Duplicates in one request are sent once. Numbers that are not valid Australian mobiles are skipped and counted in invalid; numbers on your opt-out list are skipped and counted in blocked. Neither is charged.
Message length & cost
Long messages are split into parts (segments) and each part is charged. The limit per part depends on the characters used:
| Encoding | Single SMS | Each part when longer |
|---|---|---|
| GSM-7 (standard Latin letters, digits, common punctuation) | 160 characters | 153 characters |
| Unicode (any other character, e.g. emoji, 中文, curly quotes) | 70 characters | 67 characters |
In GSM-7 the characters ^ { } \ [ ] ~ | € count as two. A message may be at most 1,000 characters (GSM-7 units, or characters for Unicode). Cost = recipients × segments × your price per segment.
Send SMS
Sends one message to up to 10,000 recipients, now or at a scheduled time.
Request body
| Field | Type | Description |
|---|---|---|
to | array of strings, required | Recipient mobile numbers (max 10,000 after removing duplicates). A single string separated by commas, spaces or new lines also works. |
message | string, required | The text to send, up to 1,000 characters. |
sendAt | string, optional | ISO 8601 date-time to schedule the send, e.g. 2026-12-01T09:00:00+11:00. Must be within 90 days. A time less than a minute away sends immediately. |
reference | string, optional | Your own label for this send (up to 120 characters). It appears as the campaign name in the portal. |
Example
curl https://harboursms.com/v1/sms \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "to": ["0412 345 678", "+61498765432"], "message": "Hi Sam, your appointment is tomorrow at 10am. Reply STOP to opt out. – Bondi Dental", "reference": "reminders-2026-12-01" }'
Response
{
"id": 1042,
"status": "queued",
"recipients": 2,
"segments": 1,
"cost": 0.11,
"invalid": 0,
"blocked": 0
}
| Field | Description |
|---|---|
id | Send ID (a number). Use it with GET /v1/sms/:id. |
status | queued (sending now) or scheduled (when sendAt is in the future). |
recipients | Number of valid, non-blocked recipients that will be messaged. |
segments | Parts per message. |
cost | Amount deducted from your balance, in AUD. |
invalid | Count of numbers skipped because they are not valid Australian mobiles. |
blocked | Count of numbers skipped because they are on your opt-out list. |
Get send status
Returns the send and the status of each number (up to 10,000). Poll this endpoint to track delivery; a send that does not belong to your account returns 404 not_found.
curl https://harboursms.com/v1/sms/1042 -H "Authorization: Bearer YOUR_API_KEY" { "id": 1042, "status": "done", "recipients": 2, "segments": 1, "cost": 0.11, "created_at": "2026-12-01T09:00:02.000Z", "messages": [ { "number": "61412345678", "status": "delivered", "reason": "", "done_at": "2026-12-01T09:00:09.000Z" }, { "number": "61498765432", "status": "failed", "reason": "rejected by carrier", "done_at": "2026-12-01T09:00:03.000Z" } ] }
Send status: scheduled, sending, done (at least one message went out), failed (none did) or cancelled. Times are UTC. cost reflects any refunds.
Message status
| Status | Meaning |
|---|---|
queued | Waiting to be sent (or waiting for its scheduled time). |
sent | Handed to the network; waiting for a delivery report. |
delivered | The carrier confirmed delivery to the handset. |
failed | Not delivered. reason says why. Messages that never left our platform are refunded. |
blocked | Not sent because the number opted out. (Opted-out numbers are normally removed at send time and counted in blocked, so this is rare.) |
done_at is when the message reached a final status (delivered, failed or blocked); it is null before then.
Get balance
curl https://harboursms.com/v1/balance -H "Authorization: Bearer YOUR_API_KEY" { "balance": 48.25, "currency": "AUD" }
Errors
Errors return a non-2xx HTTP status and a JSON body of the form {"error": "code"}. Some errors include extra fields to help you recover.
| Code | HTTP | Meaning |
|---|---|---|
missing_api_key | 401 | No Authorization: Bearer header. |
invalid_api_key | 401 | The key is wrong or has been replaced. |
account_suspended | 403 | Your account is suspended. Contact support. |
insufficient_balance | 400 | Your balance does not cover the send. Includes cost. Nothing was sent or charged. |
no_valid_numbers | 400 | No sendable recipients. Includes invalid and blocked counts. |
empty_message | 400 | message is missing or blank. |
message_too_long | 400 | message is over 1,000 characters. |
too_many_numbers | 400 | More than 10,000 recipients. Includes max. Split the list into several requests. |
bad_send_time | 400 | sendAt is not a valid date-time or is more than 90 days away. |
not_found | 404 | No send with that ID on your account. |