Skip to main content
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 download

Request

Endpoint 1: Form Data

Form Parameters:

Endpoint 2: JSON Body

Request Body:

Headers

For API Key Authentication:
For Internal Authentication:

Response

Status: 200 OK Content-Type: application/json Content-Disposition: attachment; filename="conversation-{id}-{date}.json"

Response Structure


Response Fields

Export Metadata

Conversation Object

Summary Object


Authentication

API Key Authentication

Header:
Valid Keys:
  • Active API keys from database
  • Test keys: test-api-key-123, demo-api-key-456

Internal Token Authentication

Headers:
Use Case: Internal service-to-service calls

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_BUCKET environment variable
  • Requires credentials.json for GCP authentication
When Recording is Unavailable:
Reasons:
  • 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: true and exists)
  • ✅ Post-call analysis (if includeAnalysis: true and exists)
  • ✅ Recording URL (if includeRecording: true and GCS configured)

Function Calls

Extracted from transcript JSON:

Use Cases

Export for Compliance

Backup Conversation Data

Share Conversation with Customer



Environment Variables

Required for Full Functionality: Recording Storage:
  • Recordings stored in: gs://{GCS_BUCKET}/recordings/{date}/{filename}.webm
  • Signed URLs expire after 1 day
  • Requires GCP credentials for authentication

Authorizations

Authorization
string
header
required

Your TalkifAI API key. Get it from Studio → Settings → API Keys.

Body

application/json
conversationId
string
required

Room name or conversation ID to export

Example:

"agent_abc123_1705320000_user123"

includeTranscript
boolean
default:true

Include transcript data

includeAnalysis
boolean
default:true

Include post-call analysis

includeRecording
boolean
default:true

Include recording signed URL

Response

Exported conversation JSON file

exportMetadata
object
conversation
object
summary
object