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

# Create Conversation

> Register a new empty conversation owned by the authenticated user.

Used by the frontend when the user adds workspace items (preferences /
todos) before sending the first message: those endpoints require a
pre-existing owned thread, so the frontend calls this to mint one.

The conversation's ``title`` is left ``None`` so the first message can
still set it via the existing upsert-with-COALESCE in the query router.

Returns:
    ``{"thread_id": "th_<hex>"}`` — a freshly registered thread id.



## OpenAPI

````yaml /openapi.json post /api/conversations
openapi: 3.1.0
info:
  title: HAI-Co² API
  description: Human-AI Co-Construction reference implementation.
  version: 0.1.0
servers:
  - url: https://haico.gr
    description: Production
  - url: https://dev.haico.gr
    description: Development
  - url: http://localhost:8000
    description: Local development
security: []
paths:
  /api/conversations:
    post:
      tags:
        - Conversations
      summary: Create Conversation
      description: |-
        Register a new empty conversation owned by the authenticated user.

        Used by the frontend when the user adds workspace items (preferences /
        todos) before sending the first message: those endpoints require a
        pre-existing owned thread, so the frontend calls this to mint one.

        The conversation's ``title`` is left ``None`` so the first message can
        still set it via the existing upsert-with-COALESCE in the query router.

        Returns:
            ``{"thread_id": "th_<hex>"}`` — a freshly registered thread id.
      operationId: create_conversation_api_conversations_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Create Conversation Api Conversations Post
      security:
        - HTTPBearer: []
components:
  securitySchemes:
    HTTPBearer:
      type: http
      description: >-
        A personal access token (`haico_pat_...`), created under Profile → API
        keys. Send it as `Authorization: Bearer <key>`. The browser session JWT
        is also accepted but is an internal mechanism and is not part of the
        public contract.
      scheme: bearer

````