SMS API for Developers
Send and receive SMS programmatically with our simple REST API. Full documentation, code samples, and webhooks. NZ-hosted infrastructure for fast local delivery.
API Uptime
Guaranteed SLA
Response Time
Average latency
SMS per Second
Throughput capacity
Data Hosting
Local infrastructure
Send SMS via API in ANY Language
Send your first SMS in minutes with our code examples
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"https://websms.co.nz/api/connexus/sms/out");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer wst_your_token...'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'to' => '6421234567',
'body' => 'Hello from PHP!'
]);
$response = curl_exec($ch);
- Native cURL support
- Composer package available
- Laravel integration
Python
import requests
response = requests.post(
'https://websms.co.nz/api/connexus/sms/out',
headers={
'Authorization': 'Bearer wst_your_token...'
},
data={
'to': '6421234567',
'body': 'Hello from Python!'
}
)
- Works with requests library
- Django/Flask compatible
- Async support
Node.js
const axios = require('axios');
axios.post('https://websms.co.nz/api/connexus/sms/out',
{ to: '6421234567', body: 'Hello from Node.js!' },
{ headers: {
'Authorization': 'Bearer wst_your_token...'
}}
);
- Promise-based API
- TypeScript definitions
- Express middleware
cURL / REST
curl -X POST \
https://websms.co.nz/api/connexus/sms/out \
-H "Authorization: Bearer wst_your_token..." \
-d to=6421234567 \
-d body="Hello from cURL!"
- RESTful endpoints
- JSON responses
- Any language support
Receive Incoming SMS Messages
Two ways to handle inbound SMS - real-time webhooks or poll via API
View Full API DocumentationReal-time Webhooks
We POST to your endpoint instantly
Register your webhook URL and receive incoming messages the moment they arrive. Perfect for chatbots, auto-replies, and real-time integrations.
// Webhook payload sent to your endpoint
{
"messageId": "MO456",
"from": "+6421234567",
"to": "3456",
"body": "Yes, confirm my booking",
"timestamp": 1705312200,
"type": "SMS",
"encoding": "text/plain"
}
- Instant delivery as messages arrive
- Ideal for conversational flows
- Configure via API or dashboard
Poll via API
Query messages on your schedule
Fetch incoming messages when it suits you. Filter by date range, sender, or recipient. Great for batch processing and systems without public endpoints.
// POST to /api/connexus/mo/query
{
"api_key": "YOUR_API_KEY",
"start_date": "2024-01-01",
"end_date": "2024-01-15",
"limit": 100,
"page": 1
}
- Filter by date, sender, or recipient
- Paginated results (up to 200 per page)
- Full docs at /api/connexus/#query-mo
Developer-Friendly Features
Everything you need to build SMS into your application
Webhooks
Receive delivery receipts and incoming messages via HTTP callbacks to your server.
Two-Way SMS
Send and receive messages programmatically. Build conversational SMS flows with inbound message handling.
Delivery Reports
Track message status in real-time - sent, delivered, failed with detailed error codes.
Prepaid Credits
Simple credit-based billing. No monthly fees. Only pay for what you send.
Secure Authentication
API key authentication with IP whitelisting and HTTPS encryption.
Documentation
Comprehensive API docs with examples, error codes, and best practices.
Start Building with Our SMS API
Get your API keys and send your first message in minutes. Free credits included.
Explore Integrations
Connect your favourite tools with WebSMS