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

# Create new chat



## OpenAPI

````yaml post /v1/chats
openapi: 3.0.0
info:
  title: Corebanq - Chat API
  description: API endpoints for real-time chat functionality
  version: 1.0.0
servers: []
security: []
paths:
  /v1/chats:
    post:
      summary: Create new chat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateChatInput'
      responses:
        '201':
          description: Chat created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatResponse'
components:
  schemas:
    CreateChatInput:
      type: object
      required:
        - type
        - participants
      properties:
        type:
          type: string
          enum:
            - direct
            - group
        participants:
          type: array
          items:
            type: string
            format: uuid
        metadata:
          type: object
    ChatResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
        participants:
          type: array
          items:
            type: string
            format: uuid
        lastMessage:
          $ref: '#/components/schemas/MessageResponse'
        unreadCount:
          type: integer
        metadata:
          type: object
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    MessageResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        chatId:
          type: string
          format: uuid
        senderId:
          type: string
          format: uuid
        content:
          type: string
        type:
          type: string
        metadata:
          type: object
        createdAt:
          type: string
          format: date-time
        readBy:
          type: array
          items:
            type: string
            format: uuid

````