Export Conversation
Export
Export Conversation
Export complete conversation data including transcript, post-call analysis, and recording URL. Returns a downloadable JSON file.
POST
Export Conversation
Overview
Exports a single conversation’s complete data as a downloadable JSON file. Includes billing session details, agent configuration, transcript, post-call analysis, and recording URL (if available). Authentication: API Key or Internal Token Response: JSON file downloadRequest
Endpoint 1: Form Data
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
conversationId | string | ✅ | — | Room name/conversation ID to export |
includeTranscript | boolean | ❌ | true | Include transcript data |
includeAnalysis | boolean | ❌ | true | Include post-call analysis |
includeRecording | boolean | ❌ | true | Include recording URL |
Endpoint 2: JSON Body
Headers
For API Key Authentication:Response
Status:200 OK
Content-Type: application/json
Content-Disposition: attachment; filename="conversation-{id}-{date}.json"
Response Structure
Response Fields
Export Metadata
| Field | Type | Description |
|---|---|---|
exportMetadata.exportedAt | string | ISO 8601 timestamp |
exportMetadata.organizationId | string | Organization ID |
exportMetadata.conversationId | string | Exported conversation ID |
exportMetadata.dataVersion | string | Data schema version |
exportMetadata.exportType | string | single_conversation |
exportMetadata.includedData | object | What data is included |
exportMetadata.includedData.transcript | boolean | Transcript included |
exportMetadata.includedData.analysis | boolean | Analysis included |
exportMetadata.includedData.recording | boolean | Recording included |
exportMetadata.schemaVersion | string | Schema version |
Conversation Object
| Field | Type | Description |
|---|---|---|
conversation.sessionId | string | Billing session ID |
conversation.roomName | string | Room/conversation ID |
conversation.agentId | string | Agent ID |
conversation.agentName | string | Agent display name |
conversation.sessionType | string | webcall, telephony, chat |
conversation.sessionStatus | string | completed, failed, abandoned |
conversation.agentModel | string | LLM model used |
conversation.agentArchitecture | string | pipeline, realtime, text |
conversation.keyMode | string | talkifai_keys, my_keys, hybrid |
conversation.callDirection | string | inbound or outbound |
conversation.callerPhone | string | Caller phone number |
conversation.calleePhone | string | Destination phone number |
conversation.startTime | string | ISO 8601 timestamp |
conversation.endTime | string | ISO 8601 timestamp |
conversation.duration | number | Duration in seconds |
conversation.baseCost | number | Base infrastructure cost |
conversation.totalCost | number | Total session cost |
conversation.user | object | User details |
conversation.agent | object | Agent configuration |
conversation.transcript | object | Transcript data (if included) |
conversation.postCallAnalysis | object | Analysis data (if included) |
conversation.recording | object | Recording data (if included) |
Summary Object
| Field | Type | Description |
|---|---|---|
summary.hasTranscript | boolean | Transcript exists |
summary.hasAnalysis | boolean | Analysis exists |
summary.hasRecording | boolean | Recording exists |
summary.hasFunctionCalls | boolean | Function calls in transcript |
summary.recordingAvailable | boolean | GCS bucket configured |
summary.duration | number | Call duration |
summary.callCompleted | boolean | Has end time |
summary.isTelephonyCall | boolean | Phone call (not web) |
summary.hasBillingInfo | boolean | Has cost data |
Authentication
API Key Authentication
Header:- Active API keys from database
- Test keys:
test-api-key-123,demo-api-key-456
Internal Token Authentication
Headers:Error Responses
401 Unauthorized
400 Bad Request
404 Not Found
500 Server Error
Examples
cURL (Form Data)
cURL (JSON)
JavaScript (Fetch)
Python (Requests)
Next.js (Download)
Recording Signed URLs
How it works:- Recording URLs are Google Cloud Storage signed URLs
- Expiry: 1 day from export time
- Requires
GCS_BUCKETenvironment variable - Requires
credentials.jsonfor GCP authentication
includeRecording: false- GCS bucket not configured
- Recording file not found
- Storage client initialization failed
Data Included in Export
Always Included
- ✅ Billing session details
- ✅ Agent configuration
- ✅ Call metadata (duration, cost, timestamps)
- ✅ User information (if available)
Conditionally Included
- ✅ Transcript (if
includeTranscript: trueand exists) - ✅ Post-call analysis (if
includeAnalysis: trueand exists) - ✅ Recording URL (if
includeRecording: trueand GCS configured)
Function Calls
Extracted from transcript JSON:Use Cases
Export for Compliance
Backup Conversation Data
Share Conversation with Customer
Related Endpoints
- List Call Logs — List all conversations
- Get Transcript — Get transcript only
- Get Recording — Get recording URL
- Get Analysis — Get analysis results
Environment Variables
Required for Full Functionality:| Variable | Description | Example |
|---|---|---|
GCS_BUCKET | Google Cloud Storage bucket | talkifai-recordings |
INTERNAL_TOKEN | Internal service token | your-secret-token |
credentials.json | GCP service account key | File in root directory |
- Recordings stored in:
gs://{GCS_BUCKET}/recordings/{date}/{filename}.webm - Signed URLs expire after 1 day
- Requires GCP credentials for authentication
Authorizations
Your TalkifAI API key. Get it from Studio → Settings → API Keys.
Body
application/json