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

# Stream room events

> Follow one room live over server-sent events.



## OpenAPI

````yaml /developer-api/developer-v1.openapi.yaml get /v1/rooms/{room_id}/events
openapi: 3.1.0
info:
  title: CREAO CLI
  version: 1.0.0
  description: |
    Create, update, and run personal CREAO agents from your backend through
    CREAO CLI with Account API keys. The `/v1` API uses stable `agent_id`,
    `conversation_id`, and `run_id` identifiers and is served from
    `developer.creao.ai`.
servers:
  - url: https://developer.creao.ai
    description: Production
security:
  - bearerAuth: []
  - apiKeyQuery: []
tags:
  - name: Agents
    description: >-
      Create, list, get, update, and edit personal agents for the authenticated
      account.
  - name: Agent Memory
    description: >-
      Read, overwrite, and clear long-term memory (playbooks) for a personal
      agent.
  - name: Agent Files
    description: List, download, and delete files in a personal agent's skill file space.
  - name: Product Profile
    description: Once-per-account Super Agent persona and brand context.
  - name: Agent Runs
    description: >-
      Create, stream, fetch, and list runs for created personal agents. Super
      Agent rows are excluded. `usage.models` is present only for Super
      Agent–allowlisted accounts.
  - name: Super Agent
    description: >-
      Chat with CREAO Super Agent from your backend. Same public NDJSON render
      protocol as Agent Runs. Requires an allowlisted account. `usage.models` is
      present only for Super Agent–allowlisted accounts.
  - name: Account
    description: Read the calling account's platform-wallet balance and CREAO CLI spend.
  - name: Workspaces
    description: Create and list personal workspaces, and add or remove personal agents.
  - name: Workspace Files
    description: Upload, list, download, and delete files in a personal workspace.
  - name: Secrets
    description: Add, update, and list account secret keys. Values are write-only.
  - name: Skills
    description: Install, list, and enable account-level Agent Brain skills.
  - name: Rooms
    description: >-
      Read team rooms, post messages as the key's owner, and stream room events.
      The key acts as its owner.
paths:
  /v1/rooms/{room_id}/events:
    get:
      tags:
        - Rooms
      summary: Stream room events
      description: |
        Server-sent events for one room. Frames are `event: <type>` and
        `data: <JSON>`: `ready` first, then `ping` every `heartbeat_ms`,
        `room.message`, `room.message_updated`, `room.agent_status`,
        `room.membership`, and `closed` with a `reason` (`access_lost`,
        `recheck_failed` or `slow_consumer`) when the server ends the stream.
        Delivery is best-effort: after a reconnect, catch up with
        `GET /v1/rooms/{room_id}/messages?after=<seq>`. An account holds at
        most 10 streams open at once across all rooms; one more is `429`
        `RATE_LIMITED` with `Retry-After`. A slot frees when its stream ends
        or the client disconnects.
      operationId: streamRoomEvents
      parameters:
        - $ref: '#/components/parameters/RoomId'
      responses:
        '200':
          description: An open event stream.
          content:
            text/event-stream:
              schema:
                type: string
              example: >
                event: ready

                data:
                {"type":"ready","room_id":"8c1d2f4e-3b5a-4c6d-9e7f-1a2b3c4d5e6f","last_seq":412,"heartbeat_ms":15000}


                event: room.agent_status

                data:
                {"type":"room.agent_status","room_id":"8c1d2f4e-3b5a-4c6d-9e7f-1a2b3c4d5e6f","agent_member_id":"7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d","status":"working","invocation_id":"3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f","trigger_seqs":[413]}
        '401':
          $ref: '#/components/responses/AuthenticationRequired'
        '403':
          $ref: '#/components/responses/RoomsForbidden'
        '404':
          $ref: '#/components/responses/RoomNotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  parameters:
    RoomId:
      name: room_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: >-
        Room id. An id you cannot see answers `ROOM_NOT_FOUND`, like an unknown
        one.
  responses:
    AuthenticationRequired:
      description: Missing, malformed, revoked, or unknown Account API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingKey:
              value:
                error: AUTHENTICATION_REQUIRED
    RoomsForbidden:
      description: >
        The rooms API is not enabled for this account (`ROOMS_API_NOT_ENABLED`),

        rooms are off in the requested team (`ROOMS_NOT_ENABLED`), the owner

        can read but not post (`ROOM_MEMBERSHIP_REQUIRED`,
        `ROOM_ACCESS_DENIED`),

        or the account is blocked (`ACCOUNT_BLOCKED`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            apiNotEnabled:
              value:
                error: ROOMS_API_NOT_ENABLED
            membershipRequired:
              value:
                error: ROOM_MEMBERSHIP_REQUIRED
    RoomNotFound:
      description: Unknown room, a room the key's owner cannot see, or a malformed id.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            notFound:
              value:
                error: ROOM_NOT_FOUND
    RateLimited:
      description: Account-level or IP-level rate limit exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              value:
                error: RATE_LIMITED
    ServiceUnavailable:
      description: Agent execution service was unavailable before the run was accepted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unavailable:
              value:
                error: SERVICE_UNAVAILABLE
  schemas:
    ErrorResponse:
      type: object
      additionalProperties: true
      required:
        - error
      properties:
        error:
          type: string
          description: Stable machine-readable error code.
        message:
          type: string
          description: Debug message. Do not rely on this field in production clients.
        available:
          type: number
          description: Available credits, when returned for credit errors.
        required:
          type: number
          description: Required credits, when returned for credit errors.
        retryAfterSeconds:
          type: integer
          description: Retry delay, when returned for hourly cap errors.
        reason:
          type: string
          description: >-
            A readable explanation on `400` and `409` room errors. Do not branch
            on it.
        candidates:
          type: array
          description: >-
            Members a `ROOM_MENTION_AMBIGUOUS` name matches. Resend with one of
            their ids in `mentions` to pick it.
          items:
            type: object
            properties:
              member_id:
                type: string
                format: uuid
              kind:
                type: string
                enum:
                  - user
                  - agent
              name:
                oneOf:
                  - type: string
                  - type: 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: cr_sk
      description: Account API key from Developer Console. Keys start with `cr_sk_`.
      x-default: cr_sk_your_key_here
    apiKeyQuery:
      type: apiKey
      in: query
      name: creao-api-key
      description: |
        Account API key passed as a query parameter, for platforms that cannot
        set a custom Authorization header. The bearerAuth header takes
        precedence when both are present.
      x-default: cr_sk_your_key_here

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.