This is caused by a mismatch between the report type and the data granularity requested. The /api/v2/analytics/conversations/details endpoint returns aggregated conversation-level metrics, not the raw JSON transcript objects. When you set includeTranscripts: true in the details query, you are asking for a boolean flag or a summary count, not the actual text segments.
To retrieve the actual transcript data, you need to query the conversations/voice/details specific endpoint or use the conversations/voice/transcripts endpoint if you need the raw ASR output. The analytics API is designed for metrics, not raw data retrieval.
Here is the correct SDK call using the PureCloudPlatformClientV2 Python library to get the transcripts via the conversations API, assuming you have the conversation IDs:
from platformclientv2.rest import ApiException
# Assuming you have the conversation IDs from the initial query
conversation_ids = ["id1", "id2"]
for conv_id in conversation_ids:
try:
# Fetch specific voice transcript
transcript = client.conversations_api.get_conversations_voice_transcripts(
conversation_id=conv_id,
include_transcripts=True
)
print(transcript.transcripts)
except ApiException as e:
print(f"Exception when calling ConversationsApi->get_conversations_voice_transcripts: {e}")
Make sure your OAuth token has the analytics:report:read and conversation:view scopes. The analytics endpoint will never return the full transcript text due to payload size limitations.
The problem is that includeTranscripts in the details endpoint only flags presence, it doesn’t return the segments. use /api/v2/analytic/conversations/voice/details instead.
# use the voice-specific endpoint for actual text segments
resp = client.analytics_api.post_analytics_conversations_voice_details(query_body)
Check your query’s date range and segment count limits. The voice details endpoint returns paginated results, and missing segments usually indicate hitting the default 100-item cap or an empty time window. Verify the nextPageLink in the response header before assuming data absence.
The problem here is relying on the generic details endpoint for raw text. The documentation states “voice details endpoint returns transcript segments”.
In my C# integrations, I use the specific voice API.
var result = await client.AnalyticsApi.PostAnalyticsConversationsVoiceDetailsAsync(body);
This returns the actual Transcript array. The generic endpoint only returns metadata.