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

# Open conversation



## OpenAPI

````yaml /api/openapi.yaml post /api/v1/conversations
openapi: 3.1.0
info:
  title: OpenCluster Control Plane API
  version: 0.1.0
  description: HTTP contract for the OpenCluster product API and inbound webhook endpoints.
  license:
    name: Apache-2.0
servers:
  - url: http://localhost:8080
    description: Local self-hosted deployment
security: []
tags:
  - name: Authentication
  - name: Organizations
  - name: Members
  - name: Sessions
  - name: Policy
  - name: Audit
  - name: Integration Types
  - name: Integrations
  - name: Relays
  - name: Incidents
  - name: Investigations
  - name: Conversations
  - name: Postmortems
  - name: Webhook Deliveries
  - name: Webhook Intake
  - name: Metadata
paths:
  /api/v1/conversations:
    post:
      tags:
        - Conversations
      summary: Open conversation
      operationId: openConversation
      parameters:
        - $ref: '#/components/parameters/Organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenConversationRequest'
        required: true
      responses:
        '201':
          $ref: '#/components/responses/ConversationOpened'
        default:
          $ref: '#/components/responses/ErrorResponse'
      security:
        - SessionCookie: []
components:
  parameters:
    Organization:
      name: X-OpenCluster-Organization
      in: header
      required: true
      description: Selects the Organization whose data and membership are authorized.
      schema:
        $ref: '#/components/schemas/OrganizationID'
      example: acme-production
  schemas:
    OpenConversationRequest:
      type: object
      additionalProperties: false
      required:
        - subject
      properties:
        incidentId:
          $ref: '#/components/schemas/UUID'
        subject:
          type: string
          minLength: 1
          maxLength: 512
        message:
          type: string
          minLength: 1
          maxLength: 8192
    OrganizationID:
      type: string
      pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$
      minLength: 1
      maxLength: 63
    UUID:
      type: string
      format: uuid
    ConversationOpened:
      allOf:
        - $ref: '#/components/schemas/Conversation'
        - type: object
          properties:
            message:
              $ref: '#/components/schemas/ConversationMessage'
            turn:
              $ref: '#/components/schemas/ConversationTurn'
            queued:
              type: boolean
    Error:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: string
          minLength: 1
          maxLength: 1024
          example: the selected Organization is not available to this caller
        reason:
          type: string
          enum:
            - credential_rejected
            - session_expired
            - session_revoked
        requires:
          type: string
          minLength: 1
          maxLength: 128
    Conversation:
      type: object
      additionalProperties: false
      required:
        - id
        - subject
        - surface
        - state
        - createdAt
        - lastActivityAt
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        subject:
          type: string
          minLength: 1
          maxLength: 512
        surface:
          type: string
          enum:
            - web
            - slack
        state:
          type: string
          enum:
            - open
            - closed
        incidentId:
          $ref: '#/components/schemas/UUID'
        createdBy:
          type: string
          maxLength: 256
        createdAt:
          $ref: '#/components/schemas/Timestamp'
        lastActivityAt:
          $ref: '#/components/schemas/Timestamp'
    ConversationMessage:
      type: object
      additionalProperties: false
      required:
        - sequence
        - role
        - actorKind
        - text
        - createdAt
      properties:
        sequence:
          type: integer
          format: int64
          minimum: 1
        role:
          type: string
          enum:
            - person
            - agent
        actorKind:
          type: string
          enum:
            - principal
            - external
        actorId:
          type: string
          maxLength: 256
        actorDisplay:
          type: string
          maxLength: 256
        text:
          type: string
          minLength: 1
          maxLength: 8192
        sourceReference:
          type: string
          maxLength: 1024
        investigationId:
          $ref: '#/components/schemas/UUID'
        createdAt:
          $ref: '#/components/schemas/Timestamp'
    ConversationTurn:
      type: object
      additionalProperties: false
      required:
        - investigationId
        - turn
        - status
        - createdAt
      properties:
        investigationId:
          $ref: '#/components/schemas/UUID'
        turn:
          type: integer
          minimum: 1
        status:
          type: string
          enum:
            - queued
            - investigating
            - needs_input
            - partial
            - concluded
            - cancelled
            - failed
        answer:
          type: string
          maxLength: 32768
        stoppedBy:
          type: string
          enum:
            - spend
            - tool_runs
            - reasoner_turns
            - wall_clock
            - stagnation
            - context
        error:
          type: string
          maxLength: 4096
        createdAt:
          $ref: '#/components/schemas/Timestamp'
        concludedAt:
          $ref: '#/components/schemas/Timestamp'
    Timestamp:
      type: string
      format: date-time
  responses:
    ConversationOpened:
      description: Conversation opened, with an optional first Message and turn.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConversationOpened'
    ErrorResponse:
      description: The operation did not complete.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    SessionCookie:
      type: apiKey
      in: cookie
      name: __Host-oc_session

````