> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/mba/api-ref/insights/get-conversation-turns.md).

# Get conversation turns

Retrieve the ordered turns from the most recent conversation with the specified user, identified by their phone number or Business-Scoped User ID (BSUID). Each turn includes a stable turn ID and the available observed steps. Latency, status, and model output fields are included only when available. Malformed records and tool responses that cannot be matched to a tool call may be omitted.

```json
{"openapi":"3.1.0","info":{"title":"Business Agent API","version":"1.51.5"},"tags":[{"name":"Insights","description":"Endpoints for retrieving the agent's usage insights"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"insights.ConversationTurnsResponse":{"description":"A paginated list of conversation turns","properties":{"data":{"description":"This array represents the page of data returned","items":{"$ref":"#/components/schemas/insights.BizAIOmniChannelConversationTurn"},"type":"array","uniqueItems":false},"paging":{"$ref":"#/components/schemas/pagination.Paging","description":"Cursor pagination"}},"required":["data"],"type":"object"},"insights.BizAIOmniChannelConversationTurn":{"description":"A single turn of a conversation with its observed steps","properties":{"conversation_id":{"description":"App-scoped opaque identifier for the conversation containing this turn","type":"string"},"e2e_latency_ms":{"description":"Elapsed time, in milliseconds, from when the agent receives the customer message that starts the turn until the agent finishes producing its response, including model and tool-call processing time, if available","type":"integer"},"message_id":{"description":"WhatsApp Cloud API message ID for the customer message that started the turn, reconstructed for the authorized consumer identity when available","type":"string"},"steps":{"description":"Ordered steps observed during the turn","items":{"$ref":"#/components/schemas/insights.BizAIOmniChannelConversationTurnStep"},"type":"array","uniqueItems":false},"timestamp":{"description":"Timestamp of the turn in milliseconds since epoch, if available","type":"integer"},"turn_id":{"description":"Stable identifier for the turn","type":"string"}},"required":["conversation_id","steps","turn_id"],"type":"object"},"insights.BizAIOmniChannelConversationTurnStep":{"description":"A single step observed during a conversation turn","properties":{"latency_ms":{"description":"Latency for the step in milliseconds, if available","type":"integer"},"llm_output_preview":{"description":"A truncated preview of the model output, for LLM calls","type":"string"},"status":{"description":"The step status: SUCCESS, ERROR, or TIMEOUT","enum":["SUCCESS","ERROR","TIMEOUT"],"type":"string"},"tool_input":{"description":"The input arguments passed to the tool, for tool calls","type":"string"},"tool_name":{"description":"The name of the tool used by this step, for tool calls","type":"string"},"tool_output":{"description":"The output returned by the tool, for tool calls","type":"string"},"type":{"description":"The type of step: LLM_CALL or TOOL_CALL","enum":["LLM_CALL","TOOL_CALL"],"type":"string"}},"required":["type"],"type":"object"},"pagination.Paging":{"description":"Cursor pagination. next/previous point back at this API; follow them directly, or page manually with the after/before query parameters","properties":{"cursors":{"$ref":"#/components/schemas/pagination.Cursors","description":"Page cursors"},"next":{"description":"URL of the next page as issued by Meta","type":"string"},"previous":{"description":"URL of the previous page as issued by Meta","type":"string"}},"type":"object"},"pagination.Cursors":{"properties":{"after":{"description":"Cursor of the next page","type":"string"},"before":{"description":"Cursor of the previous page","type":"string"}},"type":"object"},"insights.StandardError":{"description":"Standard error response for Meta Business Agent endpoints","properties":{"detail":{"description":"Human-readable explanation of the error","type":"string"},"status":{"description":"HTTP status code","type":"integer"},"title":{"description":"Short, human-readable summary of the problem","type":"string"},"type":{"description":"A URI reference identifying the problem type","type":"string"}},"type":"object"}}},"paths":{"/insights/conversations/turns":{"get":{"description":"Retrieve the ordered turns from the most recent conversation with the specified user, identified by their phone number or Business-Scoped User ID (BSUID). Each turn includes a stable turn ID and the available observed steps. Latency, status, and model output fields are included only when available. Malformed records and tool responses that cannot be matched to a tool call may be omitted.","operationId":"get-conversation-turns","parameters":[{"description":"Meta Business Agent API version","in":"header","name":"X-API-Version","schema":{"enum":["2.0.0"],"type":"string"}},{"description":"The consumer whose conversation turns should be retrieved. Accepts either a phone number in digits-only form (country code included, no leading +, spaces, or separators, e.g. 15551234567), or a Business-Scoped User ID (BSUID) - a stable per-business identifier WhatsApp assigns to a consumer, formatted <country>.<digits> (e.g. US.2788620304833812). Any other phone-number formatting returns Consumer not found. Prefer the BSUID for any consumer who has ever adopted a WhatsApp username: their phone number may not be on file for your business, so a phone-number lookup can return Consumer not found even after the consumer deletes the username, while the BSUID resolves for any consumer who has messaged your business. BSUIDs arrive in webhook payloads as messages[].from_user_id, message_echoes[].to_user_id, statuses[].recipient_user_id, contacts[].user_id, and state_sync[].contact.user_id. The conversation_id returned by the agent_test endpoint is also accepted. The server detects which type was provided based on the value format.","in":"query","name":"user_phone_number","required":true,"schema":{"type":"string"}},{"description":"Return turns that started at or after this Unix epoch timestamp in milliseconds. The boundary is inclusive.","in":"query","name":"start_timestamp_ms","schema":{"type":"integer"}},{"description":"Return turns that started at or before this Unix epoch timestamp in milliseconds. The boundary is inclusive.","in":"query","name":"end_timestamp_ms","schema":{"type":"integer"}},{"description":"If specified, a page of data immediately before this cursor will be returned","in":"query","name":"before","schema":{"type":"string"}},{"description":"If specified, a page of data immediately after this cursor will be returned","in":"query","name":"after","schema":{"type":"string"}},{"description":"The maximum number of objects that may be returned. A query may return fewer than this due to filtering, so use the absence of a next link rather than a short page to detect the end of the list","in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.ConversationTurnsResponse"}}},"description":"The turns for the conversation"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Server error"}},"summary":"Get conversation turns","tags":["Insights"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.360dialog.com/docs/mba/api-ref/insights/get-conversation-turns.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
