Send WhatsApp messages by API
Messages are accepted instantly and sent from a queue, so your request never waits on WhatsApp.
Send a text message
const res = await fetch("https://quackapi.com/v1/messages/chat", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.QUACKAPI_KEY,
},
body: JSON.stringify({
deviceId: 1,
to: "923001234567",
body: "Hello from QuackAPI",
}),
});
const data = await res.json();
if (!res.ok) throw new Error(data.message);
console.log(data); // { success: true, messageId: 123, status: "queued" }The response
On success you receive success: true, a messageId and status queued. The status then moves to sent or failed.
{ "success": true, "messageId": 123, "status": "queued" }Recipient numbers
Send the number with country code. Non-digit characters are stripped, so +92 300 1234567 and 923001234567 are the same. A value containing @ is used as given.
Statuses
| Status | Meaning |
|---|---|
| queued | Accepted by QuackAPI and waiting to be sent |
| sent | Handed to WhatsApp |
| failed | Could not be sent. The reason is in the webhook and dashboard |
| unknown | Result could not be confirmed |
Related
Last reviewed 2026-11-09. QuackAPI is an unofficial linked-device service. Acceptable use