POST Send Message API

Use this API to send a WhatsApp message.

API Endpoint

<https://api.v7.botpenguin.com/whatsapp-automation/wa/send-message?apiKey=*API KEY*>

Request Headers

HeaderValue

apiKey

*API KEY*

Content-Type

application/json

Request Body

{
    "userName": "Test",
    "wa_id": "910987654321",
    "type": "text",
    "message": {
        "text": "hi"
    }
}

Parameters

ParameterTypeDescription

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

Example

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"
    }
}'

Error Codes

Refer to the official documentation for more information on error codes.

Last updated