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

> Retrieve every customer insight the AI has surfaced, paginated. Use when driving the customer insights categorisation workflow from external code.

# Get customer insights



## OpenAPI

````yaml post /insights
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /insights:
    post:
      summary: Get customer insights
      description: Retrieve customer insights (paginated response)
      operationId: getVocInsights
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetVocQueryDto'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicPaginatedInsightsDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    GetVocQueryDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/GetVocQueryDtoInput'
      type: object
      properties:
        category:
          anyOf:
            - type: string
            - type: 'null'
          description: Filter by category name
        status:
          anyOf:
            - default: all
              type: string
              enum:
                - all
                - unresolved
                - resolved
                - archived
            - type: 'null'
        sentiment:
          anyOf:
            - description: Filter by sentiment
              type: string
              enum:
                - angry
                - happy
                - neutral
            - type: 'null'
        sortBy:
          anyOf:
            - default: occurrence_count
              type: string
              enum:
                - occurrence_count
                - last_seen_at
                - first_seen_at
                - created_at
            - type: 'null'
        sortOrder:
          anyOf:
            - default: desc
              type: string
              enum:
                - asc
                - desc
            - type: 'null'
        minSessions:
          anyOf:
            - description: Minimum occurrence count
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            - type: 'null'
        search:
          description: Search in insight content
          anyOf:
            - type: string
            - type: 'null'
        teamId:
          description: Filter by specific team ID or none for unassigned insights
          anyOf:
            - anyOf:
                - type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                - type: string
                  const: not_assigned
                - type: 'null'
                  const: null
            - type: 'null'
        insightNumber:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            - type: 'null'
          description: Filter by insight number
        sessionLanguage:
          description: Filter by language
          anyOf:
            - type: string
              enum:
                - az
                - el
                - de
                - fr
                - it
                - es
                - pt
                - nl
                - da
                - sv
                - 'no'
                - fi
                - et
                - is
                - pl
                - cs
                - sk
                - hu
                - ro
                - bg
                - hr
                - sr
                - uk
                - ru
                - tr
                - en
                - zh
                - ja
                - ko
                - hi
                - bn
                - id
                - ms
                - th
                - vi
                - tl
                - ar
                - he
                - fa
                - ur
                - af
                - sw
                - ku
                - ckb
                - kmr
            - type: 'null'
        ticketSentiment:
          anyOf:
            - description: Filter by sentiment
              type: string
              enum:
                - angry
                - happy
                - neutral
            - type: 'null'
        channel:
          anyOf:
            - $ref: '#/components/schemas/SessionChannel'
            - type: 'null'
          description: Filter by session channel
        sessionFromDate:
          anyOf:
            - description: Filter sessions created from this date (ISO 8601)
              type: string
            - type: 'null'
        sessionToDate:
          anyOf:
            - description: Filter sessions created to this date (ISO 8601)
              type: string
            - type: 'null'
        sessionStatus:
          anyOf:
            - type: string
              enum:
                - closed_resolved
                - closed_unresolved
                - open
            - type: 'null'
          description: Filter by session status
        sessionContactId:
          anyOf:
            - description: Filter by session contact ID
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        ticketCustomData:
          anyOf:
            - type: array
              items:
                type: object
                propertyNames:
                  type: string
                additionalProperties:
                  type: string
            - type: 'null'
          description: >-
            A list of objects with key-value pairs to filter by. Relationship is
            OR between objects, and AND between the values in each object
        contactCustomData:
          anyOf:
            - type: array
              items:
                type: object
                propertyNames:
                  type: string
                additionalProperties:
                  type: string
            - type: 'null'
          description: Filter by contact custom data key-value pairs
        page:
          default: 1
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
    PublicPaginatedInsightsDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/PublicPaginatedInsightsDto'
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PublicInsight'
        page:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        total:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        totalPages:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - data
        - page
        - total
        - totalPages
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
    SessionChannel:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/SessionChannel'
      type: string
      enum:
        - web
        - email
        - phone_voice
        - slack
        - sms
        - whatsapp
        - instagram
        - messenger
        - api
        - web_voice
    PublicInsight:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/PublicInsight'
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        insight_number:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        content:
          type: string
        sentiment:
          type: string
          enum:
            - angry
            - happy
            - neutral
        occurrence_count:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        category:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                name:
                  type: string
                description:
                  anyOf:
                    - type: string
                    - type: 'null'
              required:
                - id
                - name
                - description
              additionalProperties: false
            - type: 'null'
        team:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                name:
                  type: string
              required:
                - id
                - name
              additionalProperties: false
            - type: 'null'
        resolved_by:
          anyOf:
            - type: object
              properties:
                name:
                  anyOf:
                    - type: string
                    - type: 'null'
                avatar_url:
                  anyOf:
                    - type: string
                    - type: 'null'
              required:
                - name
                - avatar_url
              additionalProperties: false
            - type: 'null'
        resolved_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        archived_by:
          anyOf:
            - type: object
              properties:
                name:
                  anyOf:
                    - type: string
                    - type: 'null'
                avatar_url:
                  anyOf:
                    - type: string
                    - type: 'null'
                reason:
                  anyOf:
                    - type: string
                    - type: 'null'
              required:
                - name
                - avatar_url
                - reason
              additionalProperties: false
            - type: 'null'
        archived_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        archive_policy:
          anyOf:
            - type: string
              enum:
                - forever
                - until_count
                - until_escalating
            - type: 'null'
        resurface_progress:
          anyOf:
            - type: object
              properties:
                current:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                target:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
              required:
                - current
                - target
              additionalProperties: false
            - type: 'null'
        deep_research:
          anyOf:
            - type: string
            - type: 'null'
        deep_research_completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        first_seen_at:
          type: string
          format: date-time
        last_seen_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - insight_number
        - content
        - sentiment
        - occurrence_count
        - category
        - team
        - resolved_by
        - resolved_at
        - archived_by
        - archived_at
        - archive_policy
        - resurface_progress
        - deep_research
        - deep_research_completed_at
        - first_seen_at
        - last_seen_at
        - created_at
        - updated_at
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````