---
name: "chat_wait"
area: "chat"
title: "Wait for visitor messages"
price: "free"
method: "POST"
url: "https://api.conecto.chat/v1/tools/chat_wait"
mcp_server: "https://api.conecto.chat/mcp/chat"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/chat/chat_wait"
---

# Wait for visitor messages (`chat_wait`)

Waits for the next visitor message, for an agent without a server to receive webhooks.

Listen to the website chat without a server: returns as soon as a visitor writes (or after timeout_seconds with no messages). Pass next_after from the previous call as after, and call again after call_again_in_seconds to keep listening (it is 60 when nobody is on the website, so the call answers at once); the first call also lists conversations still waiting for an answer. While you listen, the widget shows the business as online. A server should subscribe a webhook to chat.message_received instead.

Price: Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads. A call that fails costs nothing.

## Use it when

The agent answers the chat live without a server: call it again and again, passing after.

- For messages pushed to a server as they arrive, use [notify_subscribe](https://conecto.chat/tools/notify/notify_subscribe.md).

## Say this to your agent

> Keep an eye on the website chat this afternoon and answer anyone who writes.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `after` | integer | no | next_after from the last call. At least 0. |  |  |
| `timeout_seconds` | integer | no | 0 to 25. |  | `25` |

## Example

Written for Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon.

MCP: call `chat_wait` on the MCP server `https://api.conecto.chat/mcp/chat` with these arguments:

```json
{
  "after": 48211,
  "timeout_seconds": 25
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/chat_wait \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"after": 48211, "timeout_seconds": 25}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "chat_wait",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.00",
  "balance_usd": "$19.75",
  "result": {
    "next_after": 4101,
    "messages": [
      {
        "conversation_id": 4101,
        "message_id": 4101,
        "text": "Hi! Does the Tabor ship to Seattle, and how long does it take?",
        "at": "2026-10-14T08:00:00+00:00",
        "visitor": {
          "name": "Lisa Moreno",
          "email": "lisa.moreno@example.com"
        },
        "page": null
      }
    ],
    "call_again_in_seconds": 0
  }
}
```

`result`: New visitor messages, each with its conversation_id, message_id, text, time, visitor and page, and next_after for the next call. The first call also lists the conversations waiting for an answer, and call_again_in_seconds: 60 when nobody is on the website (the call answered at once), else 0.

## Errors

This tool has no errors of its own.

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [chat_setup](https://conecto.chat/tools/chat/chat_setup.md): Creates or changes the business's website chat widget and who answers it, and returns the snippet for the website. $0.001 a call.
- [chat_get_setup](https://conecto.chat/tools/chat/chat_get_setup.md): The website chat's settings, its embed snippet, how messages reach the agent and this month's cost. Free up to 1,000,000 reads a month.
- [chat_list_conversations](https://conecto.chat/tools/chat/chat_list_conversations.md): The website chat and email conversations, newest activity first, with who it is and the last message. Free up to 1,000,000 reads a month.
- [chat_get_conversation](https://conecto.chat/tools/chat/chat_get_conversation.md): One conversation with all its messages, from the visitor and from the business. Free up to 1,000,000 reads a month.
- [chat_typing](https://conecto.chat/tools/chat/chat_typing.md): Shows the visitor that the business is typing, for about 8 seconds. Free.
- [chat_reply](https://conecto.chat/tools/chat/chat_reply.md): Answers a website visitor as the business, with product cards, images or buttons if you like. Free.
- [chat_create_ticket](https://conecto.chat/tools/chat/chat_create_ticket.md): Opens a help desk ticket from a chat that needs follow-up by email, with the chat so far as the request. $0.01 a call.
- [chat_close](https://conecto.chat/tools/chat/chat_close.md): Closes a conversation once it is handled, or opens it again. $0.001 a call.
