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

# Post v1conversationschat



## OpenAPI

````yaml /openapi.json post /v1/conversations/chat
openapi: 3.1.0
info:
  title: Lighthouse API
  description: Lighthouse funeral home management API
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.lighthousefh.com
    description: Production
security:
  - bearer_auth: []
tags:
  - name: Health
    description: Health check endpoints
  - name: Cases
    description: Case management
  - name: Calls
    description: Call recordings and transcriptions
  - name: Clips
    description: Short audio clips and transcripts
  - name: Users
    description: User management
  - name: Organizations
    description: Organization management
  - name: Locations
    description: Location management
  - name: Case Data
    description: Custom case data values
  - name: Case Data Fields
    description: Custom case data field definitions
  - name: Generations
    description: User-sourced generation overrides
  - name: Generation Templates
    description: AI generation templates
  - name: Generation Feedback
    description: End-user feedback on generations
  - name: Generation Labels
    description: Generation quality labels
  - name: Generation Quality Test
    description: Generation quality testing
  - name: Generation Template Dependencies
    description: Template dependency management
  - name: Organization Template Status
    description: Organization-level template status
  - name: Score Instructions
    description: Score instructions for generation templates
  - name: Tasks
    description: Case tasks
  - name: Conversations
    description: Assistant chat conversations
  - name: User Preferences
    description: User preference settings
  - name: User Managers
    description: User-manager relationships
  - name: User Permissions
    description: User permission management
  - name: Roleplay Categories
    description: Roleplay category (skill) catalog
  - name: Roleplay Complications
    description: Roleplay complications catalog
  - name: Roleplay Personas
    description: Roleplay persona catalog
  - name: Roleplay Phases
    description: Roleplay phase catalog
  - name: Roleplay Runs
    description: Completed roleplay runs
  - name: Roleplay Scenarios
    description: Roleplay scenarios
  - name: Roleplay Voices
    description: Roleplay voice catalog
  - name: Scenario Score Templates
    description: Scenario scoring template attachments
paths:
  /v1/conversations/chat:
    post:
      tags:
        - Conversations
      operationId: chat_in_conversation_handler
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatInConversationRequest'
        required: true
      responses:
        '200':
          description: >-
            Conversation envelope. `agent_error` is non-null when the assistant
            call failed but the user message was persisted (per ADR-0001).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_ChatInConversationResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Conversation not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearer_auth: []
components:
  schemas:
    ChatInConversationRequest:
      type: object
      required:
        - app_context
      properties:
        app_context:
          $ref: '#/components/schemas/AppContext'
        content:
          type:
            - string
            - 'null'
        conversation_uuid:
          type:
            - string
            - 'null'
          format: uuid
        timezone:
          type:
            - string
            - 'null'
          description: >-
            IANA timezone name from the client (e.g. "America/New_York"),
            forwarded to

            the assistant so it resolves relative due dates in the user's own
            zone.
    ApiResponse_ChatInConversationResponse:
      type: object
      required:
        - status
        - timestamp
      properties:
        data:
          type: object
          required:
            - conversation
          properties:
            agent_error:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/AgentError'
            conversation:
              $ref: '#/components/schemas/Conversation'
        message:
          type:
            - string
            - 'null'
        request_id:
          type:
            - string
            - 'null'
        status:
          type: string
        timestamp:
          type: string
          format: date-time
    ApiError:
      type: object
      required:
        - status
        - error
        - message
        - status_code
        - timestamp
      properties:
        error:
          type: string
        message:
          type: string
        request_id:
          type:
            - string
            - 'null'
        status:
          type: string
        status_code:
          type: integer
          format: int32
          minimum: 0
        timestamp:
          type: string
          format: date-time
    AppContext:
      type: object
      required:
        - page
      properties:
        case_uuid:
          type:
            - string
            - 'null'
          format: uuid
        desired_action:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DesiredAction'
        page:
          $ref: '#/components/schemas/AppPage'
    AgentError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
    Conversation:
      type: object
      required:
        - uuid
        - created_by
        - organization_uuid
        - messages
        - created_at
        - updated_at
      properties:
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
          format: uuid
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ConversationMessage'
        organization_uuid:
          type: string
          format: uuid
        title:
          type:
            - string
            - 'null'
        updated_at:
          type: string
          format: date-time
        uuid:
          type: string
          format: uuid
    DesiredAction:
      type: string
      enum:
        - manage_tasks
    AppPage:
      type: string
      enum:
        - cases
        - case
        - tasks
        - insights
        - arrangement_insights
        - roleplay
        - settings
        - admin_tools
        - support_tools
        - other
    ConversationMessage:
      type: object
      required:
        - uuid
        - role
        - content
        - created_at
      properties:
        content:
          type: string
        created_at:
          type: string
          format: date-time
        role:
          $ref: '#/components/schemas/ConversationMessageRole'
        uuid:
          type: string
          format: uuid
    ConversationMessageRole:
      type: string
      enum:
        - user
        - assistant
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````