> ## 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 new message in a conversation

> Creates a new message in the given conversation for the authenticated user. Supports attaching files and replying to a parent message.



## OpenAPI

````yaml /openapi.yaml post /conversations/{conversation}/messages
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/{conversation}/messages:
    post:
      tags:
        - Conversations
      summary: Create a new message in a conversation
      description: >-
        Creates a new message in the given conversation for the authenticated
        user. Supports attaching files and replying to a parent message.
      operationId: 8653e52b0534ffa1af5d60fd239cd1b1
      parameters:
        - name: conversation
          in: path
          description: Conversation ID
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - message
              properties:
                message:
                  description: Message text, may contain rich content markup
                  type: string
                parent_id:
                  description: ID of the parent message when replying
                  type: integer
                  nullable: true
              type: object
      responses:
        '200':
          description: The created message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '500':
          description: Could not create message
components:
  schemas:
    Message:
      properties:
        id:
          type: integer
          example: 1
        type:
          type: string
        conversationId:
          type: integer
        is_reply:
          type: boolean
        parent:
          oneOf:
            - $ref: '#/components/schemas/Message'
          nullable: true
        deleted:
          type: boolean
        message:
          type: string
        date:
          description: Unix timestamp
          type: integer
        edited_at:
          type: integer
          nullable: true
        reactions:
          type: array
          items:
            type: object
        author:
          oneOf:
            - $ref: '#/components/schemas/BasicUser'
          nullable: true
        files:
          type: array
          items:
            $ref: '#/components/schemas/File'
        voice:
          oneOf:
            - $ref: '#/components/schemas/Voice'
          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
    File:
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: document.pdf
        mime:
          type: string
          example: application/pdf
        size:
          type: integer
          example: 102400
        type:
          type: string
          example: file
        extension:
          type: string
          example: pdf
        uploaded:
          type: boolean
          example: true
        processing:
          type: boolean
          example: false
        height:
          description: Image height when file is an image
          type: integer
          nullable: true
        width:
          description: Image width when file is an image
          type: integer
          nullable: true
        source:
          description: URL used for getting the file
          type: string
          format: uri
        stream:
          description: Streaming URL for video files when available
          type: string
          format: uri
          nullable: true
        versions:
          description: Key-value map of available image versions and their URLs
          type: object
        screenshot:
          oneOf:
            - $ref: '#/components/schemas/File'
          nullable: true
          description: Screenshot file for video or PDF files
        date:
          description: Unix timestamp of last update
          type: integer
          format: int64
        created_at:
          description: File creation timestamp
          type: integer
          format: int64
        updated_at:
          description: File last update timestamp
          type: integer
          format: int64
        created_formatted:
          description: Human-readable creation date
          type: string
          nullable: true
        updated_formatted:
          description: Human-readable update date
          type: string
          nullable: true
      type: object
    Voice:
      properties:
        id:
          type: integer
          example: 1
        processing:
          type: boolean
          example: true
        extension:
          type: string
          example: mp3
          nullable: true
        duration:
          type: number
          format: float
          example: 12.5
          nullable: true
        url:
          description: Temporary URL to access the voice file
          type: string
          format: uri
          nullable: true
      type: object

````