For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGet API key
DocumentationIntegrationsAPI Reference
DocumentationIntegrationsAPI Reference
  • API Reference
      • GETList Calls
      • POSTCreate Outbound Call
      • POSTCreate Web Call
      • GETGet Call
      • POSTEnd Call
      • GETGet Call Recording
      • GETGet Call Transcript
      • GETStream Call Transcript
      • GETList Calls For Number
LogoLogo
HomeGet API key
API Referencecalls

Stream Call Transcript

GET
https://api.agentphone.ai/v1/calls/:call_id/transcript/stream
GET
/v1/calls/:call_id/transcript/stream
1const url = 'https://api.agentphone.ai/v1/calls/call_id/transcript/stream';
2const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
3
4try {
5 const response = await fetch(url, options);
6 const data = await response.json();
7 console.log(data);
8} catch (error) {
9 console.error(error);
10}
Stream a call's transcript via Server-Sent Events. On connect the server replays all existing transcript turns from the database, then streams new turns in real time as they arrive from the voice provider. A ``: heartbeat`` comment is sent every 15 s to keep proxies alive. The stream closes after sending an ``ended`` event when the call completes (or immediately after replay if the call has already ended). Works for both live and completed calls — same URL either way.
Was this page helpful?
Previous

List Calls For Number

Next
Built with

Stream a call’s transcript via Server-Sent Events.

On connect the server replays all existing transcript turns from the database, then streams new turns in real time as they arrive from the voice provider. A : heartbeat comment is sent every 15 s to keep proxies alive. The stream closes after sending an ended event when the call completes (or immediately after replay if the call has already ended).

Works for both live and completed calls — same URL either way.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

call_idstringRequired

Response

Successful Response

Errors

422
Unprocessable Entity Error