REST endpoints, real-time webhooks and copy-paste examples in cURL, JavaScript and Python to get you sending messages in minutes.
Generate a key from Settings → API & Webhooks in your dashboard.
Pass it as a Bearer token in the Authorization header.
Base URL: https://api.taswiq.qa/v1
Send a free-form or template message to any WhatsApp number connected to your business.
# Send a WhatsApp message via Taswiq API
curl -X POST https://api.taswiq.qa/v1/messages \
-H "Authorization: Bearer TASWIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "whatsapp",
"to": "+97450001234",
"type": "text",
"text": { "body": "Hi! Your order has shipped 🚚" }
}'
// Send a WhatsApp message via Taswiq SDK
import Taswiq from "taswiq-node";
const client = new Taswiq("TASWIQ_API_KEY");
await client.messages.send({
channel: "whatsapp",
to: "+97450001234",
type: "text",
text: { body: "Hi! Your order has shipped 🚚" },
});
# Send a WhatsApp message via Taswiq SDK
from taswiq import Client
client = Client("TASWIQ_API_KEY")
client.messages.send(
channel="whatsapp",
to="+97450001234",
type="text",
text={"body": "Hi! Your order has shipped 🚚"},
)
Trigger a Meta-approved template broadcast to a saved audience segment.
curl -X POST https://api.taswiq.qa/v1/broadcasts \
-H "Authorization: Bearer TASWIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template": "ramadan_offer",
"audience_id": "seg_vip_customers",
"schedule_at": "2026-09-01T09:00:00+03:00"
}'
await client.broadcasts.create({
template: "ramadan_offer",
audienceId: "seg_vip_customers",
scheduleAt: "2026-09-01T09:00:00+03:00",
});
client.broadcasts.create(
template="ramadan_offer",
audience_id="seg_vip_customers",
schedule_at="2026-09-01T09:00:00+03:00",
)
Add an endpoint URL
In Settings → API & Webhooks, register a public HTTPS URL to receive events.
Choose your events
Subscribe to message.received, message.delivered, conversation.assigned & more.
Verify the signature
Every payload is signed with HMAC-SHA256 using your webhook secret.
Return a 200 OK
Acknowledge within 5 seconds — Taswiq retries with backoff on failure.
{
"event": "message.received",
"timestamp": "2026-08-23T09:14:02Z",
"channel": "whatsapp",
"conversation_id": "cnv_88213",
"from": "+97450001234",
"message": {
"type": "text",
"body": "Is this in stock?"
},
"signature": "sha256=4f2a9c..."
}
Need a tunnel for local testing? Use ngrok or the built-in Taswiq webhook simulator in your dashboard.
Free trial accounts include full API & webhook access.
Taswiq Support
● Online now
Hi there! 👋 Questions about Taswiq? Chat with us on WhatsApp for an instant reply.
Start Chat