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

# Get a specific thread by ID

> Retrieves detailed information about a specific thread, including its status, metadata, and message history.



## OpenAPI

````yaml GET /v1/agents/threads/{threadId}
openapi: 3.0.0
info:
  title: Devic.ai Public API
  description: >-
    Devic.ai is an AI platform that allows you to create, manage, and use AI
    agents for various tasks.
  version: 1.0.0
  contact:
    name: Devic.ai Support
    url: https://devic.ai
  x-logo:
    url: https://devic.ai/logo.png
    altText: Devic.ai Logo
  x-summary: Public API for interacting with Devic.ai platform
servers:
  - url: https://api.devic.ai
    description: Production server
  - url: https://staging-api.devic.ai
    description: Staging server
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Group agents, assistants, documents and costs into projects
  - name: Documents
    description: >-
      Knowledge base documents: create, version, attach and index markdown
      content for RAG
  - name: Document Folders
    description: Organise knowledge base documents into folders and attach them in bulk
  - name: Files
    description: Upload files and obtain shareable download URLs to attach to messages
  - name: Agents
    description: Endpoints related to AI agents and their operations
  - name: Assistants
    description: Endpoints for interacting with assistants and their specializations
  - name: Tool Servers
    description: Endpoints for managing tool servers and their tool definitions
  - name: Health
    description: API health check endpoints
  - name: Documentation
    description: Endpoints for retrieving markdown documentation
paths:
  /v1/agents/threads/{threadId}:
    get:
      tags:
        - Agents
      summary: Get a thread by ID
      description: >-
        Retrieves detailed information about a specific thread, including its
        status, metadata, and message history.
      operationId: getAgentThreadById
      parameters:
        - name: threadId
          in: path
          required: true
          description: UUID of the thread to retrieve
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Thread details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentThread'
        '401':
          description: Unauthorized - Invalid or missing token
        '404':
          description: Thread not found
        '429':
          description: Too Many Requests - Rate limit exceeded
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  schemas:
    AgentThread:
      type: object
      required:
        - id
        - agentId
        - status
        - createdAt
        - messages
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the thread
        agentId:
          type: string
          format: uuid
          description: Unique identifier for the associated agent
        status:
          $ref: '#/components/schemas/ThreadStatus'
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the thread was created
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the thread was last updated
        metadata:
          type: object
          additionalProperties: true
          description: Custom metadata associated with the thread
        messages:
          type: array
          items:
            $ref: '#/components/schemas/AgentThreadMessage'
          description: Messages exchanged in the thread
        cost:
          type: number
          format: float
          description: Total cost accumulated by this thread
    ThreadStatus:
      type: string
      enum:
        - RUNNING
        - PAUSED
        - COMPLETED
        - FAILED
        - AWAITING_APPROVAL
      description: Current status of the thread
    AgentThreadMessage:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
            - system
            - tool
          description: Role of the message sender
        content:
          type: string
          description: Content of the message
        name:
          type: string
          description: Name of the tool or function (for tool messages)
        tool_call_id:
          type: string
          description: Unique identifier for the tool call
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use JWT token for authentication

````