Load Older Messages
wa_load_historyAsk the account's phone for older messages in one conversation, before the oldest one stored here, and store them. The phone must be online; it usually answers within seconds. Read the result with wa_get_chat and the same chat. Loaded messages are history: they never trigger webhooks and appear in wa_list_messages only with include_history=true. They are kept for your plan's history window like any other message. A conversation needs at least one stored message to page back from.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | Yes | the conversation to page back: a phone number for a direct chat, or a group JID (…@g.us) | |
| count | No | how many older messages to ask the phone for, 1-500; defaults to 50 | |
| account_id | Yes | the account, as returned by wa_list_accounts |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ok (the request reached the phone) or refused (nothing was asked) | |
| refusal | No | present only when status is refused | |
| answered | Yes | the phone answered in time; false means it may still answer later (it must be online) — read the chat again in a minute | |
| imported | Yes | of those, how many were new here; 0 with answered=true usually means you reached the start of what the phone holds | |
| received | Yes | messages the phone sent back |