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

# Stream User Sync Status

> Open a Server-Sent Events stream of sync status for a user.

The stream emits ``event: sync.status`` messages whose ``data``
payload is a JSON-encoded ``SyncStatusEvent``. Heartbeats are sent
every ~15 s as SSE comments (lines starting with ``:``) to keep the
connection alive across proxies.

Covers events from:

- REST pull syncs (e.g. Whoop, Oura, Polar, Suunto)
- Garmin webhook live + 30-day backfill
- Mobile SDK uploads (Apple HealthKit, Samsung Health, Google)
- Apple Health XML imports

The stream remains open until the client disconnects. ``EventSource``
in browsers reconnects automatically.



## OpenAPI

````yaml https://api.openwearables.io/openapi.json get /api/v1/users/{user_id}/sync/stream
openapi: 3.1.0
info:
  title: Open Wearables API
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/users/{user_id}/sync/stream:
    get:
      tags:
        - 'External: Sync Status'
      summary: Stream User Sync Status
      description: |-
        Open a Server-Sent Events stream of sync status for a user.

        The stream emits ``event: sync.status`` messages whose ``data``
        payload is a JSON-encoded ``SyncStatusEvent``. Heartbeats are sent
        every ~15 s as SSE comments (lines starting with ``:``) to keep the
        connection alive across proxies.

        Covers events from:

        - REST pull syncs (e.g. Whoop, Oura, Polar, Suunto)
        - Garmin webhook live + 30-day backfill
        - Mobile SDK uploads (Apple HealthKit, Samsung Health, Google)
        - Apple Health XML imports

        The stream remains open until the client disconnects. ``EventSource``
        in browsers reconnects automatically.
      operationId: stream_user_sync_status_api_v1_users__user_id__sync_stream_get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: replay
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            description: Replay last N events on connect.
            default: 20
            title: Replay
          description: Replay last N events on connect.
        - name: X-Open-Wearables-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Open-Wearables-Api-Key
      responses:
        '200':
          description: Server-Sent Events stream of sync status updates.
          content:
            text/event-stream: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /api/v1/auth/login

````