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

# Get message by ID



## OpenAPI

````yaml get /api/agent-server/messages/{message_id}
openapi: 3.0.3
info:
  title: HasteKit Gateway API
  description: API specification for the HasteKit Gateway
  version: 1.0.0
servers:
  - url: http://localhost:6060
    description: Local development server
  - url: https://app.hastekit.ai
    description: Production server
security: []
tags:
  - name: Health
    description: Health check endpoints
  - name: Projects
    description: Project management endpoints
  - name: Agents
    description: Agent configuration endpoints
  - name: Models
    description: Model configuration endpoints
  - name: Prompts
    description: Prompt management endpoints
  - name: Providers
    description: Provider and API key management endpoints
  - name: VirtualKeys
    description: Virtual key management endpoints
  - name: MCPServers
    description: MCP server management endpoints
  - name: Schemas
    description: Schema management endpoints
  - name: Conversations
    description: Conversation, thread, and message management endpoints
  - name: Gateway
    description: LLM Gateway endpoints
  - name: Converse
    description: Agent conversation endpoints
  - name: Traces
    description: Tracing and observability endpoints
paths:
  /api/agent-server/messages/{message_id}:
    get:
      tags:
        - Conversations
      summary: Get message by ID
      operationId: getMessage
      parameters:
        - name: message_id
          in: path
          required: true
          schema:
            type: string
        - name: project_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
        - name: namespace
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Message retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    MessageResponse:
      allOf:
        - $ref: '#/components/schemas/StandardResponse'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/Message'
    StandardResponse:
      type: object
      properties:
        error:
          type: boolean
        message:
          type: string
        data:
          type: object
        status:
          type: integer
        errorDetails:
          type: object
    Message:
      type: object
      properties:
        id:
          type: string
        thread_id:
          type: string
        role:
          type: string
        content:
          type: string
        created_at:
          type: string
          format: date-time
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StandardResponse'
          example:
            error: true
            message: Invalid request
            status: 400
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StandardResponse'
          example:
            error: true
            message: Internal server error
            status: 500

````