AI Studio Resource Centre
Api referencesWhatsApp Cloud API

POST Send Message API

Use this API to send a WhatsApp message.

API Endpoint

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

Request Headers

HeaderValue
apiKey*API KEY*
Content-Typeapplication/json

Request Body

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

Parameters

ParameterTypeDescription
userNamestringThe name of the user to whom the message is being sent.
wa_idstringThe WhatsApp number of the user to whom the message is being sent. The number must contain the country code without the plus sign.
typestringThe type of message being sent (e.g., text, image).
message.textstringmessage that needs to sent
message.labelstringThe caption you want to send along with the image
(optional) Only if type is image
message.sourcestringThe image link
(optional)
Only if type is image

Example

curl --location 'https://api.v7.express-chat.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"
    }
}'

Request Body

{
    "userName": "Test",
    "wa_id": "910987654321",
    "type": "image",
    "message": {
        "source": "https://imgv3.fotor.com/images/blog-cover-image/part-blurry-image.jpg",
        "label": "hey",
    }
}

Parameters

ParameterTypeDescription
userNamestringThe name of the user to whom the message is being sent.
wa_idstringThe WhatsApp number of the user to whom the message is being sent. The number must contain the country code without the plus sign.
typestringThe type of message being sent (e.g., text, image, document).
message.sourcestringThe URL of the media being sent.
message.labelstringThe text to attach to the media.
message.typestringThe type of media being sent (e.g., image, document).

Example

curl --location '<https://api.v7.s10u.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"
    }
}'

Error Codes

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

On this page