# Call objects: transcript, recording, summary and cost

> What a call record holds during and after the call, and how to fetch its transcript, recording, AI summary and cost.

Every call is a **call object**, whichever way it came: an outbound call you placed, a campaign call, an inbound call to your number or a call from a web page. It is created when the call starts, follows it live, and keeps everything about it when it ends. Its parts are fetched on their own: the transcript, the recording and the AI summary.

**cURL**

```sh
curl https://api.morevoice.ai/v1/calls/$CALL_ID \
  -H "Authorization: Bearer $MOREVOICE_API_KEY"
```

**Node.js**

```ts title="retrieve-call.ts"
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // reads MOREVOICE_API_KEY

const call = await mv.calls.retrieve(process.env.CALL_ID!);
console.log(call.status, call.end_reason, call.duration_ms);
if (call.cost) console.log(`Cost: ${call.cost.amount} ${call.cost.currency} (minor units)`);
if (call.summary) console.log(call.summary.outcome, "·", call.summary.text);
```

**Python**

```python title="retrieve_call.py"
import os

import requests

API = "https://api.morevoice.ai/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['MOREVOICE_API_KEY']}"}
call_id = os.environ["CALL_ID"]

response = requests.get(f"{API}/calls/{call_id}", headers=HEADERS, timeout=30)
response.raise_for_status()
call = response.json()
print(call["status"], call["end_reason"], call["duration_ms"])
if call["cost"]:
    print(f"Cost: {call['cost']['amount']} {call['cost']['currency']} (minor units)")
if call["summary"]:
    print(call["summary"]["outcome"], "·", call["summary"]["text"])
```

```json title="A call that ended"
{
  "id": "call_8tRPaZp5hLMbrGqdJ9AmNa",
  "object": "call",
  "type": "ai",
  "direction": "outbound",
  "transport": "sip",
  "status": "ended",
  "from": "+97237654321",
  "to": "+972501234567",
  "assistant_id": "asst_4Gk2LmN9pQ4rS6tV8wX0yZ",
  "flow_id": null,
  "flow_version": null,
  "queue_id": null,
  "agent_id": null,
  "campaign_id": null,
  "contact_id": null,
  "connection_id": "conn_2bF8kQ1nR7sT3vW5xY9zA0",
  "api_key_id": "key_9i2E2pKO6g3z4nXl57Qb4g",
  "purpose": "service",
  "started_at": "2026-11-03T09:14:22.000Z",
  "answered_at": "2026-11-03T09:14:29.410Z",
  "ended_at": "2026-11-03T09:16:02.120Z",
  "duration_ms": 99710,
  "end_reason": "customer-ended-call",
  "answered_by": "human",
  "disposition": null,
  "has_recording": true,
  "summary": {
    "object": "call_summary",
    "call_id": "call_8tRPaZp5hLMbrGqdJ9AmNa",
    "text": "The customer confirmed tomorrow's appointment at 10:00.",
    "intent": "Confirm an appointment",
    "outcome": "Appointment confirmed",
    "sentiment": "positive",
    "key_points": ["Tomorrow at 10:00 suits the customer"],
    "action_items": [],
    "generated_at": "2026-11-03T09:16:09.000Z"
  },
  "cost": { "amount": 4, "amount_decimal": "4.2310", "currency": "USD", "estimate": true },
  "variables": { "customer_name": "Dana" },
  "metadata": { "crm_contact_id": "0031x00000AbCdE" },
  "livemode": true
}
```

## The fields

