POST Send Message API
Use this API to send a WhatsApp message.
<https://api.v7.botpenguin.com/whatsapp-automation/wa/send-message?apiKey=*API KEY*>
Header | Value |
---|---|
apiKey | *API KEY* |
Content-Type | application/json |
Plain Text Messages
Media Messages
{
"userName": "Test",
"wa_id": "910987654321",
"type": "text",
"message": {
"text": "hi"
}
}
Parameter | 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, document). |
message.text | string | message that needs to sent |
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"
}
}'
{
"userName": "Test",
"wa_id": "910987654321",
"type": "image",
"message": {
"source": "https://imgv3.fotor.com/images/blog-cover-image/part-blurry-image.jpg",
"label": "hey",
}
}
Parameter | 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, document). |
message.source | string | The URL of the media being sent. |
message.label | string | The text to attach to the media. |
message.type | string | The type of media being sent (e.g., image, document). |
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": "910987654321",
"type": "image",
"message": {
"source": "<https://imgv3.fotor.com/images/blog-cover-image/part-blurry-image.jpg>",
"label": "hey",
"type": "image"
}
}'
Last modified 3mo ago