Sending WhatsApp Messages via HelpKit API
Use the API to send messages programmatically — triggered by your application events like order confirmations, OTPs, or alerts.
Send a Text Message
bash
curl -X POST \
https://api.helpkit.in/v1/messages \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"to": "+919876543210",
"type": "text",
"text": "Your order #12345 has been confirmed! 🎉"
}'
Send a Template Message
For outbound messages to contacts outside the 24h window, use an approved template:
bash
curl -X POST \
https://api.helpkit.in/v1/messages \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"to": "+919876543210",
"type": "template",
"template": {
"name": "order_confirmation",
"language": "en",
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Priya" },
{ "type": "text", "text": "12345" }
]
}
]
}
}'
Send an Image
bash
curl -X POST \
https://api.helpkit.in/v1/messages \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"to": "+919876543210",
"type": "image",
"image": {
"url": "https://yourcdn.com/order-receipt.jpg",
"caption": "Your receipt"
}
}'
Supported Message Types
| Type | Payload Key | Notes |
|------|-------------|-------|
| Text |
text | Plain text or emoji |
| Template |
template | Required for outbound |
| Image |
image | JPG, PNG (max 5MB) |
| Document |
document | PDF, DOCX (max 100MB) |
| Audio |
audio | MP3, OGG |
| Video |
video | MP4 (max 16MB) |
| Location |
location | lat/lng with name |
| Interactive |
interactive | Buttons or lists |
Handling the Response
json
{
"id": "msg_abc123",
"status": "sent",
"timestamp": "2026-03-19T09:00:00Z"
}
Track delivery status via webhooks — see
Webhook Events and Configuration.