> ## 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 Insight Template Groups

> Get all insight groups



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/ai/analytics.yml get /ai/conversations/insight-groups
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/insight-groups:
    get:
      tags:
        - Conversations
      summary: Get Insight Template Groups
      description: Get all insight groups
      operationId: get_all_insight_groups
      parameters:
        - name: page
          in: query
          style: deepObject
          explode: true
          description: >-
            Consolidated page parameter (deepObject style). Originally:
            page[number], page[size]
          schema:
            type: object
            properties:
              number:
                type: integer
                minimum: 1
                description: Page number (0-based)
                default: 1
                title: Page[Number]
              size:
                type: integer
                exclusiveMaximum: 100
                minimum: 0
                description: Number of items per page
                default: 20
                title: Page[Size]
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetInsightTemplateGroupsRespData'
        '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
            });


            // Automatically fetches more pages as needed.

            for await (const insightTemplateGroup of
            client.ai.conversations.insightGroups.retrieveInsightGroups()) {
              console.log(insightTemplateGroup.id);
            }
        - 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
            )

            page =
            client.ai.conversations.insight_groups.retrieve_insight_groups()

            page = page.data[0]

            print(page.id)
        - 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\tpage, err := client.AI.Conversations.InsightGroups.GetInsightGroups(context.TODO(), telnyx.AIConversationInsightGroupGetInsightGroupsParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\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.insightgroups.InsightGroupRetrieveInsightGroupsPage;

            import
            com.telnyx.sdk.models.ai.conversations.insightgroups.InsightGroupRetrieveInsightGroupsParams;


            public final class Main {
                private Main() {}

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

                    InsightGroupRetrieveInsightGroupsPage page = client.ai().conversations().insightGroups().retrieveInsightGroups();
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            page =
            telnyx.ai.conversations.insight_groups.retrieve_insight_groups


            puts(page)
        - lang: CLI
          source: |-
            telnyx ai:conversations:insight-groups retrieve-insight-groups \
              --api-key 'My API Key'
components:
  schemas:
    GetInsightTemplateGroupsRespData:
      properties:
        data:
          items:
            $ref: '#/components/schemas/InsightTemplateGroupResp'
          type: array
          title: Data
        meta:
          $ref: '#/components/schemas/Meta'
      type: object
      required:
        - data
        - meta
      title: GetInsightTemplateGroupsRespData
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    InsightTemplateGroupResp:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        created_at:
          type: string
          format: date-time
          title: Created At
        insights:
          items:
            $ref: '#/components/schemas/InsightTemplateResp'
          type: array
          title: Insights
        webhook:
          type: string
          title: Webhook
          default: ''
      type: object
      required:
        - id
        - name
        - created_at
      title: InsightTemplateGroupResp
    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
    InsightTemplateResp:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        instructions:
          type: string
          title: Instructions
        created_at:
          type: string
          format: date-time
          title: Created At
        insight_type:
          $ref: '#/components/schemas/TemplateType'
          default: custom
        name:
          type: string
          title: Name
          default: ''
        webhook:
          type: string
          title: Webhook
          default: ''
        json_schema:
          anyOf:
            - type: string
            - type: object
              title: JsonSchemaObject
          title: Json Schema
          description: If specified, the output will follow the JSON schema.
      type: object
      required:
        - id
        - instructions
        - created_at
      title: InsightTemplateResp
    TemplateType:
      type: string
      enum:
        - custom
        - default
      title: TemplateType
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````