# Get a conversation > One conversation and its messages, 20 per page `get_conversation_detail` returns a conversation from any channel with its messages. Messages come 20 per page, oldest first, as 800-character excerpts; ask for full text or start from the newest when you need to. Find the conversation first with [List conversations](/docs/api-reference/v2/conversations/list-conversations) or [Search conversations](/docs/api-reference/v2/conversations/search-conversations), and pass its `_id`. ```http POST https://api.qwryai.com/public/v1/tools/get_conversation_detail ``` ## Authentication Send your API key as `Authorization: Bearer `, or in an `x-api-key` header. The key needs **Manage conversations and helpdesk**. See [Authentication](/docs/api-reference/v2/authentication). ## Body parameters | Name | Type | Required | Description | | - | - | - | - | | `chatbotId` | `string` | Yes | The agent's id, from [List agents](/docs/api-reference/v2/agents/list-agents). | | `conversationId` | `string` | Yes | The conversation's `_id` from `query_conversations` or `search_conversations`. Not the Chat API's `conversationId`. | | `page` | `integer` | Yes | The page of messages, from `1`. | | `newestFirst` | `boolean` | No | `true` starts from the most recent message. Defaults to oldest first. | | `fullText` | `boolean` | No | `true` returns whole messages instead of 800-character excerpts. | ## Request example > [tab] cURL > > ```bash > curl -X POST 'https://api.qwryai.com/public/v1/tools/get_conversation_detail' \ > -H 'Authorization: Bearer YOUR_API_KEY' \ > -H 'Content-Type: application/json' \ > -d '{ > "chatbotId": "YOUR_AGENT_ID", > "conversationId": "CONVERSATION_RECORD_ID", > "page": 1, > "fullText": true > }' > ``` > [tab] JavaScript > > ```javascript > const response = await fetch("https://api.qwryai.com/public/v1/tools/get_conversation_detail", { > method: "POST", > headers: { > Authorization: "Bearer YOUR_API_KEY", > "Content-Type": "application/json", > }, > body: JSON.stringify({ > chatbotId: "YOUR_AGENT_ID", > conversationId: "CONVERSATION_RECORD_ID", > page: 1, > fullText: true, > }), > }); > const { data } = await response.json(); > for (const message of data.messages) console.log(message.sender, message.content); > ``` > [tab] Python > > ```python > import requests > > response = requests.post( > "https://api.qwryai.com/public/v1/tools/get_conversation_detail", > headers={"Authorization": "Bearer YOUR_API_KEY"}, > json={ > "chatbotId": "YOUR_AGENT_ID", > "conversationId": "CONVERSATION_RECORD_ID", > "page": 1, > "fullText": True, > }, > ) > for message in response.json()["data"]["messages"]: > print(message["sender"], message["content"]) > ``` ## Response ```json { "success": true, "data": { "conversation": { "_id": "CONVERSATION_RECORD_ID", "conversationId": "fd5ae9e1-9b30-4503-b346-ccd4d7ef16a3", "channel": "api", "lifecycle": "open", "routingState": "none", "metadata": { "aiSummary": "Customer asked to change the delivery address on order 1042." }, "timestamps": { "created": "2026-11-30T19:23:43.046Z", "lastActivity": "2026-11-30T19:24:45.362Z" }, "metrics": { "messageCount": 4, "aiMessageCount": 2, "agentMessageCount": 0 }, "insights": { "sentiment": "neutral" } }, "page": 1, "order": "oldest_first", "messages": [ { "id": "0c4f6a2e-8d13-4b7a-b0e9-1a2c3d4e5f60", "sender": "user", "timestamp": "2026-11-30T19:23:43.112Z", "content": "Hi, I'd like to change my delivery address.", "truncated": false }, { "id": "5b0e7c1a-2f4d-4c55-9a51-6d8e3f2b9c10", "sender": "ai", "timestamp": "2026-11-30T19:23:46.904Z", "content": "Of course. What's the order number and the new address?", "truncated": false } ], "mayHaveMore": false } } ``` | Field | Description | | - | - | | `conversation` | The conversation, with the same fields as [List conversations](/docs/api-reference/v2/conversations/list-conversations). | | `order` | `oldest_first` or `newest_first`. | | `messages[].id` | The message's id. | | `messages[].sender` | `user` for the customer, `ai` for the agent, `agent` for a teammate. | | `messages[].timestamp` | When it was sent. | | `messages[].content` | The message text: up to 800 characters, or all of it with `fullText`. | | `messages[].truncated` | `true` when `content` was cut to 800 characters. | | `mayHaveMore` | `true` when this page is full, so there may be another. | To read the whole conversation, raise `page` while `mayHaveMore` is `true`. See [List conversation messages](/docs/api-reference/v2/conversations/list-conversation-messages). ## Errors | HTTP status | Code | When | | - | - | - | | 400 | `INVALID_ARGUMENTS` | `conversationId` isn't a conversation `_id`, or `page` is missing. `issues` lists each one. | | 400 | `CHATBOT_ID_REQUIRED` | The body has no valid `chatbotId`. | | 401 | `API_KEY_REQUIRED` / `INVALID_API_KEY` | No credential, or an unknown, deleted or expired one. | | 403 | `INSUFFICIENT_PERMISSION` | The key doesn't hold **Manage conversations and helpdesk**. | | 404 | `CHATBOT_NOT_FOUND` | No agent with that `chatbotId` in your workspace. | | 413 | `RESULT_TOO_LARGE` | The page is over 40,000 bytes. Leave out `fullText`. | | 429 | `INTEGRATION_RATE_LIMIT_EXCEEDED` | More than 2,000 requests in 15 minutes. | | 500 | `TOOL_FAILED` | The conversation isn't on this agent, or the tool failed on our side. | See [Error Handling](/docs/api-reference/v2/error-handling) for every code.