WhatsApp API for cURL
Works in any terminal with curl installed. Good for a first test before you write code. There is no official SDK, just one HTTP request.
Send a message with cURL
curl -X POST https://quackapi.com/v1/messages/chat \
-H "Content-Type: application/json" \
-H "x-api-key: $QUACKAPI_KEY" \
-d '{"deviceId":1,"to":"923001234567","body":"Hello from QuackAPI"}'Before you run it
- Connect a device and use its numeric id as deviceId.
- Set QUACKAPI_KEY to your wa_ key.
- Run this on a server. Never ship the key to a browser or app.
cURL tips
- Keep the key in an environment variable (export QUACKAPI_KEY=wa_...) so it does not end up in your shell history.
- Add -i to see the status code and headers, and -sS --fail-with-body in scripts so a 4xx or 5xx makes the command fail.
Handling errors
Non-2xx responses carry a JSON message. See the errors page for what each code means and which to retry.
Related
Last reviewed 2026-11-09. QuackAPI is an unofficial linked-device service. Acceptable use