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

# Load a conversation and mark its customer messages as read

> Allowed for an erased patient too: it only reads and marks as read, like the read endpoint.



## OpenAPI

````yaml /api-referansi/openapi.json post /v1/conversations/{id}/open
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: >-
    Flextell REST API referansı. Kimlik doğrulama, scope ve istek kuralları için
    API sekmesindeki rehberlere bakın.
servers:
  - url: https://app.flextell.ai/api
    description: Üretim
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/conversations/{id}/open:
    post:
      tags:
        - Conversation
      summary: Load a conversation and mark its customer messages as read
      description: >-
        Allowed for an erased patient too: it only reads and marks as read, like
        the read endpoint.
      operationId: conversation.open
      parameters:
        - name: id
          in: path
          required: true
          description: The conversation identifier
          schema:
            type: integer
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConversationOpenRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    type: object
                    properties:
                      messages: {}
                      read:
                        type: object
                        properties:
                          marked_count:
                            type: integer
                        required:
                          - marked_count
                      ai_suggestion:
                        anyOf:
                          - $ref: '#/components/schemas/AiSuggestionResource'
                          - type: 'null'
                      agent:
                        type: object
                        properties:
                          agent_disabled:
                            type: boolean
                          agent_expires_at:
                            type:
                              - string
                              - 'null'
                            format: date-time
                          agent_disabled_by_user_name:
                            type: string
                          remaining_minutes:
                            type:
                              - integer
                              - 'null'
                        required:
                          - agent_disabled
                          - agent_expires_at
                          - agent_disabled_by_user_name
                          - remaining_minutes
                    required:
                      - messages
                      - read
                      - ai_suggestion
                      - agent
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error_code:
                    type: string
                    const: RESOURCE_NOT_FOUND
                  message:
                    type: string
                    const: Conversation not found
                  errors:
                    type: 'null'
                  data:
                    type: 'null'
                required:
                  - success
                  - error_code
                  - message
                  - errors
                  - data
        '422':
          $ref: '#/components/responses/ValidationException'
        '428':
          description: >-
            Mandatory setup is incomplete. Finish the setup wizard first;
            `data.next_step` names the step to continue with.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    examples:
                      - false
                  error_code:
                    type: string
                    enum:
                      - SETUP_REQUIRED
                    examples:
                      - SETUP_REQUIRED
                  message:
                    type: string
                    examples:
                      - Complete the required setup steps to continue.
                  data:
                    type: object
                    properties:
                      next_step:
                        type:
                          - string
                          - 'null'
                        examples:
                          - clinic_info
                    required:
                      - next_step
                required:
                  - success
                  - error_code
                  - message
                  - data
components:
  schemas:
    ConversationOpenRequest:
      type: object
      properties:
        per_page:
          type:
            - integer
            - 'null'
          description: The number of items per page.
          minimum: 1
          maximum: 100
        page:
          type:
            - integer
            - 'null'
          description: The page number.
          minimum: 1
        search:
          type:
            - string
            - 'null'
          description: >-
            The search query. Matches the message body and, for voice messages,
            the audio transcript.
          maxLength: 255
        message_type:
          type:
            - array
            - 'null'
          description: >-
            Filter by message type. A message matches when its type is any of
            the given values.
          items:
            $ref: '#/components/schemas/ChatMessageType'
            description: >-
              A message type to filter by (text, audio, video, document, image,
              location, system).
      title: ConversationOpenRequest
    AiSuggestionResource:
      type: object
      properties:
        id:
          type: integer
        conversation_id:
          type: integer
        original_text:
          type: string
        final_text:
          type:
            - string
            - 'null'
        status:
          type: string
        rating:
          type:
            - string
            - 'null'
        pending_actions:
          type: string
        attachments:
          type: string
        actions:
          type: string
        block_reason:
          type: string
        editable_insert:
          type: boolean
        found_treatments:
          type: array
          items:
            type: string
        editable_found_treatments:
          type: boolean
        trigger_chat_log_ids:
          type: array
          items: {}
        has_new_messages:
          type: boolean
        generated_at:
          type:
            - string
            - 'null'
        sent_at:
          type:
            - string
            - 'null'
        created_at:
          type:
            - string
            - 'null'
        updated_at:
          type:
            - string
            - 'null'
      required:
        - id
        - conversation_id
        - original_text
        - final_text
        - status
        - rating
        - pending_actions
        - attachments
        - actions
        - block_reason
        - editable_insert
        - found_treatments
        - editable_found_treatments
        - trigger_chat_log_ids
        - has_new_messages
        - generated_at
        - sent_at
        - created_at
        - updated_at
      title: AiSuggestionResource
    ChatMessageType:
      type: string
      enum:
        - text
        - audio
        - video
        - document
        - image
        - sticker
        - location
        - contact
        - system
      title: ChatMessageType
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.