For the complete documentation index, see llms.txt. This page is also available as Markdown.

Message (Message)

Send Message

Request URL

POST

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

Request parameters

Field
Data type
Required
Description

wabaId

String

Unique identifier of the WhatsApp business account

messageType

String

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 use **text: 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 are separated by commas, up to 1000 numbers

body

String

Message body, required when messageType=text

language

String

Message language (language abbreviation code is required), see Appendix 1, Language Code List. Required when messageType=template

templateName

String

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

templateGroupId

String

Template group ID, required when sending with a template group. When using a template group, one template is first retrieved from the template group. If no available template matches, you can configure templateName as a fallback for sending.

header

Object

Template message header information. See HeaderDto

bodyParams

String[]

Required when there are variables in the template body

buttonParams

Object[]

Required when the template button type is dynamic link. See ParameterDto

media

Object

See media message: media message

location

Object

See media message: location message

contacts

Object[]

See media message: contacts message

interactive

Object

See media message: interactive message

namedParams

Object[]

Custom variables by variable name, used when the template's variable format parameterFormat=named. Format: [{"name":"variable name 1","vakue":"value 1"},{"name":"variable name 2","vakue":"value 2"},]

Request example (verification code)

Non-verification code example

Response example

Multimedia message

media message

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

Field
Data type
Required
Description

link

String

Yes

Resource access address; this address must be accessible from the public internet

caption

String

No

Title or description; when messageType=audio, this field cannot be set

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 eg:31.23593

longitude

String

Yes

Longitude eg:31.23593

name

String

Yes

Location name, Pizz Hut

address

String

Yes

Address xxxx Road No.666

contacts message

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

Field
Data type
Required
Description

name

Object[]

Yes

Name

├─formattedName

String

Yes

Full name

├─firstName

String

No

Last name

├─lastName

String

No

First 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 information: 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

Email addressxxxxx@gmail.com

urls

Object[]

No

URL

├─type

String

Yes

Type: HOME/WORK

├─url

String

Yes

URL https://www.chuanglan.com/

interactive message

When messageType is interactive, you can send interactive messages.

Field
Data type
Required
Description

type

String

Yes

Interactive message type: list/button/product/product_list

header

String

No

Interactive message header: required for the product_list type, the header cannot be set for the product type, optional for other types. See: InteractiveHeader

├─type

Media type: text/image/video/document

├─link

Media link is required when type is not text

├─caption

Valid when type is not text

├─paramValue

Valid when type=text, only one variable is supported

body

Yes

Optional when type is 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_type: the unique identifier of the Facebook catalog linked to your WhatsApp business account. This ID can be retrieved through Commerce Manager

├─productRetailerId

Required when type=product/product_type: the unique identifier of the product in the catalog. Up to 100 characters for single-product and multi-product messages.

├─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: current available value: reply

title

String

Yes

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

id

String

Yes

Unique identifier of 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, max 24 characters

rows

String

No

Required when the message type is list, a list object of Row, up to 10. See: Row

productItems

String

No

Required when type=product_list, an array of product objects. Each section must have at least 1 product, and all sections can have at most 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

Unique identifier of the product in the catalog

button message

product message

product_list message

Template message

Template message without parameters (notification/marketing)

With Header, buttons (call, visit website) (notification/marketing)

With Header, no buttons (notification/marketing)

No Header, no buttons, variables (notification/marketing)

No Header, with buttons (2 quick replies) (notification/marketing)

Send MMLite message

MMLite can only be used after authorizing MMLite API permissions, and it only supports sending template marketing messages

Request URL

POST

https://api.innopaas.com/api/whatsapp/v3/lite/submit

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 are separated by commas, up to 1000 numbers

body

String

Message body, required when messageType=text

language

String

Message language (language abbreviation code is required), see Appendix 1, Language Code List. Required when messageType=template

templateName

String

Template name. Lowercase letters, numbers, characters, and underscores are allowed, and it 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 the template button type is dynamic link. See ParameterDto

Request example

Response example

Query message logs

Request URL

POST

https://api.innopaas.com/api/whatsapp/v3/message/log

Request parameters

Field
Data type
Required
Description

messageId

String

No

Message ID

sender

String

No

Outgoing display number

direction

Integer

Yes

Message sending method, 1-outgoing send; 2-incoming user send, default: 1

recipientNumber

String

No

User WhatsApp number

wabaId

String

No

