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

# Get recent messages

> Get the 5 most recent messages from a thread



## OpenAPI

````yaml GET /messages/threads/{accountId}/get-recent/{threadId}
openapi: 3.1.0
info:
  title: A1Base API
  description: API for sending and receiving messages across messaging platforms
  version: 0.1.0
servers:
  - url: https://api.a1base.com/v1
    description: A1Base API server
  - url: https://your.endpoint.com
    description: Your webhook endpoint
security:
  - apiKeyAuth: []
    apiSecretAuth: []
paths:
  /messages/threads/{accountId}/get-recent/{threadId}:
    get:
      summary: Get Recent Thread Messages
      description: Get the 5 most recent messages from a thread
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: threadId
          in: path
          required: true
          schema:
            type: string
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
        - name: X-API-Secret
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Recent messages retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    type: array
                    items:
                      type: object
        '404':
          description: Thread not found
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    apiSecretAuth:
      type: apiKey
      in: header
      name: X-API-Secret

````