curl --location --request POST '{{wa_base_url}}/wa/api/v1/msg' \
--header 'apikey: {{API_KEY}}' \
--header 'X-GS: header12,3' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'source={{SOURCE_NUMBER}}' \
--data-urlencode 'src.name={{SOURCE_NAME}}' \
--data-urlencode 'destination={{DESTINATION}}' \
--data-urlencode 'message={{message}}' \
--data-urlencode 'channel=whatsapp' \
--data-urlencode 'disablePreview={{true/false}}' \
--data-urlencode 'bypassCheck={{true/false}}'
Key | Value | Description |
---|
apikey | your_api_key_here | APIKEY of your Gupshup Account |
Parameter | Type | Required | Description |
---|
source | integer | Yes | Source Phone Number |
destination | integer | Yes | Destination Phone Number |
src.name | string | No | Valid app Name |
message | object | Yes | Message object |
Parameter | Type | Required | Description |
---|
body | string | Yes | Message text |
type | string | Yes | URL button type |
display_text | string | Yes | CTA button display name |
url | string | Yes | URL of the CTA button |
footer | string | No | Footer for the message |
header | object | No | Header object |
Parameter | Type | Required | Description |
---|
type | string | Yes | The type can be image or video |
image | object | No | Image object (required if type is image) |
video | object | No | Video object (required if type is video) |
{
"status": "submitted",
"messageId": "183dc8f1-7ecc-4419-895f-04fd0b1bfe07"
}
{
"message": "Invalid Destination",
"status": "error"
}
or
{
"message": "Invalid App Details",
"status": "error"
}
{
"message": "Authentication Failed",
"status": "error"
}
{
"message": "Too Many Requests",
"status": "error"
}