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

# By conversation

Send `x-conversation-id` on each search in one shopper conversation. Channel3 stores that id with the search and groups every catalog call that sends the same value: search, browse, image search, similar products, and product detail. A click or sale that comes from one of those searches stays on the conversation.

> [!NOTE]
>
> **Strongly recommended** for better analytics. A session is much easier to read when every call shares the id.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST https://api.trychannel3.com/v1/search \
  -H "x-api-key: $CHANNEL3_API_KEY" \
  -H "x-user-id: user_abc123" \
  -H "x-conversation-id: chat_abc123" \
  -H "Content-Type: application/json" \
  -d '{"query": "running shoes"}'
```

```typescript theme={"theme":{"light":"github-light","dark":"github-dark"}}
await client.products.search({
  query: "running shoes",
  "x-user-id": "user_abc123",
  "x-conversation-id": "chat_abc123",
});
```

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
client.products.search(
    query="running shoes",
    user_id="user_abc123",
    conversation_id="chat_abc123",
)
```

Use a stable id from your app for that conversation. 1–64 characters: letters, numbers, underscores, and hyphens. Send the same value on every later call in the session.

Those grouped sessions show up in your Channel3 dashboard. [Clicks](/docs/guides/reporting/clicks.md) and [sales](/docs/guides/reporting/sales.md) filter by [`user_id`](/docs/guides/reporting/by-user). They do not take a conversation id.

Send `x-conversation-id` when your app calls `/v1/search` itself. The [Conversational Agent](/docs/conversations.md) is a separate path: pass `conversation_id` in the body of `POST /v1/conversations` to continue a thread, and Channel3 groups the searches that turn runs.


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