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

# Create Conversation

> Creates a new conversation with the data provided



## OpenAPI

````yaml /api-reference/conversations/openapi.json post /conversations
openapi: 3.0.0
info:
  title: Conversations API
  description: Documentation for Conversations API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Conversations
    description: Documentation for Conversations API
  - name: Search
    description: Documentation for Conversations API
  - name: Email
    description: Documentation for Conversations API
  - name: Messages
    description: Documentation for Conversations API
  - name: Providers
    description: Documentation for Conversations API
paths:
  /conversations:
    post:
      tags:
        - Conversations
      summary: Create Conversation
      description: Creates a new conversation with the data provided
      operationId: create-conversation
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-04-15'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConversationDto'
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateConversationSuccessResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
      security:
        - bearer:
            - conversations.write
components:
  schemas:
    CreateConversationDto:
      type: object
      properties:
        locationId:
          type: string
          description: Location ID as string
          example: tDtDnQdgm2LXpyiqYvZ6
        contactId:
          type: string
          description: Contact ID as string
          example: tDtDnQdgm2LXpyiqYvZ6
      required:
        - locationId
        - contactId
    CreateConversationSuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the API request was successful.
          example: true
        conversation:
          $ref: '#/components/schemas/ConversationCreateResponseDto'
      required:
        - success
        - conversation
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    ConversationCreateResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the conversation
          example: tDtDnQdgm2LXpyiqYvZ6
        dateUpdated:
          type: string
          description: Date when the conversation was last updated
          example: '2023-10-01T12:00:00Z'
        dateAdded:
          type: string
          description: Date when the conversation was created
          example: '2023-10-01T12:00:00Z'
        deleted:
          type: boolean
          description: Flag indicating if this conversation has been deleted
          example: false
        contactId:
          type: string
          description: Unique identifier of the contact associated with this conversation
          example: ve9EPM428kjkvShlRW1KT
        locationId:
          type: string
          description: >-
            Unique identifier of the business location where this conversation
            takes place
          example: ve9EPM428kjkvShlRW1KT
        lastMessageDate:
          type: string
          description: Date of the last message in the conversation
          example: '2023-10-01T12:00:00Z'
        assignedTo:
          type: string
          description: Unique identifier of the team member assigned to this conversation
          example: ve9EPM428kjkvShlRW1KT
      required:
        - id
        - dateUpdated
        - dateAdded
        - deleted
        - contactId
        - locationId
        - lastMessageDate
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Use the Access Token generated with user type as Sub-Account (OR)
        Private Integration Token of Sub-Account.
      type: http

````