Send WhatsApp messages through the official WhatsApp Business Platform using your SMSID account — template messages to open conversations, and free-text replies inside the 24-hour window.
Use the same SMSID secret API key as the SMS API, sent in the X-Api-Key header over HTTPS. WhatsApp messages are charged against the same prepaid balance.
https://smsid.co.uk/api/v1
Template messages are used to start a conversation (outside the 24-hour window). The template must be pre-approved.
| Field | Type | Description |
|---|---|---|
| type required | string | Set to template. |
| to required | string | Recipient in international format, e.g. +447700900123 |
| template required | string | Approved template name. |
| language optional | string | Language code (default en). |
| params optional | array | Ordered values for the template body placeholders. |
curl -X POST https://smsid.co.uk/api/v1/whatsapp/send \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type": "template", "to": "+447700900123", "template": "welcome", "language": "en", "params": ["Ahmed"]}'
<?php
$ch = curl_init("https://smsid.co.uk/api/v1/whatsapp/send");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: YOUR_API_KEY", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"type" => "template",
"to" => "+447700900123",
"template" => "welcome",
"language" => "en",
"params" => ["Ahmed"],
]),
]);
echo curl_exec($ch);
import requests
resp = requests.post(
"https://smsid.co.uk/api/v1/whatsapp/send",
headers={"X-Api-Key": "YOUR_API_KEY"},
json={
"type": "template",
"to": "+447700900123",
"template": "welcome",
"language": "en",
"params": ["Ahmed"],
},
)
print(resp.json())
const res = await fetch("https://smsid.co.uk/api/v1/whatsapp/send", {
method: "POST",
headers: { "X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
type: "template",
to: "+447700900123",
template: "welcome",
language: "en",
params: ["Ahmed"],
}),
});
console.log(await res.json());
{
"meta": { "code": 200, "text": "OK" },
"data": { "status": "queued", "message_id": "1aU6cwxAKE9...", "cost": "0.0500" }
}
Free-text messages can only be sent within 24 hours of the customer's last message (the customer-care window).
curl -X POST https://smsid.co.uk/api/v1/whatsapp/send \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type": "text", "to": "+447700900123", "message": "Hello from SMSID"}'
<?php
$ch = curl_init("https://smsid.co.uk/api/v1/whatsapp/send");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: YOUR_API_KEY", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"type" => "text",
"to" => "+447700900123",
"message" => "Hello from SMSID",
]),
]);
echo curl_exec($ch);
import requests
resp = requests.post(
"https://smsid.co.uk/api/v1/whatsapp/send",
headers={"X-Api-Key": "YOUR_API_KEY"},
json={"type": "text", "to": "+447700900123", "message": "Hello from SMSID"},
)
print(resp.json())
const res = await fetch("https://smsid.co.uk/api/v1/whatsapp/send", {
method: "POST",
headers: { "X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ type: "text", to: "+447700900123", message: "Hello from SMSID" }),
});
console.log(await res.json());
Messages move through these statuses as WhatsApp reports back: queued → sent → delivered → read, or failed. Status updates are delivered to your account automatically.
Errors return a non-200 status with a message in the meta object. The API is rate limited to 120 requests per minute per key.
{
"meta": { "code": 400, "text": "The WhatsApp channel is not enabled." }
}