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

# Create communication thread

> Create a communication thread attached to a ticket, review, customer, or external provider thread.



## OpenAPI

````yaml POST /communication/threads
openapi: 3.0.1
info:
  title: Masivo's REST API
  description: Learn how to use Masivo's REST API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.masivo.ai/api/storefront/v1
security:
  - bearerAuth: []
paths:
  /communication/threads:
    post:
      description: >-
        Create a communication thread attached to a ticket, review, customer, or
        external provider thread.
      parameters:
        - in: header
          name: x-account-id
          description: The account that owns the communication thread
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommunicationThreadCreate'
      responses:
        '201':
          description: Communication thread created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CommunicationThread'
        '400':
          description: Thread creation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CommunicationThreadCreate:
      type: object
      required:
        - channel
      properties:
        ticket_id:
          type: string
          format: uuid
          nullable: true
        review_id:
          type: string
          format: uuid
          nullable: true
        customer_id:
          type: string
          nullable: true
        inbox_id:
          type: string
          format: uuid
          nullable: true
        channel:
          $ref: '#/components/schemas/CommunicationChannel'
        channel_account_id:
          type: string
          nullable: true
        external_thread_id:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - open
            - closed
          default: open
        assignee_user_id:
          type: string
          format: uuid
          nullable: true
        metadata:
          type: object
          additionalProperties: true
    CommunicationThread:
      type: object
      properties:
        id:
          type: string
          format: uuid
        account_id:
          type: string
          format: uuid
        ticket_id:
          type: string
          format: uuid
          nullable: true
        review_id:
          type: string
          format: uuid
          nullable: true
        customer_id:
          type: string
          nullable: true
        inbox_id:
          type: string
          format: uuid
          nullable: true
        channel:
          $ref: '#/components/schemas/CommunicationChannel'
        channel_account_id:
          type: string
          nullable: true
        external_thread_id:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - open
            - closed
        assignee_user_id:
          type: string
          format: uuid
          nullable: true
        latest_message_id:
          type: string
          format: uuid
          nullable: true
        latest_message_at:
          type: string
          format: date-time
          nullable: true
        latest_message_preview:
          type: string
          nullable: true
        latest_message_channel:
          $ref: '#/components/schemas/CommunicationChannel'
        latest_message_direction:
          $ref: '#/components/schemas/CommunicationDirection'
        unread_count:
          type: number
        metadata:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        closed_at:
          type: string
          format: date-time
          nullable: true
        deleted_at:
          type: string
          format: date-time
          nullable: true
    Error:
      required:
        - error
        - details
      type: object
      properties:
        error:
          type: string
        details:
          type: string
    CommunicationChannel:
      type: string
      enum:
        - email
        - whatsapp
        - chat
        - review
        - system
        - other
    CommunicationDirection:
      type: string
      enum:
        - inbound
        - outbound
        - internal
        - system
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````