The Messages API lets you retrieve message history from a conversation and send new messages programmatically. Use it to build chatbots, send automated follow-ups, or read conversation transcripts.Documentation Index
Fetch the complete documentation index at: https://docs.sahut.id/llms.txt
Use this file to discover all available pages before exploring further.
List messages in a conversation
Retrieve all messages in a conversation, ordered oldest to newest.Path parameters
The ID of the conversation.
Query parameters
Page number. Default:
1.Messages per page. Default:
50. Max: 100.Example request
Example response
Message fields
Unique message ID.
incoming (from customer) or outgoing (from agent/bot) or activity (system event).Text content of the message.
Who sent the message. Includes
type (contact, agent, or bot), id, and name.List of attached files. Each attachment has
url, content_type, and file_name.Send a message
Send a new message in a conversation. The message is delivered through the conversation’s channel.Path parameters
The ID of the conversation to send a message in.
Request body
Text content of the message. Required unless sending a template message.
ID of a WhatsApp Message Template to send. Use for outbound WhatsApp messages to customers who haven’t messaged in the last 24 hours.
Key-value pairs for template variable substitution (e.g.,
{"name": "Budi", "order_id": "12345"}).Set to
true to send as an internal note (not visible to the customer). Default: false.Example: send a text message
Example: send a WhatsApp template message
Template messages require a pre-approved WhatsApp Message Template. Create and submit templates for approval in your Meta Business Manager account.