WaliChat icon

WaliChat

Interact with WaliChat WhatsApp API

Actions148

Outbound Messages → Search Messages

AI-generated

Overview

The "Search Messages" operation under the "Outbound Messages" resource allows users to query and filter outbound WhatsApp messages sent via the WaliChat API. This node is useful for retrieving message records based on various criteria such as status, delivery state, sender agent, message type, date ranges, and more. It supports pagination and sorting, enabling efficient browsing through large sets of messages.

Practical examples include:

  • Fetching all messages that failed to deliver within a specific time frame.
  • Retrieving messages sent by a particular agent or device.
  • Searching messages containing certain keywords or sent to specific phone numbers.
  • Expanding related entities like device info, agent details, or message events for deeper insights.

Properties

Name Meaning
Filters A collection of filters to narrow down the search results. Contains the following options:
- Search Term Text to search in message content, phone number, group, or message IDs.
- Status Filter messages by their current status. Options: Queued, Processing, Sent, Delivered, Read, Failed, Pending.
- Delivery Status Filter messages by delivery status. Options: Pending, Sent, Delivered, Read, Failed.
- Webhook Status Filter messages by webhook callback status. Options: Pending, Success, Failed.
- Include Expand sub-entities per message. Options: Device, Agent, Events.
- Message IDs Filter by specific message IDs (multiple values allowed).
- Agent IDs Filter messages sent by specific agent IDs (multiple values allowed).
- Source Origin of message creation. Options: API, Web Chat.
- Target Type Kind of chat target. Options: User, Group, Channel.
- Message Type Filter messages by type. Options: Text, Image, Video, Audio, Voice, Document, Location, Contact, Buttons, List, Template.
- WhatsApp IDs Filter by WhatsApp message IDs (multiple values allowed).
- Device IDs Filter by specific device IDs (multiple values allowed).
- Device Filter by a single device ID or phone number.
- Reference Filter by message reference (multiple values allowed).
- Priority Filter by message priority. Options: Low, Normal, High, Urgent.
- Phone Number Filter by target phone number in E.164 format.
- Group ID Filter by target group WhatsApp ID (depends on selected device).
- Channel ID Filter by target channel WhatsApp ID.
- Delivery After Only include messages scheduled for delivery after this date/time.
- Delivery Before Only include messages scheduled for delivery before this date/time.
- Created After Only include messages created after this date/time.
- Created Before Only include messages created before this date/time.
- Sort Sort order for results. Options: Recent First (date descending), Oldest First (date ascending).
- Results Page Size Number of results per page (pagination size). Default is 20.
- Page Number Page number to retrieve, starting from 0.

Output

The output is an array of JSON objects representing the matched outbound messages according to the applied filters. Each object contains message details such as IDs, status, delivery information, timestamps, sender and recipient data, message content, and optionally expanded sub-entities like device info, agent details, and event logs if requested.

If binary data is included (not typical for this operation), it would represent associated files or media linked to messages, but this operation primarily returns structured JSON data about messages.

Dependencies

  • Requires an active connection to the WaliChat WhatsApp API using a valid API key credential.
  • The node depends on the WaliChat API endpoints for outbound messages.
  • No additional environment variables are explicitly required beyond the API authentication setup.

Troubleshooting

  • Common Issues:

    • Incorrect or missing API key credential will cause authentication failures.
    • Using invalid filter values (e.g., wrong date formats or unsupported IDs) may result in errors or empty results.
    • Pagination parameters out of range might return no data.
    • Filtering by dependent fields (e.g., Group ID requires a selected Device) must be respected to avoid errors.
  • Error Messages:

    • Authentication errors typically indicate invalid or expired API keys; reconfigure credentials.
    • Validation errors on filters suggest checking input formats and dependencies between fields.
    • Network or API downtime issues require retrying later or verifying connectivity.

Links and References

Discussion