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

# Get a conversation

> A call or chat by its id, whichever it is. One started through `POST /v1/agent/{agentId}/conversations` reads back from the moment it is created, before it is recorded. For its transcript and metrics, read it as a call or chat, as `modality` says.



## OpenAPI

````yaml /api-reference/openapi.documented.json get /v1/conversation/{conversationId}
openapi: 3.1.0
info:
  title: Roark Analytics API
  description: >-
    The Roark Analytics API gives you access to the same API that powers the
    award winning Roark Analytics platform.
  version: 1.0.0
servers:
  - description: Production
    url: https://api.roark.ai
security:
  - Bearer: []
tags:
  - name: Agent
  - name: Customer
  - name: Agent Endpoint
  - name: Tool
  - name: Phone Number
  - name: Call
  - name: Chat
  - name: Conversation
  - name: Metric
  - name: Metric Policy
  - name: Metric Collection Job
  - name: Customer Flow
  - name: Customer Flow Edge Case
  - name: Simulation
  - name: Simulation Persona
  - name: Simulation Environment
  - name: Simulation Scenario
  - name: Simulation Run Plan
  - name: Simulation Template
  - name: Simulation Audio Clip
  - name: Simulation Run Plan Job
  - name: Simulation Job
  - name: HTTP Request Definition
  - name: Webhook
  - name: Issue
  - name: Autoimprove
  - name: Agent Config
  - name: Knowledge Base
  - name: Calendar Integration
  - name: MCP Server Integration
  - name: Config
  - name: Organization Project
  - name: Organization Project Member
  - name: Organization Project API Key
  - name: Organization Config
  - name: CLI Auth
  - name: Me
  - name: Project
  - name: Usage
  - name: Analytics
  - name: Dashboard
  - name: Live Report
  - name: Benchmark
  - name: Health
  - name: Campaign Credit
paths:
  /v1/conversation/{conversationId}:
    get:
      tags:
        - Conversation
      summary: Get a conversation
      description: >-
        A call or chat by its id, whichever it is. One started through `POST
        /v1/agent/{agentId}/conversations` reads back from the moment it is
        created, before it is recorded. For its transcript and metrics, read it
        as a call or chat, as `modality` says.
      operationId: getV1ConversationByConversationId
      parameters:
        - in: path
          name: conversationId
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          description: The conversation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Conversation'
                required:
                  - data
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Authentication error
              example:
                type: authentication
                code: unauthorized
                message: Authentication required
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Not found error
              example:
                type: not_found
                code: resource_not_found
                message: The requested resource could not be found
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Server error
              example:
                type: internal
                code: internal_error
                message: Internal server error
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Roark from '@roarkanalytics/sdk';


            const client = new Roark({
              bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
            });


            const response = await
            client.conversation.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from roark_analytics import Roark

            client = Roark(
                bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"),  # This is the default and can be omitted
            )
            response = client.conversation.get_by_id(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.data)
components:
  schemas:
    Conversation:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The conversation id: its call id or chat id. `modality` says which,
            and where to read its transcript and metrics (`/v1/call/{callId}` or
            `/v1/chat/{id}`).
        projectId:
          type: string
          format: uuid
        modality:
          type: string
          enum:
            - voice
            - chat
          description: >-
            `voice` or `chat`. A voice conversation is recorded as a call
            (`/v1/call/{callId}`), a chat as a chat (`/v1/chat/{id}`).
          example: voice
        status:
          type: string
          enum:
            - PENDING
            - IN_PROGRESS
            - ENDED
          description: >-
            `PENDING` until it starts (a call ringing, a chat nobody has joined
            yet), `IN_PROGRESS`, then `ENDED`.
          example: ENDED
        title:
          type:
            - string
            - 'null'
        summary:
          type:
            - string
            - 'null'
        startedAt:
          type: string
          description: When it started, or was created while pending (ISO 8601).
        endedAt:
          type:
            - string
            - 'null'
          description: When it ended (ISO 8601). Null until it ends.
        durationMs:
          type:
            - integer
            - 'null'
          description: How long it ran. Null until it ends.
        externalId:
          type:
            - string
            - 'null'
          description: Your own id for it, if one was given.
        createdAt:
          type: string
      required:
        - id
        - projectId
        - modality
        - status
        - title
        - summary
        - startedAt
        - endedAt
        - durationMs
        - externalId
        - createdAt
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - validation
            - authentication
            - forbidden
            - not_found
            - conflict
            - payment_required
            - rate_limit
            - internal
          description: The error type category
          examples:
            - validation
            - authentication
        code:
          type: string
          description: Machine-readable error code identifier
          examples:
            - invalid_parameter
            - missing_required_field
            - unauthorized
        message:
          type: string
          description: Human-readable error message
          examples:
            - The request was invalid
            - Authentication required
        param:
          type: string
          description: The parameter that caused the error (if applicable)
          examples:
            - email
            - user_id
        details:
          description: Additional error context information
      required:
        - type
        - code
        - message
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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