| Field | Meaning |
| --- | --- |
| `type` | Who handles the call: `ai`, `human`, `ivr`, `conference` or `voicemail`. |
| `direction` | `inbound`, `outbound`, or `browser` for a call from a web page. |
| `transport` | `sip` for phone calls, `webrtc` for browser calls and conference rooms. |
| `status` | `queued` (placed, not ringing yet), `ringing`, `in_progress` (answered) or `ended`. |
| `from`, `to` | The numbers, in E.164 when they are phone numbers. |
| `assistant_id`, `flow_id`, `flow_version` | The assistant, and the flow version that ran (`0` is an unpublished draft). |
| `queue_id`, `agent_id` | The queue and the person who handled the call, when people did. |
| `campaign_id`, `contact_id` | The campaign and contact of a campaign call. |
| `connection_id`, `api_key_id` | The SIP connection, and the API key that placed the call. |
| `purpose` | `service`, `marketing` or `survey`, for outbound calls. |
| `started_at`, `answered_at`, `ended_at`, `duration_ms` | When it started, was answered and ended, in UTC, and how long it lasted. |
| `end_reason` | Why it ended. See [below](#why-a-call-ended). |
| `answered_by` | `human`, `machine` or `unknown`, when answering-machine detection ran. |
| `disposition` | The business outcome the assistant recorded, such as `interested`. |
| `has_recording` | Whether there is a recording to fetch. |
| `summary` | The AI summary, once written; `null` before. |
| `cost` | What the call cost; `null` until it ends. |
| `variables`, `metadata` | What the call was created with. |
| `livemode` | `false` for test-mode calls. |

While a call runs, `status` and `answered_at` come from the live call, so polling `GET /v1/calls/{id}` shows it progress. Add `expand[]=assistant` to get the assistant's ID and name in an `assistant` field.

### Why a call ended

`end_reason` is a short code. The ones you'll see most:

| `end_reason` | Meaning |
| --- | --- |
| `customer-ended-call` | The caller or the person called hung up. |
| `assistant-ended-call`, `assistant-said-end-call-phrase` | The assistant ended the call. |
| `api-ended-call` | You hung up with `POST /v1/calls/{id}/hangup`. |
| `exceeded-max-duration`, `silence-timed-out` | The call reached its time limit, or nobody spoke for too long. |
| `transferred` | The call was transferred. |
| `customer-did-not-answer`, `customer-declined`, `customer-busy` | Nobody answered, the call was rejected, or the line was busy. |
| `amd-machine`, `amd-left-message` | An answering machine answered: the assistant hung up or left a message. |
| `opted-out` | The person asked not to be called again. |
| `invalid-number`, `connect-failed` | The number or the network failed. |

The list grows with the product, so treat a code you don't know as "other".

## Transcript

`GET /v1/calls/{id}/transcript` returns everything said, in order. While the call runs, it returns the transcript so far.

**cURL**

```sh
curl https://api.morevoice.ai/v1/calls/$CALL_ID/transcript \
  -H "Authorization: Bearer $MOREVOICE_API_KEY"
```

**Node.js**

```ts title="transcript.ts"
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // reads MOREVOICE_API_KEY

const transcript = await mv.calls.retrieveTranscript(process.env.CALL_ID!);
for (const s of transcript.segments) {
	const at = new Date(s.start_ms ?? 0).toISOString().slice(14, 19); // mm:ss into the call
	console.log(`[${at}] ${s.speaker}: ${s.text}${s.interrupted ? " (interrupted)" : ""}`);
}
```

**Python**

```python title="transcript.py"
import os

import requests

API = "https://api.morevoice.ai/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['MOREVOICE_API_KEY']}"}
call_id = os.environ["CALL_ID"]

response = requests.get(f"{API}/calls/{call_id}/transcript", headers=HEADERS, timeout=30)
response.raise_for_status()
for s in response.json()["segments"]:
    seconds = (s["start_ms"] or 0) // 1000
    interrupted = " (interrupted)" if s["interrupted"] else ""
    print(f"[{seconds // 60:02}:{seconds % 60:02}] {s['speaker']}: {s['text']}{interrupted}")
```

```json title="Response"
{
  "object": "transcript",
  "call_id": "call_8tRPaZp5hLMbrGqdJ9AmNa",
  "language": "he",
  "segments": [
    { "speaker": "assistant", "text": "שלום, כאן דנה ממוקד השירות. במה אפשר לעזור?", "start_ms": 820, "end_ms": 3900, "interrupted": false, "tool": null },
    { "speaker": "customer", "text": "רציתי לבדוק מה עם ההזמנה שלי", "start_ms": 4400, "end_ms": 6100, "interrupted": false, "tool": null }
  ]
}
```

- `speaker` is `customer` (the caller, or the person called), `assistant` (the AI), `agent` (a person on your team), `supervisor`, `participant` (a third party), or `tool` for a [custom tool](https://docs.morevoice.ai/guides/custom-tools/) call, with the tool's name, arguments and result in `tool`.
- `start_ms` and `end_ms` count from the start of the call.
- `interrupted` is `true` when the speaker was cut off.

## Recording

`GET /v1/calls/{id}/recording` answers `302` with a link to the audio. Follow the redirect to download it: the link needs no API key and works for 15 minutes. With `?format=json` you get the link itself:

```json title="GET /v1/calls/{id}/recording?format=json"
{
  "object": "recording_link",
  "call_id": "call_8tRPaZp5hLMbrGqdJ9AmNa",
  "url": "https://api.morevoice.ai/v1/recordings/AQAAAAABAAAAAAAAAAAAAAAAAAABVjFTdEdYUjhfWjVq.kH2pQ7xV9rT4mW1zB6nD8f",
  "expires_at": "2026-11-03T09:30:00.000Z",
  "content_type": "audio/ogg",
  "duration_ms": 99710,
  "channels": 2
}
```

Recordings are stereo: the customer on the left channel, the assistant or agent on the right. A call without a recording, or one still in progress, answers `404` with `resource_missing`. Recordings are kept as long as your plan and retention settings allow; download the ones you must keep.

> **Caution:** The link gives anyone who has it the recording until it expires. Don't log it or send it to a browser you don't control; ask for a new one when you need it.

## Summary

When the assistant's `artifacts.summary` is on (the default), an AI summary is written after the call and shows up in the call's `summary`, and the `call.analyzed` event is sent. It holds `text` (two to four sentences in the language of the call), `intent`, `outcome`, `sentiment`, `key_points` and `action_items`.

`GET /v1/calls/{id}/summary` returns it on its own. `POST /v1/calls/{id}/summary` writes a new one from the transcript and replaces the stored one; send an `Idempotency-Key` so a retry doesn't write it twice. A call with no customer speech answers `409` with `summary_unavailable`.

In test mode the summary is a fixed stand-in built from the transcript: no AI model runs.

## Cost

Once the call ends, `cost` says what it cost:

| Field | Meaning |
| --- | --- |
| `amount` | In the currency's minor unit (agorot, cents), rounded. |
| `amount_decimal` | The exact amount in minor units, as a decimal string. |
| `currency` | ISO 4217, such as `ILS` or `USD`. |
| `estimate` | `true` while it is an estimate from usage, not yet a billed amount. |

The `call.cost_finalized` event tells you when the cost is final. Test-mode calls are never billed.

## More about a call

| Request | Returns |
| --- | --- |
| `GET /v1/calls/{id}/flow_path` | The flow nodes the call went through, with the edge taken into each. |
| `GET /v1/calls/{id}/copilot_events` | What the real-time agent copilot showed during a call handled by a person, and what the agent did with it. |
| `DELETE /v1/calls/{id}` | Deletes an ended call with its transcript, events and recording. A call in progress answers `409` with `call_in_progress`. |

## List calls

`GET /v1/calls` lists calls newest first, with filters: `status` (`in_progress` or `ended`), `direction`, `type`, `assistant_id`, `campaign_id`, `agent_id`, `from`, `to`, and the start time with `created[gte]`, `created[gt]`, `created[lte]` and `created[lt]`. A test key sees only test calls.

Lists come in pages of up to 100 (`limit`, 20 by default): `{ "object": "list", "data": […], "has_more": true, "next_cursor": "…" }`. To get the next page, pass `next_cursor` as `starting_after`. The SDK does it for you:

**cURL**

```sh
# The first page of yesterday's calls.
curl "https://api.morevoice.ai/v1/calls?created[gte]=2026-11-03T00:00:00Z&created[lte]=2026-11-03T23:59:59Z&limit=100" \
  -H "Authorization: Bearer $MOREVOICE_API_KEY"

# While has_more is true, ask for the next page with the next_cursor you got.
curl "https://api.morevoice.ai/v1/calls?created[gte]=2026-11-03T00:00:00Z&created[lte]=2026-11-03T23:59:59Z&limit=100&starting_after=$NEXT_CURSOR" \
  -H "Authorization: Bearer $MOREVOICE_API_KEY"
```

**Node.js**

```ts title="list-calls-page-by-page.ts"
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // reads MOREVOICE_API_KEY

// Every call of a day. The list follows next_cursor for you, one page at a time.
let total = 0;
for await (const call of mv.calls.list({ created: { gte: "2026-11-03T00:00:00Z", lte: "2026-11-03T23:59:59Z" }, limit: 100 })) {
	total += call.cost?.amount ?? 0;
}
console.log(`Total: ${total} (minor units)`);
```

**Python**

```python title="list_calls_page_by_page.py"
import os

import requests

API = "https://api.morevoice.ai/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['MOREVOICE_API_KEY']}"}

# Every call of a day, page by page: pass next_cursor as starting_after while has_more is true.
params = {"created[gte]": "2026-11-03T00:00:00Z", "created[lte]": "2026-11-03T23:59:59Z", "limit": 100}
total = 0
while True:
    response = requests.get(f"{API}/calls", headers=HEADERS, params=params, timeout=30)
    response.raise_for_status()
    page = response.json()
    total += sum((call["cost"] or {}).get("amount", 0) for call in page["data"])
    if not page["has_more"]:
        break
    params["starting_after"] = page["next_cursor"]
print(f"Total: {total} (minor units)")
```

## Events

| Event | When |
| --- | --- |
| `call.created`, `call.ringing`, `call.answered`, `call.ended` | The call's life. |
| `transcript.ready` | The final transcript is stored. |
| `recording.ready` | The recording is stored. |
| `call.analyzed` | The summary is ready. |
| `call.cost_finalized` | The cost is final. |

Each one carries the call object as it was at that moment. See the [event catalogue](https://docs.morevoice.ai/webhooks/events/#calls).
