CTA URL Message

cURL

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

Headers

KeyValueDescription
apikeyyour_api_key_hereAPIKEY of your Gupshup Account

Form Parameters

ParameterTypeRequiredDescription
sourceintegerYesSource Phone Number
destinationintegerYesDestination Phone Number
src.namestringNoValid app Name
messageobjectYesMessage object

Message Object Structure

ParameterTypeRequiredDescription
bodystringYesMessage text
typestringYesURL button type
display_textstringYesCTA button display name
urlstringYesURL of the CTA button
footerstringNoFooter for the message
headerobjectNoHeader object
Header Object Structure
ParameterTypeRequiredDescription
typestringYesThe type can be image or video
imageobjectNoImage object (required if type is image)
videoobjectNoVideo object (required if type is video)

Responses

200 OK

{
  "status": "submitted",
  "messageId": "183dc8f1-7ecc-4419-895f-04fd0b1bfe07"
}

400 Bad Request

{
  "message": "Invalid Destination",
  "status": "error"
}

or

{
  "message": "Invalid App Details",
  "status": "error"
}

401 Authentication Failed

{
  "message": "Authentication Failed",
  "status": "error"
}

429 Too Many Requests

{
  "message": "Too Many Requests",
  "status": "error"
}
Language
Click Try It! to start a request and see the response here!