Ayra AI
|Docs

Conversation APIs

Programmatic Access to Conversation Data

Every phone call handled by your AI voice agents generates a conversation record containing the complete interaction history, metadata, analytics, and outcomes. The Conversation APIs provide programmatic access to this rich dataset.

Understanding Conversation Data

Conversation data is the foundation for understanding customer needs, improving agent performance, measuring business impact, and deriving actionable insights from voice interactions.

The Conversation APIs enable you to:

Build Custom Analytics

Create dashboards showing exactly the metrics you care about

Export to External Systems

Integrate conversation data with business intelligence tools

Analyze Patterns

Identify trends and patterns across conversations

Automate Workflows

Trigger actions based on conversation outcomes

Conversation Lifecycle

Conversations progress through several states from initiation to completion:

In Progress

Call is currently active. Partial conversation data is available in real-time including current duration, detected topics so far, and sentiment analysis of the conversation up to this point.

Completed

Call has ended normally. Full conversation data is available including complete transcript, final duration and metrics, outcome classification, and recording if enabled.

Failed

Call encountered technical issues. Error information and partial data may be available showing failure reason, duration until failure, and any captured audio or transcript before failure.

Abandoned

Caller hung up before connecting. Minimal data available with timestamp, caller ID if available, and abandonment reason (busy, no answer, caller hangup).

Understanding conversation states helps you query the appropriate data and handle edge cases in your integrations.

Conversation Data Structure

Each conversation contains comprehensive information across several categories:

Basic Metadata

Conversation ID, agent ID, start and end timestamps, duration in seconds, caller phone number, and current status.

Conversation Content

Full transcript of the conversation, call recording URL if enabled, detected language, and conversation summary.

Analytics

Sentiment analysis (positive, neutral, negative), detected topics and keywords, customer satisfaction indicators, and intent classification.

Outcomes

Conversation result (resolved, transferred, appointment booked, etc.), actions taken during the call, follow-up tasks created, and integration data (tickets created, CRM updates, etc.).

Technical Details

Voice platform used, voice quality metrics, network information, and any errors or issues encountered.

This rich data structure enables sophisticated analysis and automation based on conversation details.

Available Endpoints

GET
/v1/conversations

List Conversations

Retrieve paginated list with filtering, searching, and sorting

GET
/v1/conversations/{id}

Get Conversation Details

Retrieve complete details including transcript and recording

GET
/v1/conversations/{id}/transcript

Get Transcript

Retrieve transcript in various formats (JSON, text, SRT, VTT)

Ready to transform your agency?

Start building with Ayra today. No credit card required.