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

# Gets the messages in a thread



## OpenAPI

````yaml https://app.cassidyai.com/api/openapi.json get /assistants/thread/get
openapi: 3.1.1
info:
  title: Cassidy Agents API
  description: >-
    Chat with your Cassidy Agents from your own apps: start chats, send
    messages, and read chat history.
  version: 1.0.0
servers:
  - url: https://app.cassidyai.com/api
security: []
tags:
  - name: Agents
externalDocs:
  url: https://docs.cassidyai.com/reference/agents-api
paths:
  /assistants/thread/get:
    get:
      tags:
        - Agents
      summary: Gets the messages in a thread
      operationId: assistantApiRouter-getThread
      parameters:
        - in: query
          name: thread_id
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  thread_id:
                    type: string
                  name:
                    type: string
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  organization_id:
                    type: string
                  assistant_id:
                    type:
                      - string
                      - 'null'
                  messages:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            node_type:
                              type: string
                              const: user
                            created_at:
                              type:
                                - string
                                - 'null'
                            in_reply_to_message_id:
                              type:
                                - string
                                - 'null'
                            contents:
                              type: string
                          required:
                            - id
                            - node_type
                            - created_at
                            - in_reply_to_message_id
                            - contents
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                            node_type:
                              type: string
                              const: assistant
                            created_at:
                              type:
                                - string
                                - 'null'
                            in_reply_to_message_id:
                              type:
                                - string
                                - 'null'
                            contents:
                              type: object
                              properties:
                                content:
                                  type: string
                                references:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                      url:
                                        type: string
                                        format: uri
                                    required:
                                      - name
                                      - url
                                    additionalProperties: false
                                content_with_references:
                                  type: string
                              required:
                                - content
                                - references
                                - content_with_references
                              additionalProperties: false
                          required:
                            - id
                            - node_type
                            - created_at
                            - in_reply_to_message_id
                            - contents
                          additionalProperties: false
                      type: object
                required:
                  - thread_id
                  - name
                  - created_at
                  - updated_at
                  - organization_id
                  - assistant_id
                  - messages
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - bearerAuth: []
components:
  schemas:
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Not found
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Not found error (404)
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An API key from Organization Settings > API Keys.

````

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