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

# Get turn by ID

> Get a single turn with all its messages and ``task_updates`` (same shape as list turns). 403 if session not owned, 404 if session or turn not found.



## OpenAPI

````yaml /openapi/em-talk2data-v2.yaml get /talk2data/chat/sessions/{session_id}/turns/{turn_id}
openapi: 3.1.0
info:
  title: Talk to Data Service
  version: 3.2.0-dev1
servers: []
security: []
paths:
  /talk2data/chat/sessions/{session_id}/turns/{turn_id}:
    get:
      tags:
        - chat-sessions
      summary: Get turn by ID
      description: >-
        Get a single turn with all its messages and ``task_updates`` (same shape
        as list turns). 403 if session not owned, 404 if session or turn not
        found.
      operationId: get_turn_talk2data_chat_sessions__session_id__turns__turn_id__get
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            description: Session ID
            title: Session Id
          description: Session ID
        - name: turn_id
          in: path
          required: true
          schema:
            type: string
            description: Turn ID
            title: Turn Id
          description: Turn ID
        - name: x-project-id
          in: header
          required: true
          schema:
            type: string
            description: Project identifier
            title: X-Project-Id
          description: Project identifier
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TurnItemResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TurnItemResponse:
      properties:
        turn_id:
          type: string
          title: Turn Id
        state:
          type: string
          title: State
          default: created
        feedback:
          anyOf:
            - $ref: '#/components/schemas/TurnFeedbackSummary'
            - type: 'null'
        messages:
          items:
            $ref: '#/components/schemas/TurnMessageResponse'
          type: array
          title: Messages
        task_updates:
          items:
            $ref: '#/components/schemas/TaskUpdateResponse'
          type: array
          title: Task Updates
      type: object
      required:
        - turn_id
        - messages
      title: TurnItemResponse
      description: >-
        One turn with messages and streamed task status history (from
        ``task_updates`` table).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TurnFeedbackSummary:
      properties:
        rating:
          type: string
          title: Rating
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        created_at:
          type: string
          title: Created At
        updated_at:
          type: string
          title: Updated At
      type: object
      required:
        - rating
        - comment
        - created_at
        - updated_at
      title: TurnFeedbackSummary
      description: Optional feedback summary attached to a turn.
    TurnMessageResponse:
      properties:
        message_id:
          type: string
          title: Message Id
        turn_id:
          type: string
          title: Turn Id
        role:
          type: string
          title: Role
        content:
          type: string
          title: Content
        message_type:
          type: string
          title: Message Type
        generated_artifacts:
          items:
            $ref: '#/components/schemas/GeneratedArtifactRef'
          type: array
          title: Generated Artifacts
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
        created_at:
          type: string
          title: Created At
      type: object
      required:
        - message_id
        - turn_id
        - role
        - content
        - message_type
        - task_id
        - created_at
      title: TurnMessageResponse
      description: One message within a turn.
    TaskUpdateResponse:
      properties:
        id:
          type: string
          title: Id
        turn_id:
          type: string
          title: Turn Id
        task_id:
          type: string
          title: Task Id
        state:
          type: string
          title: State
        final:
          type: boolean
          title: Final
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
          description: 'Extension JSON (e.g. {"agent": "..."} from A2A metadata).'
        agent:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent
          description: 'Convenience: agent label from data when present.'
        created_at:
          type: string
          title: Created At
          default: ''
      type: object
      required:
        - id
        - turn_id
        - task_id
        - state
        - final
      title: TaskUpdateResponse
      description: >-
        One persisted row from ``talk2data.task_updates`` (streamed A2A task
        status).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    GeneratedArtifactRef:
      properties:
        resource_uri:
          type: string
          title: Resource Uri
        artifact_type:
          type: string
          title: Artifact Type
        artifact_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Artifact Title
        artifact_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Artifact Description
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        created_at:
          type: string
          title: Created At
          default: ''
      type: object
      required:
        - resource_uri
        - artifact_type
      title: GeneratedArtifactRef
      description: Artifact produced by a message (in turn response).
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````