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

Historical messages

Field
Data type
Required
Description

wabaId

String

Yes

WabaId

sender

String

Yes

sender number

phoneNumberId

String

Yes

sender ID

history

Array

No

The business phone number display name collected when creating the number, or the name submitted when editing an approved display name

--metadata

No

-- --phase

Integer

Yes

Parameter value to monitor stage progress. The value2indicates the current stage has completed. Indicates history recordsstage. The value can be: * 0— Indicates messages from day 0 (merchant onboarding time) to day 1* 1— Indicates messages from day 1 to day 90* 2— Indicates messages from day 90 to day 180

-- --chunk_order

Integer

Yes

The parameter value orders these chunks in sequence, since they may not be delivered in order. Indicateschunknumber, which can be used to sort a series of Webhooks.

-- --progress

Integer

Yes

Parameter value to monitor overall progress. The value100indicates synchronization is complete. Indicates the total percentage of sync progress. The minimum value is0, maximum value is100.

--threads

No

-- --id

String

Yes

The WhatsApp user's phone number.

-- --messages

String

Yes

Message array

-- -- --from

String

Yes

Business customer's phone number or the WhatsApp user's phone number. If this value is the business's phone number, the message object describes a message sent by the business to the WhatsApp user. If this value is the WhatsApp user's phone number, the message object describes a message sent by the WhatsApp user to the business.

-- -- --id

String

Yes

WhatsApp message ID.

-- -- --timestamp

String

Yes

Unix timestamp indicating when the recipient's device received the message. Example: 1738796547

-- -- --type

String

Yes

Message type. Note that this placeholder appears twice in the above syntax because it is used both astypea placeholder for the attribute value and its matching attribute name. Seethe Payload example below, to see a conversation containing various message types. If this value is set tomedia_placeholder, then the message object describes a message containing media assets. In this case, the message content will be ignored. Instead, a separate history Webhook will later be sent describing the message content and media asset ID, but only for messages sent within the two weeks prior to the query. See below for thePayload example.

-- -- --text

Object

An object describing the message content. This value varies depending on the message type and message content. For example, if the business sends animagemessage, this object will not containcaptionproperty. SeeSend message, for Payload examples for each message type.

-- -- -- --body

String

-- -- --history_context

Object

Yes

-- -- -- --status

String

Yes

Indicates the latest delivery status of the message. The value can be: * DELIVERED* ERROR* PENDING* PLAYED* READ* SENT

errors

String

No

The following Webhook examples describe two message conversations: (1) a conversation containing a text message and a video message sent to a WhatsApp user, and the WhatsApp user's reply; (2) a conversation containing a text message sent to another WhatsApp user (thanking the user for placing an order).

Note that the media message content in the first conversation is not described, but instead triggersthe second Webhook, which describes the content of that media message.

The following Webhook example describes the content of the media message.

Chat history sharing has been denied

最后更新于