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

# Create a conversation

> Creates a new conversation or returns an existing one with the given recipients. For a single recipient, finds or creates a direct conversation. For multiple recipients, creates a group conversation.



## OpenAPI

````yaml /openapi.yaml post /conversations/create
openapi: 3.0.0
info:
  title: Ziik API
  version: '1.0'
servers: []
security: []
tags:
  - name: Auth
    description: Auth
  - name: Posts
    description: Posts
  - name: Counters
    description: Counters
  - name: Groups
    description: Groups
  - name: Languages
    description: Languages
  - name: Timezones
    description: Timezones
  - name: Units
    description: Units
  - name: User unit memberships
    description: User unit memberships
  - name: Users
    description: Users
  - name: User types
    description: User types
  - name: Conversations
    description: Conversations
paths:
  /conversations/create:
    post:
      tags:
        - Conversations
      summary: Create a conversation
      description: >-
        Creates a new conversation or returns an existing one with the given
        recipients. For a single recipient, finds or creates a direct
        conversation. For multiple recipients, creates a group conversation.
      operationId: 896bae590ec9ce782b40f6ec1dbb0027
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - recipients
              properties:
                recipients:
                  description: User IDs of conversation participants
                  type: array
                  items:
                    type: integer
              type: object
      responses:
        '200':
          description: The created or existing conversation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
components:
  schemas:
    Conversation:
      properties:
        id:
          type: integer
          example: 1
        type:
          description: 'Conversation type: direct or group'
          type: string
          example: direct
        title:
          description: Conversation title (group only)
          type: string
          example: ''
        created_at:
          description: Unix timestamp
          type: integer
          format: int64
        updated_at:
          description: Unix timestamp
          type: integer
          format: int64
        latest_message:
          description: Latest message in the conversation
          type: object
          nullable: true
        mute_rule:
          description: Mute rule ID or null
          type: integer
          nullable: true
        unread_message_count:
          type: integer
          example: 0
        participants:
          description: Conversation participants
          type: array
          items:
            $ref: '#/components/schemas/BasicUser'
        publish:
          properties:
            created_at:
              type: integer
              format: int64
            updated_at:
              type: integer
              format: int64
          type: object
        archived_at:
          description: When the auth user archived this conversation
          type: integer
          format: int64
          nullable: true
      type: object
    BasicUser:
      properties:
        id:
          type: integer
          example: 1
        first_name:
          type: string
          example: John
        last_name:
          type: string
          example: Doe
        name:
          type: string
          example: John Doe
        title:
          type: string
          example: Manager
        active:
          type: boolean
          example: true
        avatar:
          description: Avatar image or null
          type: object
          nullable: true
        archived_at:
          description: Conversation participant archived timestamp or null
          type: integer
          format: int64
          nullable: true
        participant_type:
          description: Conversation participant type when present
          type: string
          nullable: true
        subtext:
          description: Short descriptive text combining title/unit/department
          type: string
          example: Manager - HQ (Sales)
        department:
          properties:
            id:
              type: integer
              example: 10
            name:
              type: string
              example: Sales
          type: object
          nullable: true
        unit:
          properties:
            id:
              type: integer
              example: 5
            name:
              type: string
              example: HQ
          type: object
          nullable: true
      type: object

````