# Connect to an event stream

`GET https://api.cademi.com.br/api/v3/event-streams/{event_stream_id}/events`

Operation ID: `event_streams.events.get` · API v3

Opens the Server-Sent Events connection for an event stream. Send `Accept: text/event-stream` and authenticate with the `Authorization` header; credentials in the query string are not accepted.

Each message carries the event's public ID in `id`, its type in `event`, and in `data` the same JSON returned when retrieving the event. Without a `Last-Event-ID` header, delivery resumes from the stream's stored cursor; with it, delivery resumes after that event. Keep-alive comments are sent periodically.

Only one connection per stream is allowed at a time. The server closes the connection after a maximum duration, or when the stream expires, is revoked, or the credential is revoked; reconnect with `Last-Event-ID` to continue. Each connection extends the stream's expiration.

Delivery has a latency of a few seconds and is not real-time.

Required permissions: `event_streams.read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `event_stream_id` | path | string | yes |  |
| `Last-Event-ID` | header | string | no |  |

## Responses

### 200

Returns a text/event-stream response that delivers the stream's events as they become available.

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The event stream was not found or is not accessible with the current credentials.

Body: Error.

### 409

The event stream is revoked or expired (stateconflict), or another connection to it is already open (streambusy).

Body: Error.

### 410

The event referenced by Last-Event-ID is no longer retained (cursor_expired). Resume by reading the events collection.

Body: Error.

Full schema: https://cademi.dev/openapi/v3.json
