# Conversations

Conversations let an integration send a customer's request to the site's assistant and read the reply history.

## Find a conversation

Read `GET /conversations?siteId=SITE_ID` or call `list_conversations`. Use an existing site conversation from the dashboard. Keep its `conversationId` with the `siteId`; a conversation from another site cannot be used interchangeably.

## Send a message

`POST /conversations/{conversationId}/messages` · MCP: `send_message`

```json
{
  "siteId": "01K50000000000000000000001",
  "content": "What changes are waiting for my approval?",
  "idempotencyKey": "owner-message-001"
}
```

Supply `content` or `attachmentIds`. An attachment-only message needs ready upload IDs belonging to this site, with at most 10 attachments. Messages sent through this operation always have the user role.

The result contains `messageId`, `conversationId`, `created`, `queued`, and `deduplicated`. A message receipt is not an assistant reply. `queued: false` does not mean the stored message was lost; processing can continue through the message stream. Reuse the idempotency key if a transport failure requires a retry.

## Read replies

Use `GET /conversations/{conversationId}/messages?siteId=SITE_ID` or `list_messages`. Follow returned cursors, bound your polling interval, and stop polling when your application's deadline is reached.

## Visitor chat

Visitor conversations are a separate interface under `/sites/{siteId}/visitor-conversations/{visitorConversationId}`. Use `list_visitor_messages`, `send_visitor_message`, and `set_visitor_chat_mode` for visitor history, staff replies, and assistant handoff. Keep owner conversations and visitor conversation IDs separate.
