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.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
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 . (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.
Return turns that started at or after this Unix epoch timestamp in milliseconds. The boundary is inclusive.
Return turns that started at or before this Unix epoch timestamp in milliseconds. The boundary is inclusive.
If specified, a page of data immediately before this cursor will be returned
If specified, a page of data immediately after this cursor will be returned
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
Meta Business Agent API version
The turns for the conversation
A paginated list of conversation turns
Bad request
Unauthorized
Forbidden
Not found
Too many requests
Server error
GET /insights/conversations/turns?user_phone_number=text HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"data": [
{
"conversation_id": "9876543210",
"e2e_latency_ms": 1850,
"message_id": "wamid.HBgLMTU1NTEyMzQ1NjcVAgASGBQzQTI=",
"steps": [
{
"latency_ms": 320,
"llm_output_preview": "text",
"status": "SUCCESS",
"tool_input": "text",
"tool_name": "get_order_status",
"tool_output": "text",
"type": "TOOL_CALL"
}
],
"timestamp": 1758528000000,
"turn_id": "1234567890"
}
],
"paging": {
"cursors": {
"after": "text",
"before": "text"
},
"next": "text",
"previous": "text"
}
}Last updated
Was this helpful?