WhatsApp API
WhatsApp API how-to guides, with code you can run
Step-by-step guides for sending and receiving WhatsApp messages through InfiQ's API, with cURL, Node.js, Python and PHP examples. The request bodies are the ones Meta's WhatsApp Cloud API defines, so what you learn here carries over.
Send messages
- How to send a WhatsApp message with the APIYour first send: the request, the response, the 24-hour rule and the first errors.
- How to send a WhatsApp template message with the APIBody variables, named parameters, media headers and buttons, with the JSON for each.
- How to send bulk WhatsApp messages with the APIA safe send loop: templates, pacing, idempotency keys, limits and opt-outs.
Receive messages and statuses
By language
- WhatsApp API with Python: send messages and receive webhooksA send() helper with retries, three message types and a Flask or FastAPI receiver.
- WhatsApp API with PHP and LaravelcURL, Laravel's HTTP client, a webhook route and WordPress, without an SDK.
- WhatsApp API with Node.js: send messages and receive webhooksfetch with retries, templates and buttons, and receivers for Express and Next.js.
By message type
Each message type has a glossary page with its JSON body, limits and code. Send them through the same endpoint as the guides above.
- Send an image
- Send a PDF or other document
- Send video and other media
- Send a voice note
- Send a location
- Send reply buttons
- Send a list menu
- Send a link button
- Send a carousel template
- Send an OTP
- React to a message
- Reply to a specific message
- Mark as read and show typing
- Message a WhatsApp group
- Test the API in Postman
Also useful: WhatsApp API error codes, the Cloud API request builder and the InfiQ API reference.
FAQ
Frequently asked questions
Which API do these guides use?
InfiQ's WhatsApp API: one endpoint, https://api.infiq.in/v1/messages, that takes the same message body as Meta's WhatsApp Cloud API and returns Meta's response with an InfiQ_traceid. You authenticate with an InfiQ API key instead of managing Meta tokens.
Can I try the examples without a live WhatsApp number?
Yes. A sandbox key (isk_test_…) accepts the same requests and simulates the delivery lifecycle, so your code and webhook receiver work before your number is verified.
Where are the guides for images, lists, buttons and OTPs?
Each message type has its own glossary page with the JSON body, limits and code, listed under “By message type” on this page.
Send your first WhatsApp message from code today.
Get a sandbox key, run any guide on this page, and switch to a live key when your number is verified.
