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

# Get Messages

> Get Messages



## OpenAPI

````yaml api-reference/openapi-spec.json get /api/external/chatbot/{chatbotId}/conversations/{sessionId}/messages
openapi: 3.0.3
info:
  title: OKCHAT2.0
  version: 1.0.0
  contact: {}
servers:
  - url: https://v2.okchat.ai
  - url: http://localhost
security: []
tags: []
paths:
  /api/external/chatbot/{chatbotId}/conversations/{sessionId}/messages:
    parameters:
      - name: chatbotId
        in: path
        required: true
        schema:
          type: string
          example: 5afe16ed-5fd2-4552-a993-903bc9c32bb6
      - name: sessionId
        in: path
        required: true
        schema:
          type: string
          example: f081d259-6c72-4eca-8687-1b6ed716257e
    get:
      summary: Get Messages
      description: Get Messages
      operationId: getMessages
      parameters:
        - name: page
          in: query
          schema:
            type: string
            example: '1'
        - name: limit
          in: query
          schema:
            type: string
            example: '10'
        - name: x-api-key
          in: header
          schema:
            type: string
            example: 15a23c21867f4f38b0b46f5e4adb1caf87a040b34eb58f68
      requestBody:
        content:
          application/json:
            examples:
              Get Messages:
                value: ''
      responses:
        '200':
          description: Example
          headers:
            Access-Control-Allow-Credentials:
              schema:
                type: string
                example: 'true'
            Access-Control-Allow-Headers:
              schema:
                type: string
                example: >-
                  X-CSRF-Token, X-Requested-With, Accept, Accept-Version,
                  Content-Length, Content-MD5, Content-Type, Date, X-Api-Version
            Access-Control-Allow-Methods:
              schema:
                type: string
                example: GET,OPTIONS,PATCH,DELETE,POST,PUT
            Access-Control-Allow-Origin:
              schema:
                type: string
                example: '*'
            Connection:
              schema:
                type: string
                example: keep-alive
            Date:
              schema:
                type: string
                example: Wed, 22 Jan 2025 10:41:54 GMT
            Keep-Alive:
              schema:
                type: string
                example: timeout=5
            Transfer-Encoding:
              schema:
                type: string
                example: chunked
            vary:
              schema:
                type: string
                example: >-
                  RSC, Next-Router-State-Tree, Next-Router-Prefetch,
                  Next-Router-Segment-Prefetch
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        attachments:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                example: 0.806494468977148.png
                              url:
                                type: string
                                example: >-
                                  https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.806494468977148.png
                          nullable: true
                          example:
                            - name: 0.806494468977148.png
                              url: >-
                                https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.806494468977148.png
                            - name: 0.47461492756254064.png
                              url: >-
                                https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.47461492756254064.png
                            - name: 0.34089790317279434.png
                              url: >-
                                https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.34089790317279434.png
                        content:
                          type: string
                          example: Describe this image
                        created_at:
                          type: string
                          example: '2025-03-05T04:25:58.059835+00:00'
                        id:
                          type: string
                          example: b10506a1-1ca7-4336-a72b-f37782c6a054
                        metadata:
                          type: object
                          properties:
                            mid:
                              type: string
                              example: msg-Mzs8wSy4weVyiALOzzZRDles
                        migrated_data:
                          type: boolean
                          example: false
                        model:
                          type: string
                          nullable: true
                          example: null
                        provider:
                          type: string
                          nullable: true
                          example: null
                        sender_type:
                          type: string
                          example: user
                        session_id:
                          type: string
                          example: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token:
                          nullable: true
                          example: null
                        tokens_used:
                          type: number
                          example: 0
                        tool_calls:
                          type: array
                          nullable: true
                          example: null
                        tool_results:
                          type: array
                          nullable: true
                          example: null
                    example:
                      - attachments:
                          - name: 0.806494468977148.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.806494468977148.png
                          - name: 0.47461492756254064.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.47461492756254064.png
                          - name: 0.34089790317279434.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.34089790317279434.png
                        content: Describe this image
                        created_at: '2025-03-05T04:25:58.059835+00:00'
                        id: b10506a1-1ca7-4336-a72b-f37782c6a054
                        metadata: {}
                        migrated_data: false
                        model: null
                        provider: null
                        sender_type: user
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: null
                        tool_results: null
                      - attachments: null
                        content: >-
                          The images depict a serene camping scene set in a
                          mountainous landscape. 


                          1. **First Image**: A tent is pitched on a grassy area
                          surrounded by tall trees and boulders, with majestic
                          snow-capped mountains in the background. A campfire is
                          burning nearby, creating a cozy atmosphere.


                          2. **Second Image**: A robot stands in the same
                          picturesque setting, next to the tent. The robot has a
                          vintage design, featuring metallic elements and a
                          friendly appearance, suggesting it might be a
                          companion for outdoor adventures.


                          3. **Third Image**: Another robot, similar in style to
                          the second, is present in a slightly different area of
                          the campsite. This robot also has a vintage look,
                          wearing a cap and equipped with various tools,
                          indicating it might assist with camping tasks.


                          Overall, the images blend elements of nature with
                          whimsical robotic characters, creating a unique and
                          imaginative camping scenario.
                        created_at: '2025-03-05T04:26:10.241508+00:00'
                        id: 85706af7-c3f1-413a-b4fb-43eda8d258d7
                        metadata: {}
                        migrated_data: false
                        model: gpt-4o-mini
                        provider: openai
                        sender_type: bot
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: []
                        tool_results: []
                      - attachments:
                          - name: 0.031071150695289873.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.031071150695289873.png
                          - name: 0.5423937996768102.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.5423937996768102.png
                          - name: 0.7798706640238224.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.7798706640238224.png
                        content: Describe these images
                        created_at: '2025-03-05T07:08:50.863723+00:00'
                        id: e69359c7-caf7-419b-906e-0f478a94ccde
                        metadata: {}
                        migrated_data: false
                        model: null
                        provider: null
                        sender_type: user
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: null
                        tool_results: null
                      - attachments: null
                        content: >-
                          Here are descriptions of the images:


                          1. **First Image**: A serene camping scene featuring a
                          large tent set in a lush green meadow. The background
                          showcases majestic mountains with snow-capped peaks
                          under a clear blue sky. A small campfire is burning
                          nearby, surrounded by rocks, adding to the tranquil
                          outdoor atmosphere.


                          2. **Second Image**: A whimsical robot stands in the
                          same picturesque camping setting. The robot has a
                          vintage design with metallic features and large,
                          expressive eyes. It appears to be exploring the area,
                          with the tent and mountains in the background,
                          creating a blend of nature and technology.


                          3. **Third Image**: Another robot, similar in style to
                          the second, is depicted in the same outdoor
                          environment. This robot has a different design,
                          featuring a cap and a utility belt, suggesting it
                          might be equipped for camping or exploration. The
                          background includes a cabin and additional tents,
                          enhancing the camping theme.
                        created_at: '2025-03-05T07:09:05.423355+00:00'
                        id: 9a0e408d-1588-4d64-9e33-814a56b0543b
                        metadata: {}
                        migrated_data: false
                        model: gpt-4o-mini
                        provider: openai
                        sender_type: bot
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: []
                        tool_results: []
                      - attachments:
                          - name: 0.3554636060885503.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.3554636060885503.png
                        content: describe this image
                        created_at: '2025-03-06T06:54:57.123427+00:00'
                        id: 5a5e3b4d-9894-4e78-be11-fbd637034c27
                        metadata: {}
                        migrated_data: false
                        model: null
                        provider: null
                        sender_type: user
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: null
                        tool_results: null
                      - attachments: null
                        content: >-
                          The image depicts a serene camping scene. In the
                          foreground, there is a pitched tent on a grassy area
                          surrounded by rocks. Next to the tent, a campfire is
                          burning, adding warmth and ambiance to the setting. In
                          the background, a range of majestic, snow-capped
                          mountains rises beneath a clear blue sky with a bright
                          sun. Tall evergreen trees frame the scene,
                          contributing to the tranquil and natural atmosphere.
                        created_at: '2025-03-06T06:55:07.999262+00:00'
                        id: 4492f637-8a3a-4bfa-abc6-8dd1a561926b
                        metadata:
                          mid: msg-Mzs8wSy4weVyiALOzzZRDles
                        migrated_data: false
                        model: gpt-4o
                        provider: openai
                        sender_type: bot
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: []
                        tool_results: []
                      - attachments:
                          - name: 0.4848606669311497.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.4848606669311497.png
                        content: describe this image pls
                        created_at: '2025-03-06T07:11:47.402167+00:00'
                        id: 1d96c472-172e-4dee-bbe5-fbe7ce56b4e5
                        metadata: {}
                        migrated_data: false
                        model: null
                        provider: null
                        sender_type: user
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: null
                        tool_results: null
                      - attachments: null
                        content: >-
                          The image shows an error message indicating "Server
                          selection timed out after 30000 ms." It mentions a
                          problem connecting to a specific server, with an
                          option to "REVIEW" the issue. There's a warning icon
                          next to the message.
                        created_at: '2025-03-06T07:11:54.899588+00:00'
                        id: 90459d74-ffdd-4088-a75f-a9002d5eeb09
                        metadata:
                          mid: msg-ZhahmWh01hRFKAqqQ2BzkCBP
                        migrated_data: false
                        model: gpt-4o
                        provider: openai
                        sender_type: bot
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: []
                        tool_results: []
                      - attachments:
                          - name: 0.8697358026985564.jpeg
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.8697358026985564.jpeg
                        content: Describe this image
                        created_at: '2025-03-08T07:59:25.422254+00:00'
                        id: 10ddabba-c38a-418b-88ea-5a7df7eaa95f
                        metadata: {}
                        migrated_data: false
                        model: null
                        provider: null
                        sender_type: user
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: null
                        tool_results: null
                      - attachments: null
                        content: >-
                          The image captures a city skyline at sunrise or
                          sunset. The sun is positioned low on the horizon,
                          casting a warm glow over the skyscrapers. Tall
                          buildings, including one with a prominent spire, are
                          silhouetted against the vibrant sky. The street below
                          is lined with more buildings, and the overall scene
                          conveys a serene urban atmosphere.
                        created_at: '2025-03-08T07:59:34.45648+00:00'
                        id: bdd8e93c-9d80-4fa6-bf8d-f230cfadcaeb
                        metadata:
                          mid: msg-Fs9PbjHF38Tg8OOvvyP2ZYBh
                        migrated_data: false
                        model: gpt-4o
                        provider: openai
                        sender_type: bot
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: []
                        tool_results: []
                  metadata:
                    type: object
                    properties:
                      currentPage:
                        type: number
                        example: 1
                      pageSize:
                        type: number
                        example: 10
                      totalCount:
                        type: number
                        example: 10
                      totalPages:
                        type: number
                        example: 1
              examples:
                Example:
                  value:
                    data:
                      - attachments:
                          - name: 0.806494468977148.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.806494468977148.png
                          - name: 0.47461492756254064.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.47461492756254064.png
                          - name: 0.34089790317279434.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.34089790317279434.png
                        content: Describe this image
                        created_at: '2025-03-05T04:25:58.059835+00:00'
                        id: b10506a1-1ca7-4336-a72b-f37782c6a054
                        metadata: {}
                        migrated_data: false
                        model: null
                        provider: null
                        sender_type: user
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: null
                        tool_results: null
                      - attachments: null
                        content: >-
                          The images depict a serene camping scene set in a
                          mountainous landscape. 


                          1. **First Image**: A tent is pitched on a grassy area
                          surrounded by tall trees and boulders, with majestic
                          snow-capped mountains in the background. A campfire is
                          burning nearby, creating a cozy atmosphere.


                          2. **Second Image**: A robot stands in the same
                          picturesque setting, next to the tent. The robot has a
                          vintage design, featuring metallic elements and a
                          friendly appearance, suggesting it might be a
                          companion for outdoor adventures.


                          3. **Third Image**: Another robot, similar in style to
                          the second, is present in a slightly different area of
                          the campsite. This robot also has a vintage look,
                          wearing a cap and equipped with various tools,
                          indicating it might assist with camping tasks.


                          Overall, the images blend elements of nature with
                          whimsical robotic characters, creating a unique and
                          imaginative camping scenario.
                        created_at: '2025-03-05T04:26:10.241508+00:00'
                        id: 85706af7-c3f1-413a-b4fb-43eda8d258d7
                        metadata: {}
                        migrated_data: false
                        model: gpt-4o-mini
                        provider: openai
                        sender_type: bot
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: []
                        tool_results: []
                      - attachments:
                          - name: 0.031071150695289873.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.031071150695289873.png
                          - name: 0.5423937996768102.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.5423937996768102.png
                          - name: 0.7798706640238224.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.7798706640238224.png
                        content: Describe these images
                        created_at: '2025-03-05T07:08:50.863723+00:00'
                        id: e69359c7-caf7-419b-906e-0f478a94ccde
                        metadata: {}
                        migrated_data: false
                        model: null
                        provider: null
                        sender_type: user
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: null
                        tool_results: null
                      - attachments: null
                        content: >-
                          Here are descriptions of the images:


                          1. **First Image**: A serene camping scene featuring a
                          large tent set in a lush green meadow. The background
                          showcases majestic mountains with snow-capped peaks
                          under a clear blue sky. A small campfire is burning
                          nearby, surrounded by rocks, adding to the tranquil
                          outdoor atmosphere.


                          2. **Second Image**: A whimsical robot stands in the
                          same picturesque camping setting. The robot has a
                          vintage design with metallic features and large,
                          expressive eyes. It appears to be exploring the area,
                          with the tent and mountains in the background,
                          creating a blend of nature and technology.


                          3. **Third Image**: Another robot, similar in style to
                          the second, is depicted in the same outdoor
                          environment. This robot has a different design,
                          featuring a cap and a utility belt, suggesting it
                          might be equipped for camping or exploration. The
                          background includes a cabin and additional tents,
                          enhancing the camping theme.
                        created_at: '2025-03-05T07:09:05.423355+00:00'
                        id: 9a0e408d-1588-4d64-9e33-814a56b0543b
                        metadata: {}
                        migrated_data: false
                        model: gpt-4o-mini
                        provider: openai
                        sender_type: bot
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: []
                        tool_results: []
                      - attachments:
                          - name: 0.3554636060885503.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.3554636060885503.png
                        content: describe this image
                        created_at: '2025-03-06T06:54:57.123427+00:00'
                        id: 5a5e3b4d-9894-4e78-be11-fbd637034c27
                        metadata: {}
                        migrated_data: false
                        model: null
                        provider: null
                        sender_type: user
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: null
                        tool_results: null
                      - attachments: null
                        content: >-
                          The image depicts a serene camping scene. In the
                          foreground, there is a pitched tent on a grassy area
                          surrounded by rocks. Next to the tent, a campfire is
                          burning, adding warmth and ambiance to the setting. In
                          the background, a range of majestic, snow-capped
                          mountains rises beneath a clear blue sky with a bright
                          sun. Tall evergreen trees frame the scene,
                          contributing to the tranquil and natural atmosphere.
                        created_at: '2025-03-06T06:55:07.999262+00:00'
                        id: 4492f637-8a3a-4bfa-abc6-8dd1a561926b
                        metadata:
                          mid: msg-Mzs8wSy4weVyiALOzzZRDles
                        migrated_data: false
                        model: gpt-4o
                        provider: openai
                        sender_type: bot
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: []
                        tool_results: []
                      - attachments:
                          - name: 0.4848606669311497.png
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.4848606669311497.png
                        content: describe this image pls
                        created_at: '2025-03-06T07:11:47.402167+00:00'
                        id: 1d96c472-172e-4dee-bbe5-fbe7ce56b4e5
                        metadata: {}
                        migrated_data: false
                        model: null
                        provider: null
                        sender_type: user
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: null
                        tool_results: null
                      - attachments: null
                        content: >-
                          The image shows an error message indicating "Server
                          selection timed out after 30000 ms." It mentions a
                          problem connecting to a specific server, with an
                          option to "REVIEW" the issue. There's a warning icon
                          next to the message.
                        created_at: '2025-03-06T07:11:54.899588+00:00'
                        id: 90459d74-ffdd-4088-a75f-a9002d5eeb09
                        metadata:
                          mid: msg-ZhahmWh01hRFKAqqQ2BzkCBP
                        migrated_data: false
                        model: gpt-4o
                        provider: openai
                        sender_type: bot
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: []
                        tool_results: []
                      - attachments:
                          - name: 0.8697358026985564.jpeg
                            url: >-
                              https://alwiuiydhxcstgrluarg.supabase.co/storage/v1/object/public/user_images/internal/0.8697358026985564.jpeg
                        content: Describe this image
                        created_at: '2025-03-08T07:59:25.422254+00:00'
                        id: 10ddabba-c38a-418b-88ea-5a7df7eaa95f
                        metadata: {}
                        migrated_data: false
                        model: null
                        provider: null
                        sender_type: user
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: null
                        tool_results: null
                      - attachments: null
                        content: >-
                          The image captures a city skyline at sunrise or
                          sunset. The sun is positioned low on the horizon,
                          casting a warm glow over the skyscrapers. Tall
                          buildings, including one with a prominent spire, are
                          silhouetted against the vibrant sky. The street below
                          is lined with more buildings, and the overall scene
                          conveys a serene urban atmosphere.
                        created_at: '2025-03-08T07:59:34.45648+00:00'
                        id: bdd8e93c-9d80-4fa6-bf8d-f230cfadcaeb
                        metadata:
                          mid: msg-Fs9PbjHF38Tg8OOvvyP2ZYBh
                        migrated_data: false
                        model: gpt-4o
                        provider: openai
                        sender_type: bot
                        session_id: f081d259-6c72-4eca-8687-1b6ed716257e
                        session_token: null
                        tokens_used: 0
                        tool_calls: []
                        tool_results: []
                    metadata:
                      currentPage: 1
                      pageSize: 10
                      totalCount: 10
                      totalPages: 1

````