> ## Documentation Index
> Fetch the complete documentation index at: https://docs.greentick.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Reply to a WhatsApp chat with MCP

> Have an assistant read a WhatsApp thread and send session text inside the 24-hour customer service window.

Session text is a free-form reply. It works only inside the 24-hour customer service window, counted from the customer's last message. Outside that window, WhatsApp rejects it and the assistant sends an approved template instead.

## Ask this

```text theme={null}
Find the latest open chat from +14155550123, show me the last customer message, and reply: "Thanks, we have your request and will update you today." Send that text only if the 24-hour window is still open.
```

## What the assistant calls

**1. Find the thread**

`list_conversations` finds the chat. Pass `phoneNumberRef` when the account has more than one sending number. `list_conversation_messages` reads that conversation `id`.

**2. Send text**

After you ask it to send, `send_message` uses `type: text`, the `text` body, and `to` with the country code. GreenTick strips formatting and validates the number before it calls WhatsApp.

Text cannot be scheduled. `scheduledAt` on a text message returns `INVALID_SCHEDULE`. A failed send was not delivered. The assistant reports the error and stops.

Details are on [Messages](https://docs.greentick.ai/mcp/messages.md). If the window is closed, use [Send an approved template](https://docs.greentick.ai/mcp/use-cases/send-approved-template.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.