> ## Documentation Index
> Fetch the complete documentation index at: https://magica-adi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a chat



## OpenAPI

````yaml /openapi.yaml get /chats/{chatId}
openapi: 3.1.0
info:
  title: Galaxy Agent API
  version: 1.0.0
  description: |
    Public REST for agent chats, Magica tools, and run status.
    Authenticate with `Authorization: Bearer gxk_live_…`.
servers:
  - url: https://magica-backend-oda9.onrender.com/api/v1
    description: Production
  - url: http://localhost:4000/api/v1
    description: Local
security:
  - bearerAuth: []
tags:
  - name: Chats
  - name: Messages
  - name: Runs
  - name: Magica
paths:
  /chats/{chatId}:
    get:
      tags:
        - Chats
      summary: Get a chat
      operationId: getChat
      parameters:
        - $ref: '#/components/parameters/chatId'
      responses:
        '200':
          description: Chat
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Chat'
        '404':
          description: Not found, including chats owned by someone else
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    chatId:
      name: chatId
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Chat:
      type: object
      required:
        - id
        - title
        - isFavorite
        - lastMessageAt
        - lastMessageId
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        isFavorite:
          type: boolean
        lastMessageAt:
          type: string
          format: date-time
        lastMessageId:
          type: string
          format: uuid
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        code:
          type: string
          examples:
            - UNAUTHORIZED
            - CHAT_NOT_FOUND
            - RUN_ACTIVE
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key created in the product. Shown once, prefix `gxk_live_`.

````

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