Unique identifier of the WhatsApp business account

templateId

String

No

Template ID

templateName

String

No

Template name

status

String

No

Message status sending (pending) delivered (delivered) read (read) failed (send failed)

category

String

No

Template type. marketing: marketing utility: notification authentication: verification

sendStartTime

String

Yes

Start time format: yyyy-MM-dd HH:mm:ss

sendEndTime

String

Yes

End time format: yyyy-MM-dd HH:mm:ss

page

Integer

Yes

Current page, default: 1

pageSize

Integer

Yes

Number of records per page: default: 10

Request example

Response parameters

Field
Data type
Required
Description

messageId

String

Yes

Message ID

remoteMessageId

String

No

Message ID returned by Meta

sender

String

Yes

Outgoing display number

direction

Integer

Yes

Message sending method, 1-outgoing send; 2-incoming user send, default: 1

recipientNumber

String

No

User WhatsApp number

wabaId

String

No

Unique identifier of the WhatsApp business account

templateId

String

No

Template ID

templateName

String

No

Template name

status

String

Yes

Message status sending (pending) delivered (delivered) read (read) failed (send failed)

category

String

Yes

Template type. marketing: marketing utility: notification authentication: verification service: free-form service message

sendTime

String

Yes

Send timeFormat: yyyy-MM-dd HH:mm:ss

updateTime

String

Yes

Update timeFormat: yyyy-MM-dd HH:mm:ss

messageType

String

Yes

Message content type:template: templatetext: textimage: imagevideo: videoaudio: audiolocation: locationdocument: documentsticker: stickercontacts: contacts​interactive: interactive message

content

JSON

No

Returns different content according to messageType

errorCode

String

No

Error code

errorMessage

String

No

Error description

Response example

When messageType = text, the data format of content

When messageType = template, the data format of content, see the data submitted when sending the message

When messageType is a multimedia type, the data format of content, see the data submitted when sending the message

Message receipt (Read)

Request URL

POST

https://api.innopaas.com/api/whatsapp/v3/chat/message/status/read

Request parameters

Field
Data type
Required
Description

sendNumberId

String

No

Outgoing Sender number ID**( one of sendNumberId and sendNumber is required )**

sendNumber

String

No

Outgoing Sender

wamid

String

Yes

Meta message ID

typing

Bool

No

Whether to display typing; when true, the typing effect can be shown in the client. Default: false

Request example

Response parameters

Field
Data type
Required
Description

code

String

Yes

Status code, 0 success, others failure

success

String

Yes

Request status

message

String

No

Outgoing display number

Response example

Group

Create Group

Request API​Address

POST

https://api.innopaas.com/api/whatsapp/v3//groups

Request parameters

Field
Data type
Required
Description

messaging_product

String

Yes

Message product type, fixed value: whatsapp

subject

String

Yes

Group subject. Maximum 128 characters; leading and trailing whitespace will be removed

description

String

No

Group description. Maximum 2048 characters

join_approval_mode

String

No

How users join after clicking the invitation link: approval_required (join only after join request approval); auto_approve (join directly without approval). Defaults to auto_approve if omitted

invite_config

Object

No

Invitation configuration, JSON object. After the group is created successfully, the platform automatically sends a group invitation link template message to the configured target (asynchronously). If omitted or send_invite is false, it will not be sent; configuration exceptions do not affect group creation acceptance. The serialized object can be at most 4096 characters. Subfields are shown in the table below

invite_config subfields

Field
Data type
Required
Description

send_invite

Boolean

No

Whether to automatically send the group invitation link template message after successful group creation. Defaults to false

notify_language

String

No

Invitation notification template language (such as zh_CN, en); see Appendix 1 language codes in the documentation. Required when send_invite is true. If the invitation template does not exist, the system will automatically create one

wa_ids

String

No

Array of manually specified phone-number invite targets; each element is a phone number string

template_id

String

No

Template ID. The group invitation link template message will preferentially send this template; if the template does not exist, it will fall back to creating a template in the notify_language language

Request example

Response description

Delete Group

Request API​Address

DELETE

https://api.innopaas.com/api/whatsapp/v3/

Request parameters

Field
Data type
Required
Description

GROUP_ID

String

Yes

The ID of the group to delete

Response description

Get Join Requests

Request API​Address

GET

https://api.innopaas.com/api/whatsapp/v3//join_requests

Request parameters

