Kapso API icon

Kapso API

Send WhatsApp messages, templates, flows, media, contacts, broadcasts, and inbox records through Kapso. Choose a resource, then follow each operation setup hints.

Message → List Messages

AI-generated

Summary

Retrieve a list of messages from a connected Kapso WhatsApp number with optional filtering and pagination controls.

Inputs

  • Phone Number Name or ID (required) — Select or specify the Kapso WhatsApp phone number connected to your Kapso project to filter messages related to that number.
  • Return All — Choose whether to return all matching messages or limit results to a specified count.
  • Per Page — Set the number of messages per request when not returning all messages (minimum 1, maximum 100).
  • After Cursor (optional) — Use this cursor to retrieve the next page of messages, for cursor-based pagination.
  • Before Cursor (optional) — Use this cursor to retrieve the previous page of messages, for cursor-based pagination.
  • Conversation ID (optional) — Filter messages by the Kapso conversation UUID to restrict results to a specific conversation.
  • Custom Response Fields (optional) — Override the default set of response fields returned by specifying custom Meta fields query.
  • Direction (optional) — Filter listed messages by direction: inbound, outbound, or all.
  • Since (optional) — Include only messages created on or after this ISO 8601 timestamp.
  • Status (optional) — Filter messages based on delivery status: pending, sent, delivered, read, failed, or all.
  • Until (optional) — Include only messages created on or before this ISO 8601 timestamp.

Output shape

a list of message records matching the specified filters and pagination parameters

Supports cursor-based pagination using 'After Cursor' and 'Before Cursor'. When 'Return All' is false, limits results to 'Per Page'. Filters such as Conversation ID, Message Direction, Status, and date range (Since/Until) narrow the message list returned. Custom response fields can override the default fields returned by the API.

Links

Discussion