Agent API/Transcripts
Get Transcript
Fetch a single conversation transcript including the full turn-by-turn message history, extracted lead data, and form responses. The transcript must belong to the agent identified by your API key.
GET
https://agent.askhandle.com/api/v1/public/transcripts/{transcriptId}Requires X-API-Key — Your agent API key (pk_live_...)
Request
Headers
X-API-Keystringrequired
Your agent API key (pk_live_...)
Query Parameters
transcriptIdstringrequired
The transcript ID (from List Transcripts)
Response
Success 200
JSON
{
"transcript": {
"id": "cm1abc123def456",
"sender": "conv_abc123",
"channel": "widget",
"status": "completed",
"messageCount": 4,
"startedAt": "2026-03-10T14:22:00.000Z",
"endedAt": "2026-03-10T14:35:00.000Z",
"endedReason": "exit_node",
"needsEscalation": false,
"avgResponseTimeMs": 1840,
"credits": 8,
"history": [
{
"role": "assistant",
"content": "Hi! How can I help you today?"
},
{
"role": "user",
"content": "I need help with my order"
},
{
"role": "assistant",
"content": "Sure! What is your order number?"
},
{
"role": "user",
"content": "It's #12345"
}
],
"extractedLead": {
"name": "Jane Doe",
"email": "jane@example.com",
"phone": null
},
"formResponses": {
"firstName": "Jane",
"email": "jane@example.com"
}
}
}Errors
401
API key missing or invalid
Error
{
"error": "Invalid API key."
}404
Transcript doesn't exist or belongs to a different agent
Error
{
"error": "Transcript not found."
}Code examples
const transcriptId = 'cm1abc123def456';
const res = await fetch(
`https://agent.askhandle.com/api/v1/public/transcripts/${transcriptId}`,
{ headers: { 'X-API-Key': 'pk_live_your_api_key_here' } }
);
const { transcript } = await res.json();
console.log('Messages:', transcript.messageCount);
transcript.history.forEach(m => console.log(`[${m.role}] ${m.content}`));
if (transcript.extractedLead?.email) {
console.log('Lead email:', transcript.extractedLead.email);
}