We need to export call recording metadata (not the audio files) for our compliance team.
They need a CSV with: conversation ID, date, duration, agent name, queue, and whether the recording exists. The GET /api/v2/recording/conversations/{id}/recordings endpoint works but it is painfully slow - one API call per conversation.
Use the analytics details query with the hasRecording filter instead of querying each conversation individually.
body = {'interval': interval,
'segmentFilters': [{'predicates': [{'dimension': 'mediaType', 'value': 'voice'}]}],
'conversationFilters': [{'predicates': [{'dimension': 'hasRecording', 'value': 'true'}]}]}
result = api.post_analytics_conversations_details_query(body)
This returns all conversations with recordings in a single paginated query.
Under GDPR, exporting recording metadata that includes customer phone numbers constitutes personal data processing.
Your compliance team must have a legal basis for accessing this data. Document the purpose (e.g., regulatory compliance audit) in your Record of Processing Activities before running the export.
Pro tip!
Automate the recording metadata export as a nightly scheduled job!
Don’t wait for compliance to ask for it. Export daily metadata to a secure archive. When they need it, it is ready instantly instead of taking 2 days to extract. Your compliance team will love you! 
From a legal discovery standpoint, the metadata export must be tamper-evident.
We hash each row of the export CSV and store the hash chain in an immutable audit log. If opposing counsel questions whether our metadata was altered, we can demonstrate the integrity chain from the API response to the final CSV.