Read conversation metadata
Use for one conversation’s contact identity, summary, needsReply, response policy and current handoff/review pointers. Discover conversationId with list_conversations. For message contents use list_conversation_messages; for historical handoff/review lifecycle use list_conversation_handoffs. Requires conversations:read. Returns metadata only. conversation.needsReply is the authoritative signal that operator action is required; lastMessageRole describes chronology only. Optional conversation.aiSummary describes main topics and current state. Read summaries first; fetch messages when the summary is absent, isStale is true, or supporting detail is needed. Summaries do not replace authoritative needsReply, booking, payment or delivery fields.
curl --request GET \
--url https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"conversation": {
"conversationId": "<string>",
"tenantId": "<string>",
"channel": "whatsapp",
"participant": {
"id": "<string>",
"displayName": "<string>",
"email": "<string>",
"phone": "<string>",
"username": "<string>",
"avatarUrl": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
},
"unreadCount": 123,
"needsReply": true,
"lastMessageAt": "2023-11-07T05:31:56Z",
"lastMessageText": "<string>",
"lastMessageRole": "<string>",
"messageCount": 123,
"conversationKey": "<string>",
"latestReplyStatus": "queued",
"policyStatus": "active",
"responseMode": "ai",
"frozenUntilAt": "2023-11-07T05:31:56Z",
"needsReplySince": "2023-11-07T05:31:56Z",
"needsReplyReason": "<string>",
"needsReplyDetail": "<string>",
"unreadUpdatedAt": "2023-11-07T05:31:56Z",
"handoffStatus": "none",
"activeHandoffCaseId": "<string>",
"handoffRequestedAt": "2023-11-07T05:31:56Z",
"handoffResolvedAt": "2023-11-07T05:31:56Z",
"handoffReasonCode": "<string>",
"handoffReasonDetail": "<string>",
"handoffIntentId": "<string>",
"handoffTitleKey": "<string>",
"handoffTitleFallback": "<string>",
"handoffOperatorNote": "<string>",
"handoffPropertyId": "<string>",
"handoffPropertyDisplayName": "<string>",
"handoffSeverity": "hard",
"handoffCapturedFieldsDisplay": [
{
"id": "<string>",
"label": "<string>",
"value": "<string>"
}
],
"handoffMissingFieldsDisplay": [
{
"id": "<string>",
"label": "<string>"
}
],
"reviewStatus": "none",
"activeReviewCaseId": "<string>",
"reviewReasonCode": "<string>",
"reviewNote": "<string>",
"reviewRequestedAt": "2023-11-07T05:31:56Z",
"reviewResolvedAt": "2023-11-07T05:31:56Z",
"assignedOperatorId": "<string>",
"assignedOperatorName": "<string>",
"assignedAt": "2023-11-07T05:31:56Z",
"latestReplyAt": "2023-11-07T05:31:56Z",
"manualEnabled": true,
"optedOut": true,
"optedOutAt": "2023-11-07T05:31:56Z",
"optedOutReason": "user_stop",
"lastMessageEventId": "<string>",
"senderId": "<string>",
"recipientId": "<string>",
"handoffAvailability": {
"status": "within_hours",
"timezone": "<string>",
"evaluatedAtLocal": "<string>",
"currentWindow": {
"date": "<string>",
"day": "<string>",
"start": "<string>",
"end": "<string>"
},
"nextWindow": {
"date": "<string>",
"day": "<string>",
"start": "<string>",
"end": "<string>"
}
},
"aiSummary": {
"text": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"throughMessageAt": "2023-11-07T05:31:56Z",
"isStale": true
}
}
}{
"error": {
"code": "M2M_AUTH_INSUFFICIENT_SCOPE",
"message": "M2M credential does not have required scope.",
"details": {
"requiredScopes": [
"conversations:write"
],
"missingScopes": [
"conversations:write"
]
}
}
}{
"error": {
"code": "M2M_AUTH_INSUFFICIENT_SCOPE",
"message": "M2M credential does not have required scope.",
"details": {
"requiredScopes": [
"conversations:write"
],
"missingScopes": [
"conversations:write"
]
}
}
}Authorizations
Server-side tenant-scoped credential created from Build > API Keys.
Path Parameters
Stored conversationId from list_conversations; keep the connected business and conversation unchanged for continuation reads.
Response
Conversation detail
Show child attributes
Show child attributes
curl --request GET \
--url https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.visitoai.com/m2m/v1/conversations/{conversationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"conversation": {
"conversationId": "<string>",
"tenantId": "<string>",
"channel": "whatsapp",
"participant": {
"id": "<string>",
"displayName": "<string>",
"email": "<string>",
"phone": "<string>",
"username": "<string>",
"avatarUrl": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
},
"unreadCount": 123,
"needsReply": true,
"lastMessageAt": "2023-11-07T05:31:56Z",
"lastMessageText": "<string>",
"lastMessageRole": "<string>",
"messageCount": 123,
"conversationKey": "<string>",
"latestReplyStatus": "queued",
"policyStatus": "active",
"responseMode": "ai",
"frozenUntilAt": "2023-11-07T05:31:56Z",
"needsReplySince": "2023-11-07T05:31:56Z",
"needsReplyReason": "<string>",
"needsReplyDetail": "<string>",
"unreadUpdatedAt": "2023-11-07T05:31:56Z",
"handoffStatus": "none",
"activeHandoffCaseId": "<string>",
"handoffRequestedAt": "2023-11-07T05:31:56Z",
"handoffResolvedAt": "2023-11-07T05:31:56Z",
"handoffReasonCode": "<string>",
"handoffReasonDetail": "<string>",
"handoffIntentId": "<string>",
"handoffTitleKey": "<string>",
"handoffTitleFallback": "<string>",
"handoffOperatorNote": "<string>",
"handoffPropertyId": "<string>",
"handoffPropertyDisplayName": "<string>",
"handoffSeverity": "hard",
"handoffCapturedFieldsDisplay": [
{
"id": "<string>",
"label": "<string>",
"value": "<string>"
}
],
"handoffMissingFieldsDisplay": [
{
"id": "<string>",
"label": "<string>"
}
],
"reviewStatus": "none",
"activeReviewCaseId": "<string>",
"reviewReasonCode": "<string>",
"reviewNote": "<string>",
"reviewRequestedAt": "2023-11-07T05:31:56Z",
"reviewResolvedAt": "2023-11-07T05:31:56Z",
"assignedOperatorId": "<string>",
"assignedOperatorName": "<string>",
"assignedAt": "2023-11-07T05:31:56Z",
"latestReplyAt": "2023-11-07T05:31:56Z",
"manualEnabled": true,
"optedOut": true,
"optedOutAt": "2023-11-07T05:31:56Z",
"optedOutReason": "user_stop",
"lastMessageEventId": "<string>",
"senderId": "<string>",
"recipientId": "<string>",
"handoffAvailability": {
"status": "within_hours",
"timezone": "<string>",
"evaluatedAtLocal": "<string>",
"currentWindow": {
"date": "<string>",
"day": "<string>",
"start": "<string>",
"end": "<string>"
},
"nextWindow": {
"date": "<string>",
"day": "<string>",
"start": "<string>",
"end": "<string>"
}
},
"aiSummary": {
"text": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"throughMessageAt": "2023-11-07T05:31:56Z",
"isStale": true
}
}
}{
"error": {
"code": "M2M_AUTH_INSUFFICIENT_SCOPE",
"message": "M2M credential does not have required scope.",
"details": {
"requiredScopes": [
"conversations:write"
],
"missingScopes": [
"conversations:write"
]
}
}
}{
"error": {
"code": "M2M_AUTH_INSUFFICIENT_SCOPE",
"message": "M2M credential does not have required scope.",
"details": {
"requiredScopes": [
"conversations:write"
],
"missingScopes": [
"conversations:write"
]
}
}
}