Field
Data type
Required
Description

GROUP_ID

String

Yes

Group ID

Response example

Response parameters

Field
Data type
Required
Description

data[].join_request_id

String

Yes

Join request ID

data[].wa_id

String

Yes

WhatsApp user ID

data[].creation_timestamp

Integer

Yes

Unix timestamp of the join request creation time

paging.cursors

Object

Yes

Pagination cursors (before / after), used for paging queries

Approve Join Requests

Approve the user's join request. Approved users can enter the group by clicking the group invitation link. Successful approval triggers the group_participants_update webhook (user accepted the join request).

Request API​Address

POST

https://api.innopaas.com/api/whatsapp/v3//join_requests

Request parameters

Field
Data type
Required
Description

messaging_product

String

Yes

Message product type, fixed value: whatsapp

join_requests

Array

Yes

List of join request IDs to approve; batch approval is supported

Request example

Response example

Response parameters

Field
Data type
Required
Description

approved_join_requests

Array

Yes

List of successfully approved join request IDs

failed_join_requests[].join_request_id

String

No

Join request ID that could not be approved

errors[].code

Integer

No

Error code, such as 131203 (user has not accepted the new Terms of Service and Privacy Policy)

errors[].message

String

No

Error message, such as (#131203) Recipient has not accepted our new Terms of Service and Privacy Policy.

errors[].title

String

No

Error title, such as Unable to add participant to group

errors[].error_data.details

String

No

Error details

Reject Join Requests

Reject the user's join request. When a rejected user visits the group invitation link again, they will see the "Request to join" button again. Rejecting does not trigger any webhook.

Request API​Address

DELETE

https://api.innopaas.com/api/whatsapp/v3//join_requests

Request parameters

Field
Data type
Required
Description

messaging_product

String

Yes

Message product type, fixed value: whatsapp

join_requests

Array

Yes

List of join request IDs to reject; batch rejection is supported

Request example

Response example

An invitation link is automatically generated when a group is created. This API is used to get the currently valid group invitation link. The returned invite_link always starts with https://chat.whatsapp.com/ ; the only variable part is <LINK_ID>.

Request URL

GET

https://api.innopaas.com/api/whatsapp/v3//invite_link

Request parameters

Field
Data type
Required
Description

GROUP_ID

String

Yes

The group ID whose invitation link you want to retrieve

Response example

Reset the group invitation link. Note: after resetting, all previous invitation links will become invalid.

Request API​Address

POST

https://api.innopaas.com/api/whatsapp/v3//invite_link

Request parameters

Field
Data type
Required
Description

messaging_product

String

Yes

Message product type, fixed value: whatsapp

Request example

Response example

Send a template message carrying the group invitation link to a WhatsApp user. This is done in two steps: first add the group invitation link template in the template library; second send the template message. In the request, provide group_id, and when the message is delivered it will automatically be converted to the corresponding group invitation link. A webhook will be triggered when the user joins the group through the invitation link.

Step 1: Add the group invitation link template (choose one of two methods)

Method 1 (WhatsApp Manager operation): Go to Template Library, click the Group invite link dropdown, check Group invite upon request, select the desired template, name it, and submit for approval. Template approval can take up to 24 hours. After approval, the template can be used to send messages.

Method 2 (query the template library via API):

GET

https://api.innopaas.com/api/whatsapp/v3//message_template_library?category=utility&topic=group_invite_link&language=en

Step 2: Send template message

POST

https://api.innopaas.com/api/whatsapp/v3//messages

Request parameters

Field
Data type
Required
Description

messaging_product

String

Yes

Message product type, fixed value: whatsapp

to

String

Yes

Recipient's WhatsApp phone number

type

String

Yes

Message type, fixed value: template

template.name

String

Yes

Template name (the template name defined in step 1)

template.language.code

String

Yes

Template language code, such as en_US

template.components[].type

String

Yes

Component type, fixed value: body

template.components[].parameters[].type

String

Yes

Parameter type, fixed value: group_id

template.components[].parameters[].group_id

String

Yes

Group ID, automatically converted to the corresponding group invitation link when the message is delivered

Request example

Remove Group Participants

Remove members from the group. Note: after a member is removed, they can no longer join through the group's invitation link. The merchant number that created the group always remains in the group as creator and admin, and cannot be removed through this API. The removal operation triggers the group_participants_update webhook.

Request URL

DELETE

https://api.innopaas.com/api/whatsapp/v3//participants

Request parameters

Field
Data type
Required
Description

messaging_product

String

Yes

Message product type, fixed value: whatsapp

participants

Array

Yes

Array of members to remove, each element in the format {"user": "<phone number or WhatsApp ID>"}. Up to 8 members can be removed at a time; the array cannot be empty

Request example

Response description

Get Group Info

Get the metadata of a single group. Note: if the fields query parameter is not specified, only the group ID and messaging_product are returned.

Request URL

GET

https://api.innopaas.com/api/whatsapp/v3/?fields=

Request parameters

Field
Data type
Required
Description

GROUP_ID

String

Yes

The group ID to query

fields

String

No

Comma-separated list of returned fields, such as "subject,description,participants,join_approval_mode"; if omitted, only the group ID is returned

Description of available fields (fields)

Field
Data type
Required
Description

join_approval_mode

String

No

How users join after clicking the invitation link: approval_required (join only after join request approval); auto_approve (join directly without approval)

subject

String

No

Group subject

description

String

No

Group description (the description set when the group was created)

suspended

Boolean

No

Whether the group has been suspended by WhatsApp

creation_timestamp

Integer

No

Unix timestamp of the group creation time (seconds)

participants

Array

No

List of group members, array of objects in the format [{"wa_id": ""}]

total_participant_count

Integer

No

Total number of group members (excluding the merchant number)

Response example

Get Active Groups

Get a list of all active groups under the business number.

Request URL

GET

https://api.innopaas.com/api/whatsapp/v3//groups?limit=&after=&before=

Request parameters

Field
Data type
Required
Description

limit

Integer

No

The number of groups returned per request. Minimum 1, default 25, maximum 1024

after

String

No

Pagination cursor pointing to the end of a page

before

String

No

Pagination cursor pointing to the beginning of a page

Response example

Response parameters

Field
Data type
Required
Description

data.groups[]

Array

Yes

A list of groups, where each element contains id (group ID), subject (group subject), and created_at (Unix timestamp of the group creation time)

paging

Object

Yes

Pagination object, containing cursors (before / after cursors) and previous / next page links

Update Group Settings

Update the group's subject, description, and avatar. A successful update triggers the group_settings_update webhook.

Request URL

POST

https://api.innopaas.com/api/whatsapp/v3/

Request parameters

Field
Data type
Required
Description

messaging_product

String

Yes

Message product type, fixed value: whatsapp

subject

String

No

New group subject. Maximum 128 characters; cannot be empty if provided

description

String

No

New group description. Maximum 2048 characters

profile_picture_file

String

No

Local image file path for the group avatar. Only image/jpeg is supported; maximum 5MB; must be square (height = width); minimum size 192 x 192. File uploads follow the same request structure as the Upload Media endpoint

Request example

Response example

Group Messaging

Send and receive messages in groups. Supported message types include: text messages, media messages, text templates, and media templates.

Send Group Message

Request URL

POST

https://api.innopaas.com/api/whatsapp/v3//messages

Request parameters

Field
Data type
Required
Description

messaging_product

String

Yes

Message product type, fixed value: whatsapp

recipient_type

String

Yes

Recipient type. Fixed value for group messages: group (individual for regular messages)

to

String

Yes

Target group ID, obtained through the Group API series

type

String

Yes

Message type. Group messages support: text (text); image / video / audio / document / sticker (media); template (template, including text templates and media templates)

text.body

String

Required when type=text

Text message content, maximum 4096 characters

text.preview_url

Boolean

No

Optional when type=text. Whether to preview links in the message text; links must start with http:// or https://

Request example

Response example

Receive Group Messages

Webhook Example (Receive Group Messages)

Group Message Status Webhooks

Pin and Unpin Group Message

Request URL

POST

https://api.innopaas.com/api/whatsapp/v3//messages

Request parameters

Field
Data type
Required
Description

messaging_product

String

Yes

Message product type, fixed value: whatsapp

recipient_type

String

Yes

Recipient type, fixed value: group

to

String

Yes

Target group ID

type

String

Yes

Message type, fixed value: pin

pin.type

String

Yes

Pin action type: pin (pin) or unpin (unpin)

pin.message_id

String

Yes

The message ID to pin or unpin

pin.expiration_days

Integer

Required when pin.type=pin

Pin duration, in days, ranging from 1 to 30

Request example

Response example

最后更新于