> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apollodeploy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stream email events

> Opens a project-scoped Server-Sent Events stream. First issue a one-time token, then connect within 60 seconds. The stream can emit `sent`, `delivered`, `bounced`, `complained`, `opened`, `clicked`, and `unsubscribed` events. Each JSON payload contains `type`, `emailId`, `occurredAt`, and an event-specific `data` object.

### Requirements

- **Authentication:** one-time stream token from `POST /v1/emails/{projectId}/stream/token`.



## OpenAPI

````yaml /signal/api-reference/openapi.json get /v1/emails/stream
openapi: 3.1.0
info:
  title: Apollo Signal API
  version: 1.0.0
  description: >-
    Public REST API for transactional email, contacts, audiences, webhooks,
    metrics, projects, and sending domains.
servers:
  - url: https://api.signal.apollodeploy.com
    description: Production
security: []
tags:
  - name: Emails
    description: Send, inspect, cancel, validate, and stream transactional email activity.
  - name: Metrics
    description: Read project, topic, message, and deliverability analytics.
  - name: Suppressions
    description: Manage addresses that Apollo Signal must not send to.
  - name: Segments
    description: Create dynamic contact groups and inspect their membership.
  - name: Topics
    description: Manage subscription topics and topic membership.
  - name: Contact properties
    description: Define the custom fields available on project contacts.
  - name: Contacts
    description: >-
      Manage contacts, audience membership, images, activity, and engagement
      data.
  - name: Webhooks
    description: Manage webhook endpoints, deliveries, tests, and replays.
  - name: API key usage
    description: Inspect API key metadata and request usage without exposing raw keys.
  - name: Projects
    description: Inspect projects and project-scoped email logs.
  - name: Sending domains
    description: >-
      Register, verify, inspect, and remove sending domains and BIMI
      configuration.
paths:
  /v1/emails/stream:
    get:
      tags:
        - Emails
      summary: Stream email events
      description: >-
        Opens a project-scoped Server-Sent Events stream. First issue a one-time
        token, then connect within 60 seconds. The stream can emit `sent`,
        `delivered`, `bounced`, `complained`, `opened`, `clicked`, and
        `unsubscribed` events. Each JSON payload contains `type`, `emailId`,
        `occurredAt`, and an event-specific `data` object.


        ### Requirements


        - **Authentication:** one-time stream token from `POST
        /v1/emails/{projectId}/stream/token`.
      operationId: streamEmailEvents
      parameters:
        - name: token
          in: query
          description: Short-lived stream token.
          required: true
          deprecated: false
          explode: false
          schema:
            type: string
            title: String
      responses:
        '200':
          description: >-
            A Server-Sent Events stream. Each `data` field contains one JSON
            event object.
          headers: {}
          content:
            text/event-stream:
              schema:
                type: string
              example: >+
                data:
                {"type":"delivered","emailId":"email_01...","occurredAt":"2026-08-25T10:00:00Z","data":{}}

        '401':
          description: Missing, invalid, or expired stream token.
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: >-
                  #/components/schemas/com.apollodeploy.commons.core.error.ApiProblem
      deprecated: false
      security:
        - streamTokenAuth: []
      x-codeSamples:
        - lang: TypeScript
          label: TypeScript
          source: >-
            import { createApolloSignalApiClient } from
            "@apollo-deploy/signal-sdk";


            const signal = createApolloSignalApiClient({ apiKey: "ap_signal_..."
            });


            const result = await signal.emails.streamEmailEvents(/* params */);


            console.log(result);
        - lang: Python
          label: Python
          source: |-
            from apollo_signal import SignalClient

            signal = SignalClient(api_key="ap_signal_...")

            result = signal.emails.streamEmailEvents(# params)

            print(result)
        - lang: Go
          label: Go
          source: >-
            import signal "github.com/apollo-deploy/signal-sdk-go"


            client := signal.NewClient("ap_signal_...")


            result, err := client.Emails.StreamEmailEvents(context.Background()
            /* params */)

            if err != nil {
                log.Fatal(err)
            }

            fmt.Println(result)
        - lang: Java
          label: Java
          source: |-
            import com.apollodeploy.signal.SignalClient;

            SignalClient signal = new SignalClient("ap_signal_...");

            var result = signal.emails().streamEmailEvents(/* params */);
            System.out.println(result);
        - lang: Kotlin
          label: Kotlin
          source: |-
            import com.apollodeploy.signal.SignalClient

            val signal = SignalClient("ap_signal_...")

            val result = signal.emails.streamEmailEvents(/* params */)
            println(result)
        - lang: Ruby
          label: Ruby
          source: |-
            require "apollo_signal"

            signal = ApolloSignal::Client.new(api_key: "ap_signal_...")

            result = signal.emails.streamEmailEvents(# params)
            puts result
        - lang: PHP
          label: PHP
          source: |-
            use ApolloSignal\SignalClient;

            $signal = new SignalClient("ap_signal_...");

            $result = $signal->emails->streamEmailEvents(/* params */);
            var_dump($result);
        - lang: Rust
          label: Rust
          source: |-
            use apollo_signal::SignalClient;

            let signal = SignalClient::new("ap_signal_...");

            let result = signal.emails.streamEmailEvents(/* params */).await?;
            println!("{:?}", result);
        - lang: C#
          label: .NET
          source: >-
            using ApolloSignal;


            var signal = new SignalClient("ap_signal_...");


            var result = await signal.Emails.StreamEmailEventsAsync(/* params
            */);

            Console.WriteLine(result);
components:
  schemas:
    com.apollodeploy.commons.core.error.ApiProblem:
      type: object
      properties:
        code:
          type: string
          title: ErrorCode
        detail:
          type: string
          title: String
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.apollodeploy.commons.core.error.FieldProblem
          title: List<FieldProblem>
        instance:
          type: string
          title: ProblemInstance
        requestId:
          type: string
          title: String
        status:
          type: integer
          format: int32
          title: Int
        title:
          type: string
          title: String
        type:
          type: string
          title: ProblemType
      required:
        - code
        - status
        - title
        - type
      title: ApiProblem
    com.apollodeploy.commons.core.error.FieldProblem:
      type: object
      properties:
        detail:
          type: string
          title: String
        pointer:
          type: string
          title: String
      required:
        - detail
        - pointer
      title: FieldProblem
  securitySchemes:
    streamTokenAuth:
      type: apiKey
      in: query
      name: token
      description: One-time, 60-second token issued by the email stream-token endpoint.

````