Wati icon

Wati

Send WhatsApp messages, manage contacts, deliver templates, and download media via Wati API

Message → Get Messages

AI-generated

Summary

Retrieves a paginated list of messages from a specific WhatsApp conversation.

Inputs

  • conversationId (required) — The conversation ID to fetch messages from.
  • pageSize — Number of messages to retrieve per page (default: 20).
  • pageNumber — Page number for pagination (default: 1).

Output shape

an array of items, each containing message data in JSON format

Paginated via pageSize and pageNumber; results are returned as an array of message objects.

Examples

Example 1: Fetch the first page of messages for a conversation

Set conversationId to a specific conversation ID, pageSize to 50, and pageNumber to 1.

Example 2: Retrieve the second page of messages

Keep the same conversationId and pageSize, but set pageNumber to 2.

Links

Discussion