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

# Get Messages

> Get all Messages in a Thread, ordered from oldest to most recently sent



## OpenAPI

````yaml GET /message/{thread_id}
openapi: 3.0.1
info:
  title: Altur API
  description: >-
    An API aimed to allow third-party developers to interact with the Altur
    platform through a RESTful interface.
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.altur.io/api/v1.0
security:
  - apiKeyAuth: []
paths:
  /message/{thread_id}:
    get:
      description: Get all Messages in a Thread, ordered from oldest to most recently sent
      parameters:
        - name: thread_id
          in: path
          description: The identifier of the Thread to fetch
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Array containing all Messages in the Thread
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Message'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Thread not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Message:
      type: object
      properties:
        thread_id:
          description: Unique identifier of the Thread the Message belongs to
          type: string
        type:
          description: Message type enum
          type: string
          enum:
            - text
            - image
            - audio
            - video
            - button
            - template
            - document
        content:
          description: Message's text content
          type: string
        media:
          description: Message's media content, if any (usually in form of URL)
          type: string
        sent_by:
          description: Author of this message
          type: string
          enum:
            - AI
            - EU
            - SYS
        sent_by_user:
          description: Altur user id (if Message was sent manually by an in-app user)
          type: string
        sent_at:
          description: Datetime from when the Message was sent
          type: string
          format: date-time
        read:
          description: Boolean describing if the Message is considered as read
          type: boolean
      required:
        - thread_id
        - type
        - sent_by
        - sent_at
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Add `api-key YOUR_API_SECRET_KEY` as the value of the `Authorization`
        header.

````