# Stream a call's live events

`GET https://api.morevoice.ai/v1/calls/{id}/events`

Server-Sent Events for one call: `call.state_changed`, `transcript.partial`, `transcript.final`, `call.tool_called`, and `call.ended`, after which the stream closes. The stream starts with what already happened on the call. Reconnect with `Last-Event-ID` (EventSource does it for you) to get only what you missed. An ended call's stream sends `call.ended` at once. A call that has not started yet (a web call before the browser connects) is a 404: subscribe once it starts, or follow it on GET /v1/events/stream. Counts against the key's stream limit (`concurrency_limit`, `limit_type: api_streams`).

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `calls_stream`.

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A call ID (`call_…`). |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `types` | `string \| string[]` | no | Only these event types (comma-separated or repeated): `call.state_changed`, `transcript.partial`, `transcript.final`, `call.tool_called`, `call.ended`, `transcript.*`, `call.*` or `*`. Default: all of them. |
| `last_event_id` | `string` | no | Resume after this event, for clients that cannot send the `Last-Event-ID` header (the header wins when both are sent). |

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |

## Responses

### 200 OK

The event stream.

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID exists in this organisation and mode. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

for await (const event of mv.calls.stream("call_7Hk2Lm9Qp")) {
	console.log(event.type, event.data.object);
}
```

**Python**

```python
import os

import httpx

url = "https://api.morevoice.ai/v1/calls/call_7Hk2Lm9Qp/events"
headers = {"Authorization": f"Bearer {os.environ['MOREVOICE_API_KEY']}", "Accept": "text/event-stream"}
with httpx.stream("GET", url, headers=headers, timeout=None) as response:
    response.raise_for_status()
    for line in response.iter_lines():
        if line.startswith("data:"):
            print(line[5:].strip())
```

**cURL**

```sh
curl https://api.morevoice.ai/v1/calls/call_7Hk2Lm9Qp/events \
  -H "Authorization: Bearer $MOREVOICE_API_KEY" \
  -H "Accept: text/event-stream" -N
```
