WhatsApp/SMS providers format

This page provides a detailed reference on the JSON formats intended for WhatsApp provider messages. All message types available, excluding text and images, are presented here for you to send. To date, the integration has been successfully carried out with Gupshup and Infobip.


Interactive Buttons

Properties

Property

Description

Required

header

Contains the properties of the top part of the element.

Yes

text

Contains the text included in the header.

Yes*

imageUrl

Contains the URL of the image in the header.

Yes*

videoUrl

Contains the URL of the video in the header.

Yes*

documentUrl

Contains the URL of the document location.

Yes*

filename

File name to send document type.

No

body

Contains the text that will appear below the header.

Yes

buttonsList

Contains an array with the buttons. (1-3)

Yes

button

Button information.

  • id

  • title

Yes

Yes

Yes

footer

Contains the text that was in the footer of the element.

No

*Only one of these properties is required, depending on what the interactive button header type will be. Ex: imageUrl > Image Type, text > Text Type, etc.


Text

{   "interactiveButtons": {     "header": {       "text": "text"     },     "body": "body text",     "buttonsList": [       {         "id": "1",         "title": "Si"       },       {         "id": "2",         "title": "No"       }     ],     "footer": "footer"   } }

Document

{   "interactiveButtons": {     "header": {       "documentUrl": "https://integraccs.ucontactcloud.com/attachments/20220201/000ESPMarcadores.pdf",       "filename": "Marcadores"     },     "body": "body text",     "buttonsList": [       {         "id": "1",         "title": "Si"       },       {         "id": "2",         "title": "No"       }     ],     "footer": "footer"   } }

Image

{   "interactiveButtons": {     "header": {       "imageUrl": "https://integraccs.ucontactcloud.com/attachments/20220201/e2f3323a-2cb3-4ff7-9e81-1ff4ce893d26.logo192.png"     },     "body": "body text",     "buttonsList": [       {         "id": "1",         "title": "Si"       },       {         "id": "2",         "title": "No"       }     ],     "footer": "footer"   } }

Video


Interactive List

Properties

Property

Description

Required

header

Text located in the header of the element.

No

body

Text located below the header.

Yes

buttonMenu

Text on the button to open the menu.

Yes

sections

Array with sections (1-2).

Yes

title

Title for each section.

No*

rows

Array with the different options.

Yes

row

Information about each option:

  • id

  • title

  • description

Yes

  • Yes

  • Yes

  • No

footer

Text located in the footer of the element.

No

*Required if you have more than one section.

The range of options for each section is 1-10. Max between the sections is 10.


Contact

Properties

Property

Description

Required

firstName

First name

Yes

lastName

Last name.

No

middleName

Middle name.

No

formattedName

Name and last name without blank spaces.

Yes

namePrefix

Name prefix.

No

birthday

Birthday

No

phones

Array with different phone numbers.

No

phone

Number and phone type

  • type

  • phone

No

emails

Array with different email addresses.

No

email

Email address and type.

  • email

  • type

No

addresses

Array with different addresses.

No

address

Information of each address.

  • type

  • street

  • city

  • country

  • zip

  • state

No

org

Information about the organization.

  • company

  • department

  • title

No

urls

Array with different URLs.

No

url

  • url 

  • type

No


Location

Properties

Property

Description

Required

address

Place on the map: street and city.

No

name

Name of the location.

No

latitude

Specific north-south coordinate.

Yes

longitude

Specific east-west coordinate.

Yes


Template/HSM

Properties

Property

Description

Required

name

Name or id of the approved template.

Yes

type

Template type.

Yes

language

Template language.

Yes

contentHeader

Text included in the header.

Yes(1)

latitude

Specific north-south coordinate.

Yes(2)

longitude

Specific east-west coordinate.

Yes(2)

filename

Document name.

No(3)

placeholders

Array with variables in template text.

Yes(4)

buttonType

Button type (URL or QUICK_REPLY).

Yes(4)

buttonsList

Array with variables for the text on the button.

Yes(4)

1: Depending on the type, Ex: in the case of an image, the URL of the image must go.

2: Required if type is location.

3: If you leave it empty, the name will be “null”.

4: Required if the template contains variables or buttons, it must be the exact number of elements in the array.


Text (Gupshup)


Body (Infobip v2)


Video (Infobip v2)


Video (Gupshup)


Image (Infobip v2)


Imagen (Gupshup)


Imagen/Button (Infobip v2)

Location (Infobip v2)


Documento (Infobip v2)