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

# Get Chat Cell

> Retrieve a single cell from a chat by ID



## OpenAPI

````yaml GET /v2/chats/{id}/cells/{cellId}
openapi: 3.1.0
info:
  title: TextQL v2 API
  version: '2.0'
  description: >
    REST API for TextQL platform operations. All endpoints require Bearer token
    authentication.
servers:
  - url: https://app.textql.com
security:
  - bearerAuth: []
tags:
  - name: Chat
    description: Create and manage AI chat sessions
  - name: Connectors
    description: List available data connectors
  - name: Playbooks
    description: Create, configure, and run automated playbooks
  - name: Sandcastles
    description: Manage Python sandbox environments for code execution
  - name: Changes
    description: Review, approve, and deny Context Library changes
  - name: API Keys
    description: Mint and revoke scoped platform API keys
paths:
  /v2/chats/{id}/cells/{cellId}:
    get:
      tags:
        - Chat
      summary: Get Chat Cell
      description: Retrieve a single cell from a chat by ID.
      operationId: v2.getChatCell
      parameters:
        - $ref: '#/components/parameters/ChatId'
        - $ref: '#/components/parameters/CellId'
      responses:
        '200':
          description: Chat cell
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCell'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    ChatId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Chat ID
    CellId:
      name: cellId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Cell ID
  schemas:
    ChatCell:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Cell ID
        type:
          type: string
          description: >-
            Cell type (e.g. markdown, python, sql, tableau_sql, metrics,
            ontology_query, javascript, bash, mcp_tool, preview, web_search)
        status:
          type: string
          enum:
            - completed
            - running
            - pending
            - halted
            - failed
            - unknown
        created_at:
          type: string
          format: date-time
        error:
          type: string
          description: Execution error, when the step failed
        role:
          type: string
          enum:
            - user
            - assistant
          description: Message author (markdown cells only)
        content:
          type: string
          description: Markdown content (markdown cells only)
        code:
          type: string
          description: Executed code (python, javascript, and bash cells)
        query:
          type: string
          description: Executed query (sql, tableau_sql, metrics, and ontology_query cells)
        connector_id:
          type: integer
          format: int32
          description: Connector the query ran against (sql and ontology_query cells)
        output:
          type: array
          items:
            type: string
          description: Captured stdout/stderr (python, javascript, and bash cells)
        dataframe_preview:
          type: string
          description: Markdown preview of the result set (query and python cells)
        execution_time_ms:
          type: integer
          format: int64
        tool_name:
          type: string
          description: MCP tool invoked, as server/tool (mcp_tool cells only)
        assets:
          type: array
          items:
            $ref: '#/components/schemas/Asset'
          description: Assets this cell produced
    Asset:
      type: object
      properties:
        name:
          type: string
          description: Asset name
        type:
          type: string
          description: Asset type (e.g. chart, image, table, pdf, html, text, download)
        url:
          type: string
          description: Asset URL, freshly signed on every fetch
        content:
          type: string
          description: Inline text content, for text assets served without a URL
        cell_id:
          type: string
          format: uuid
          description: ID of the cell that produced this asset
        created_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code
              enum:
                - invalid_request
                - unauthenticated
                - permission_denied
                - not_found
                - conflict
                - rate_limit_exceeded
                - internal
                - timeout
                - cancelled
                - execution_failed
                - no_report
            message:
              type: string
              description: Human-readable error message
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: invalid_request
              message: Invalid request body
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthenticated
              message: Authentication required
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: permission_denied
              message: Insufficient permissions
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_found
              message: Resource not found
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: Rate limit exceeded
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: internal
              message: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or JWT token

````