POST Send Message API
Use this API to send a WhatsApp message.
API Endpoint
https://api.v7.botpenguin.com/whatsapp-automation/wa/send-template?apiKey=*API KEY*
Request Headers
Header | Value |
apiKey | *API KEY* |
Content-Type | application/json |
Request Body
body
JavaScript
{
"userName": "Test",
"wa_id": "910987654321",
"type": "text",
"message": {
"text": "hi"
},
"tags": [ "test" ]
}
Parameters
Name | Type | Description |
userName | String | The name of the user to whom the message is being sent. |
wa_id | String | The WhatsApp number of the user to whom the message is being sent. The number must contain the country code without the plus sign. |
type | String | The type of message being sent (e.g., text, image). |
message.text | String | message that needs to sent |
message.label | String | The caption you want to send along with the image (optional) Only if type is image |
message.source | String | The image link (optional) Only if type is image |
tags | array | Tags are the labels that you can assign to conversations or chats to help organize and manage effectively. |
Example
Request Body
body
JavaScript
{
"userName": "Test",
"wa_id": "910987654321",
"type": "image",
"message": {
"source": "https://imgv3.fotor.com/images/blog-cover-image/part-blurry-image.jpg",
"label": "hey",
}
}
example
TypeScript
curl --location 'https://api.v7.botpenguin.com/whatsapp-automation/wa/send-message?apiKey=*API KEY*' \
--header 'apiKey: *API KEY*' \
--header 'Content-Type: application/json' \
--data '{
"userName": "Test",
"wa_id": "918859170007",
"type": "text",
"message": {
"text": "hi"
}
"tags": [ "test" ]
}'