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

# Emit session event

> Emits an event to an ongoing conversation session.

<Note>This endpoint only works when the target session has an open websocket connection, such as through the [web chat widget](/documentation/deploy/widget/embedding-the-chat-widget) or a custom websocket integration. If no active connection exists, the event will have no effect.</Note>

Send an action to an active websocket session. This is useful for injecting events mid-conversation, such as signaling a user disconnection or pushing an external trigger while the agent is waiting for input.

You need the 'projectID' and 'sessionKey' to target the correct session. The sessionKey is returned when the websocket connection is established.


## OpenAPI

````yaml /specs/general-runtime/openapi.public.json post /v2/project/{projectID}/session/{sessionKey}/event
openapi: 3.0.0
info:
  title: General-runtime
  description: Voiceflow runtime service
  version: 1.0.0
  contact: {}
servers:
  - url: https://general-runtime.voiceflow.com
security: []
paths:
  /v2/project/{projectID}/session/{sessionKey}/event:
    post:
      tags:
        - Session
        - Public-Docs
      summary: Emit session event
      description: Emits an event to an ongoing conversation session.
      operationId: DialogSessionController_interactStreamStateless
      parameters:
        - name: projectID
          required: true
          in: path
          description: ID of the target Voiceflow project.
          schema:
            type: string
            description: ID of the target Voiceflow project.
        - name: sessionKey
          required: true
          in: path
          description: >-
            The session key returned by the [Start session
            endpoint](/api-reference/session/start-session). Identifies which
            active session to send the event to.
          schema:
            type: string
            description: >-
              The session key returned by the [Start session
              endpoint](/api-reference/session/start-session). Identifies which
              active session to send the event to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  description: The event to send to the active conversation.
                  allOf:
                    - $ref: '#/components/schemas/BaseRequest'
              required:
                - action
      responses:
        '201':
          description: ''
      security:
        - auth: []
components:
  schemas:
    BaseRequest:
      type: object
      properties:
        type:
          type: string
        payload: {}
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
  securitySchemes:
    auth:
      type: apiKey
      in: header
      name: authorization
      description: Voiceflow API key

````