📡 Webhook API Documentation

Integrate SMS and Email sending into your applications with our simple REST API

✨ Quick Start: Generate your API token from the dashboard and start sending SMS & emails in minutes!

🔐 Authentication

All webhook endpoints require authentication using an API token. Include the token in either:

📍 Endpoints

📱 SMS Endpoints

POST Send Single SMS

https://zensms.com.au/api/webhook/send-sms

Request Body:

{
  "phone": "+61412345678",
  "message": "Hello from ZenSMS!",
  "device_id": 1  // Optional
}

Response (201):

{
  "success": true,
  "sms_id": 123,
  "status": "pending",
  "device": {
    "id": 1,
    "name": "My Phone"
  }
}

POST Send Bulk SMS

https://zensms.com.au/api/webhook/send-bulk-sms

Request Body:

{
  "messages": [
    {
      "phone": "+61412345678",
      "message": "Hello User 1!"
    },
    {
      "phone": "+61487654321",
      "message": "Hello User 2!"
    }
  ],
  "device_id": 1  // Optional
}
⚠️ Limits: Minimum 1 message, Maximum 100 messages per request

Response (201):

{
  "success": true,
  "count": 2,
  "sms_ids": [123, 124],
  "status": "pending",
  "device": {
    "id": 1,
    "name": "My Phone"
  }
}

GET Check SMS Status

https://zensms.com.au/api/webhook/sms-status/{id}

Response (200):

{
  "id": 123,
  "phone": "+61412345678",
  "message": "Hello from ZenSMS!",
  "status": "sent",
  "created_at": "2026-02-27T10:30:00.000000Z",
  "updated_at": "2026-02-27T10:30:15.000000Z"
}

Status Values:

📧 Email Endpoints

POST Send Single Email

https://zensms.com.au/api/webhook/send-email

Request Body:

{
  "to_email": "user@example.com",
  "to_name": "John Doe",  // Optional
  "subject": "Hello from ZenSMS",
  "body_text": "Plain text message",  // Optional
  "body_html": "<h1>HTML message</h1>"  // Optional
}

Response (201):

{
  "success": true,
  "email_id": 456,
  "status": "sent"
}

POST Send Bulk Email

https://zensms.com.au/api/webhook/send-bulk-email

Request Body:

{
  "emails": [
    {
      "to_email": "user1@example.com",
      "to_name": "User 1",
      "subject": "Hello User 1",
      "body_text": "Message for user 1"
    },
    {
      "to_email": "user2@example.com",
      "subject": "Hello User 2",
      "body_html": "<p>HTML message for user 2</p>"
    }
  ]
}
⚠️ Limits: Minimum 1 email, Maximum 100 emails per request

Response (201):

{
  "success": true,
  "count": 2,
  "email_ids": [456, 457],
  "errors": []
}

GET Check Email Status

https://zensms.com.au/api/webhook/email-status/{id}

Response (200):

{
  "id": 456,
  "to_email": "user@example.com",
  "to_name": "John Doe",
  "subject": "Hello from ZenSMS",
  "status": "sent",
  "sent_at": "2026-02-27T10:30:00.000000Z"
}

💻 Code Examples

SMS - cURL

curl -X POST https://zensms.com.au/api/webhook/send-sms \
  -H "X-Webhook-Token: your-api-token" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+61412345678",
    "message": "Hello from ZenSMS!"
  }'

Python

import requests

headers = {
    "X-Webhook-Token": "your-api-token",
    "Content-Type": "application/json"
}

response = requests.post(
    "https://zensms.com.au/api/webhook/send-sms",
    headers=headers,
    json={
        "phone": "+61412345678",
        "message": "Hello from ZenSMS!"
    }
)
print(response.json())

Email - cURL

curl -X POST https://zensms.com.au/api/webhook/send-email \
  -H "X-Webhook-Token: your-api-token" \
  -H "Content-Type: application/json" \
  -d '{
    "to_email": "user@example.com",
    "to_name": "John Doe",
    "subject": "Hello",
    "body_text": "This is a test email"
  }'

Email - Python

import requests

headers = {
    "X-Webhook-Token": "your-api-token",
    "Content-Type": "application/json"
}

response = requests.post(
    "https://zensms.com.au/api/webhook/send-email",
    headers=headers,
    json={
        "to_email": "user@example.com",
        "subject": "Hello",
        "body_text": "This is a test email"
    }
)
print(response.json())

JavaScript (Node.js)

const axios = require('axios');

const response = await axios.post(
  'https://zensms.com.au/api/webhook/send-sms',
  {
    phone: '+61412345678',
    message: 'Hello from ZenSMS!'
  },
  {
    headers: {
      'X-Webhook-Token': 'your-api-token',
      'Content-Type': 'application/json'
    }
  }
);
console.log(response.data);

PHP

$ch = curl_init('https://zensms.com.au/api/webhook/send-sms');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'phone' => '+61412345678',
    'message' => 'Hello from ZenSMS!'
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'X-Webhook-Token: your-api-token',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;

📊 Rate Limits

Plan Daily SMS Limit
Free 50 SMS per day
Premium Unlimited
Premium Plus Unlimited
Custom Custom limits

❌ Error Responses

Status Code Description
401 Invalid or missing token
403 SMS limit reached
404 No active device available or SMS not found
422 Validation error

Ready to Get Started?

Sign up now and get your API token to start sending SMS & emails!

Go to Dashboard
💡 Need Help? Contact us at admin@zensms.com.au