Nashir WhatsApp icon

Nashir WhatsApp

Send and manage WhatsApp messages via nashir.ai

Get Conversation History

AI-generated

Summary

Retrieve the recent message history of a WhatsApp conversation with a specified phone number.

Inputs

  • Phone Number (required) — Phone number in international format to identify the conversation.
  • Limit — Number of messages to return, with the most recent messages first; defaults to 20.
  • Account ID — Optional identifier of the receiving WhatsApp number (social_accounts.id) to scope the conversation history to a specific account to avoid interleaving transcripts from multiple numbers. Leave empty for unscoped history.

Output shape

A list of message objects representing the conversation history with the specified phone number.

Messages are returned ordered from most recent to older, limited by the 'Limit' parameter. If 'Account ID' is provided, history is scoped to that account; otherwise, all accounts may be included. Errors related to invalid phone number or conversation not found are handled and returned depending on node error handling configuration.

Links

Discussion