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

# Get insights for a conversation

> Retrieve insights for a specific conversation



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/ai/analytics.yml get /ai/conversations/{conversation_id}/conversations-insights
openapi: 3.1.0
info:
  title: Telnyx AI Analytics API
  version: 2.0.0
  description: API for AI conversations, insights, embeddings, and clusters.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /ai/conversations/{conversation_id}/conversations-insights:
    get:
      tags:
        - Conversations
      summary: Get insights for a conversation
      description: Retrieve insights for a specific conversation
      operationId: get_conversations_public__conversation_id__insights_get
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationInsightListData'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


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


            const response = await
            client.ai.conversations.retrieveConversationsInsights('conversation_id');


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

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.ai.conversations.retrieve_conversations_insights(
                "conversation_id",
            )
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.AI.Conversations.GetConversationsInsights(context.TODO(), \"conversation_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.ai.conversations.ConversationRetrieveConversationsInsightsParams;

            import
            com.telnyx.sdk.models.ai.conversations.ConversationRetrieveConversationsInsightsResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    ConversationRetrieveConversationsInsightsResponse response = client.ai().conversations().retrieveConversationsInsights("conversation_id");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            response =
            telnyx.ai.conversations.retrieve_conversations_insights("conversation_id")


            puts(response)
        - lang: CLI
          source: |-
            telnyx ai:conversations retrieve-conversations-insights \
              --api-key 'My API Key' \
              --conversation-id conversation_id
components:
  schemas:
    ConversationInsightListData:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ConversationInsight'
          type: array
          title: Data
        meta:
          $ref: '#/components/schemas/Meta'
      type: object
      required:
        - data
        - meta
      title: ConversationInsightListData
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    ConversationInsight:
      type: object
      required:
        - id
        - status
        - created_at
        - conversation_insights
      properties:
        id:
          type: string
          description: Unique identifier for the conversation insight.
        status:
          type: string
          enum:
            - pending
            - in_progress
            - completed
            - failed
          description: Current status of the insight generation for the conversation.
        created_at:
          type: string
          format: date-time
          description: Timestamp of when the object was created.
        conversation_insights:
          type: array
          description: List of insights extracted from the conversation.
          items:
            type: object
            required:
              - result
              - insight_id
            properties:
              result:
                type: string
                description: >-
                  Insight result from the conversation. If the insight has a
                  JSON schema, this will be stringified JSON object.
              insight_id:
                type: string
                description: Unique identifier for the insight configuration.
    Meta:
      properties:
        total_pages:
          type: integer
        total_results:
          type: integer
        page_number:
          type: integer
        page_size:
          type: integer
      type: object
      required:
        - total_pages
        - total_results
        - page_number
        - page_size
      title: Meta
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````