Jaza Africa Send Message API Documentation
This documentation provides complete details on the Jaza Africa Send Message API suite, which allows sending WhatsApp template messages using both POST and GET methods. It includes secure, flexible, and test-ready integration options.
1. Send Message API
The Send Message API enables sending WhatsApp business messages to users using approved templates. Below are two supported methods:
- POST Method â Recommended for production and secure environments.
- GET Method â Useful for lightweight integrations or testing.
1.1 WhatsApp Template API (POST Method)
The POST API allows sending template-based WhatsApp messages through JSON requests.
Endpoint
Method: POST
URL: https://jazaafrica.online/api/whatsapp/SendTemplate
Request Headers
| Header | Description |
|---|---|
| Content-Type | application/json |
Request Body (JSON)
{
"sender": "{{sender}}",
"to": "{{recipient}}",
"templateId": "{{template_id}}",
"headerVariables": "{{header_link}}",
"bodyVariables": "{{name}}, {{otp}}",
"buttonVariables": "{{button_text}}"
}
Request Body Example (Demo Data)
{
"sender": "919876XXXXXX",
"to": "911234XXXXXX",
"templateId": "1234567890123456",
"headerVariables": "https://jazaafrica.online/logo.png",
"bodyVariables": "John Doe, 456789",
"buttonVariables": "Verify Now"
}
Example Response
{
"status": "sent",
"to": "{{recipient}}",
"messageId": "wamid.xxxxxxxxxxxxx",
"message": "Message sent successfully."
}
1.2 WhatsApp Template API (GET Method)
The GET API enables sending WhatsApp messages by passing parameters directly through the URL. This method is easier for simple or test use cases.
Endpoint
Method: GET
URL:
https://jazaafrica.online/api/whatsapp/SendTemplate?sender=##sender##&to=##number##&templateid=##templateid##&headerVariables=##link##&bodyVariables=##variables##&buttonVariables=##variables##
Request Parameters
| Parameter | Description | Example |
|---|---|---|
| sender | Registered WhatsApp sender ID or number. | "{{sender}}" |
| to | Recipientâs WhatsApp number with country code. | "{{recipient}}" |
| templateid | WhatsApp template identifier. | "{{template_id}}" |
| headerVariables | Header data such as image/video/document link. | "https://example.com/header.jpg" |
| bodyVariables | Values for placeholders in message body. | "{{name}}, {{otp}}" |
| buttonVariables | Optional button labels or parameters. | "{{button}}" |
Request Body Example (Demo Data)
https://jazaafrica.online/api/whatsapp/SendTemplate?sender=919876543210&to=911234567890&templateid=1234567890123456&headerVariables=https://jazaafrica.online/logo.png&bodyVariables=John%20Doe,456789&buttonVariables=Verify%20Now
Example Response
{
"status": "sent",
"to": "{{recipient}}",
"messageId": "wamid.xxxxxxxxxxxxx",
"message": "Messages sent successfully."
}
Important Notes
- Ensure that your WhatsApp templates are pre-approved in the Jaza Africa Business Dashboard.
- Use POST for secure production deployments and GET for quick testing.
- All URLs and media links must be accessible over HTTPS.
- Use the
messageIdfor tracking message delivery.
1.3 WhatsApp Link Message API (POST Method)
This API allows sending WhatsApp messages containing links with optional preview enabled. The API supports sending to one or multiple recipients simultaneously.
Endpoint
Method: POST
URL: https://jazaafrica.online/api/whatsapp/send
Request Body (JSON)
{
"sender": "{{sender}}",
"to": "{{recipient_numbers}}",
"type": "text",
"data": {
"preview_url": true,
"body": "{{http_link}}"
}
}
Request Body Example (Demo Data)
{
"sender": "919876XXXXXX",
"to": "911234XXXXXX,911112XXXXXX",
"type": "text",
"data": {
"preview_url": true,
"body": "https://jazaafrica.online/offer?ref=123"
}
}
Example Response
{
"status": "sent",
"to": "{{recipient}}",
"message": "Messages sent successfully..."
}
Notes
- The
preview_urlflag enables automatic link previews in WhatsApp messages. - Multiple recipients can be specified by separating phone numbers with commas.
- Use HTTPS links to ensure proper preview generation.
- This endpoint is ideal for promotional messages or sending links with automatic rich previews.
1.4 WhatsApp Image Send API (POST Method)
This API enables sending images through WhatsApp messages with optional captions. Multiple recipients can be targeted in a single request.
Endpoint
Method: POST
URL: https://jazaafrica.online/api/whatsapp/send
Request Body (JSON)
{
"sender": "{{sender}}",
"to": "{{recipient_numbers}}",
"type": "image",
"data": {
"link": "{{image_link}}",
"caption": "{{caption}}"
}
}
Request Body Example (Demo Data)
{
"sender": "919876XXXXXX",
"to": "911234XXXXXX,911112XXXXXX",
"type": "image",
"data": {
"link": "https://jazaafrica.online/images/product.jpg",
"caption": "Check out our new product launch!"
}
}
Example Response
{
"status": "sent",
"to": "{{recipient}}",
"message": "Messages sent successfully..."
}
Notes
- The
linkmust be a publicly accessible URL to the image file (HTTPS recommended). - Optional
captionadds text below the image in WhatsApp. - Supports sending to multiple recipients separated by commas.
- Ensure images comply with WhatsAppâs content and size guidelines.
1.5 WhatsApp Template Send API (POST Method)
This API allows sending approved WhatsApp template messages of various types â such as marketing, utility, or authentication templates. The API supports sending media (like images) within the header and defining language and variable parameters dynamically.
Endpoint
Method: POST
URL: https://jazaafrica.online/api/whatsapp/send
Request Body (JSON)
{
"sender": "{{sender}}",
"to": "{{recipient_numbers}}",
"type": "{marketing | utility | authentication}",
"data": {
"name": "{{template_name}}",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"id": null,
"link": "{{image_link}}",
"caption": "{{caption}}"
}
}
]
}
]
}
}
Request Body Example (Demo Data)
{
"sender": "919876XXXXXX",
"to": "911234",
"type": "marketing",
"data": {
"name": "promo_offer",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://jazaafrica.online/images/offer_banner.png",
"caption": "Exclusive 20% Discount"
}
}
]
},
{
"type": "body",
"parameters": [
{ "type": "text", "text": "John" },
{ "type": "text", "text": "20% OFF" }
]
}
]
}
}
Example Response
{
"status": "sent",
"to": "{{recipient}}",
"message": "Messages sent successfully..."
}
Notes
- The
typedefines the template category:marketing,utility, orauthentication. - The
linkparameter undercomponentsmust contain a valid HTTPS URL to the image used in the template header. - Ensure the
template namematches exactly with the one approved in your WhatsApp Business account. - Language codes must comply with WhatsApp template configuration (e.g., âenâ, âesâ, âfrâ).
- Multiple recipients can be listed using comma-separated WhatsApp numbers.