Message

Send template message

Request API endpoint

POST   https://api.innopaas.com/api/whatsapp/v3/msg/submit

Request parameters

Field

Data type

Required

Description

wabaId

String

Yes

Unique identifier of the WhatsApp Business Account

messageType

String

Yes

Message content type: template: template (For the first send, you must use a template message to reach the user) The following types: within 24 hours after the user replies, you can usetext: text image: image video: video audio: audio location: location document: document sticker: stickercontacts: contacts interactive: interactive message

uid

String

Customer batch number, no more than 32 characters

sendNumber

String

Sending number, format: country code + phone number

recipientNumber

String

Receiving number, format: country code + phone number Multiple numbers separated by commas, up to 1000 numbers

body

String

Message body, required when messageType=text

language

String

Message language (Language abbreviation code must be provided), see Appendix 1, Language Code List Required when messageType=template

templateName

String

Template name. Lowercase letters, numbers, characters and underscores allowed, must be unique. Required when messageType=template

header

Object

Template message header information. See HeaderDto

bodyParams

String[]

Required when there are variables in the template body

buttonParams

Object[]

Required when template button type is dynamic link. See ParameterDto

media

Object

See media messages: media message

location

Object

See media messages: location message

contacts

Object[]

See media messages: contacts message

interactive

Object

See media messages: interactive message

Verification code template example

Marketing template example

Response example

Multimedia messages

media message

When messageType is (image, video, audio, document), you can send a media message.

Field

Data type

Required

Description

link

String

Yes

Resource access URL, this address must be accessible from the public internet

caption

String

No

Title or description. When messageType=audio, this property cannot be filled

filename

String

No

Required when messageType=document

location message

When messageType is location, you can send a location message.

Field

Data type

Required

Description

latitude

String

Yes

Latitude e.g.: 31.23593

longitude

String

Yes

Longitude e.g.: 31.23593

name

String

Yes

Location name, Pizza Hut

address

String

Yes

Address xxxx Road No.666

contacts message

When messageType is contacts, you can send a contacts message.

Field

Data type

Required

Description

name

Object[]

Yes

Name

├─formattedName

String

Yes

Full name

├─firstName

String

No

Last name

├─lastName

String

No

Given name

├─middleName

String

No

Middle name

├─suffix

String

No

Prefix

├─prefix

String

No

Suffix

phones

Object[]

No

Mobile number

├─type

String

Yes

Type: HOME/WORK

├─phone

String

Yes

Mobile number

├─waID

String

Yes

Unique identifier of the WhatsApp Business Account

org

Object[]

No

Organization/department

├─company

String

Yes

Company name

├─department

String

Yes

Department

├─title

String

Yes

Position

addresses

Object[]

No

Address

├─type

String

No

Type: HOME/WORK

├─street

String

No

Street info: XX Street No. XX

├─city

String

No

City: Beijing

├─state

String

No

State abbreviation, Contact's State

├─zip

String

No

Postal code: 000001

├─country

String

No

Country

├─countryCode

String

No

Country code

birthday

String

No

Birthday

emails

Object[]

No

Email

├─type

String

Yes

Type: HOME/WORK

├─email

String

Yes

urls

Object[]

No

Website

├─type

String

Yes

Type: HOME/WORK

├─url

String

Yes

Website https://www.chuanglan.com/

When messageType is interactive, you can send interactive messages.

Field

Data type

Required

Description

type

String

Yes

Interactive message types: list/button/product/product_list

header

String

No

Interactive message header: required when type=product_list; header cannot be set for product type; optional for other types. See: InteractiveHeader

├─type

Media type: text/image/video/document

├─link

Media link - required when type is not text

├─caption

Caption - valid when type is not text

├─paramValue

Variable - valid when type=text, supports only one variable

body

Yes

Optional when type=product, required for other message types. See: Body

├─text

Text content

footer

No

Footer - see: Footer

├─text

Text content

action

Yes

Action

├─catalogId

Required when type=product/product_list: The unique identifier of the Facebook catalog linked to your WhatsApp Business Account. This ID can be retrieved via Commerce Manager

├─productRetailerId

Required when type=product/product_list: The unique identifier of the product in the catalog. Single and multi-product messages up to 100 characters.

├─buttons

Button object: see: Button

├─button

Button content: required when type=list, cannot be an empty string

├─sections

Required for list messages (type=list) and multi-product messages (type=product_list). See: Section

Button parameters

Field

Data type

Required

Description

type

String

Yes

Button type: currently selectable value: reply

title

String

Yes

Button title: cannot be an empty string, must be unique within the current message, supports emoji, does not support markdown. Max length: 20 characters

id

String

Yes

Unique identifier for the button. When the user clicks the button, this ID is returned in the webhook. Max length: 256 characters

sections parameters

Field

Data type

Required

Description

title

String

No

Section title: required when there is more than one section in the message: max 24 characters

rows

String

No

Required when message type is list, an array of Row list objects, up to 10. See: Row

productItems

String

No

Required when type=product_list: array of product objects. Each section has at least 1 product, and all sections have up to 30 products. See: ProductItem

Row parameters

Field

Data type

Required

Description

title

String

Yes

Title: maximum length 24 characters

id

String

Yes

Unique Id identifier, maximum length 200 characters

description

String

No

Description

ProductItem parameters

Field

Data type

Required

Description

productRetailerId

String

Yes

The unique identifier of the product in the catalog

Send MMLite message

MMLite can be used only after MMLite API permission is authorized, and only supports sending template marketing messages

Request API endpoint

Request parameters

Field

Data type

Required

Description

wabaId

String

Unique identifier of the WhatsApp Business Account

messageType

String

Message content type: template: template

uid

String

Customer batch number, no more than 32 characters

sendNumber

String

Sending number, format: country code + phone number

recipientNumber

String

Receiving number, format: country code + phone number Multiple numbers separated by commas, up to 1000 numbers

body

String

Message body, required when messageType=text

language

String

Message language (Language abbreviation code must be provided), see Appendix 1, Language Code List Required when messageType=template

templateName

String

Template name. Lowercase letters, numbers, characters and underscores allowed, must be unique. Required when messageType=template

header

Object

Template message header information. See HeaderDto

bodyParams

String[]

Required when there are variables in the template body

buttonParams

Object[]

Required when template button type is dynamic link. See ParameterDto

Request example

Response example

Last updated