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

# get chat messages

> retrieve the messages of a chat thread, oldest first



## OpenAPI

````yaml /api-reference/graph.json get /graph/chats/{chat_id}/messages
openapi: 3.1.2
info:
  title: Bevor Graph API
  version: 1.0.0
servers: []
security: []
tags:
  - name: code
    description: Code versions and their files.
  - name: graph
    description: 'Graph structure of a code version: nodes, edges, and call chains.'
  - name: chat
    description: Chat threads and messages scoped to code versions.
paths:
  /graph/chats/{chat_id}/messages:
    get:
      tags:
        - chat
      summary: get chat messages
      description: retrieve the messages of a chat thread, oldest first
      parameters:
        - name: chat_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                properties:
                  results:
                    items:
                      $ref: '#/components/schemas/ChatMessageSchema'
                    title: Results
                    type: array
                title: ResultsResponse[ChatMessageSchema]
                type: object
        '400':
          description: Error Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - BearerAuth: []
components:
  schemas:
    ChatMessageSchema:
      properties:
        id:
          title: Id
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        chat_id:
          title: Chat Id
          type: string
        chat_role:
          enum:
            - user
            - system
            - assistant
          title: Chat Role
          type: string
        message:
          title: Message
          type: string
        refs:
          items:
            $ref: '#/components/schemas/InlineRef'
          title: Refs
          type: array
        has_proposal:
          default: false
          title: Has Proposal
          type: boolean
        proposal_status:
          type: string
          nullable: true
      required:
        - id
        - created_at
        - chat_id
        - chat_role
        - message
      title: ChatMessageSchema
      type: object
    ApiError:
      properties:
        code:
          enum:
            - auth.session_expired
            - auth.session_revoked
            - auth.session_invalid
            - auth.user_does_not_exist
            - auth.invalid_team_membership
            - auth.unauthorized
            - auth.key_revoked
            - auth.key_invalid
            - auth.payment_required
            - auth.team_required
            - auth.invalid_permissions
            - error.not_found
            - error.invalid_scope
            - error.limit
            - error.entity_deleted
            - error.invalid_state
            - error.conflict
            - error.integrity
            - error.database
            - error.validation
            - error.server
            - analysis.entrypoint_failure
            - code.unsupported
            - code.node_invalid
            - code.conflict
            - app.rate_limit
            - payment.error
            - payment.failed
          title: Code
          type: string
        message:
          title: Message
          type: string
      required:
        - code
        - message
      title: ApiError
      type: object
    InlineRef:
      properties:
        id:
          title: Id
          type: string
        type:
          title: Type
          type: string
        source:
          title: Source
          type: string
        ref_ind:
          default: -1
          title: Ref Ind
          type: integer
        name:
          type: string
          nullable: true
        is_stale:
          default: false
          title: Is Stale
          type: boolean
      required:
        - id
        - type
        - source
      title: InlineRef
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key in Bearer token format

````