> ## 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.

# Get conversation-flow Sankey

> Get a Sankey breakdown of how conversations flow through the chosen dimensions. Use when pulling impact metrics into your own reporting.



## OpenAPI

````yaml get /impact-report/sankey
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: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /impact-report/sankey:
    get:
      summary: Get conversation-flow Sankey
      description: >-
        Get a Sankey breakdown of how conversations flow through the chosen
        dimensions. Pass an ordered, comma-separated list of dimension keys
        (e.g. "replied_by,outcome" or "integration_source,channel"). Returns
        nodes and links describing the flow.
      operationId: getConversationSankey
      parameters:
        - schema:
            type: string
          in: query
          name: dimensions
          required: true
          description: >-
            Ordered dimensions, 1–6, built left→right. Either a comma-separated
            key list ("replied_by,outcome") or a JSON array of {dimension,
            customDataKey} to give each custom-data column its own jsonb key,
            e.g.
            [{"dimension":"contact_custom_data","customDataKey":"tier"},{"dimension":"session_custom_data","customDataKey":"plan"}].
        - schema:
            type: string
          in: query
          name: custom_data_key
          required: false
          description: >-
            Fallback jsonb key for custom-data dimensions given via the CSV form
            (or when a JSON dimension omits its own customDataKey). Ignored
            where a dimension carries its own key.
        - schema:
            type: string
          in: query
          name: start_date
          required: false
          description: Start date in ISO 8601 format (defaults to 30 days ago)
        - schema:
            type: string
          in: query
          name: end_date
          required: false
          description: >-
            End date in ISO 8601 format; a date-only value covers the whole UTC
            day (defaults to now)
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SankeyReportResDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    SankeyReportResDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/SankeyReportResDto'
      type: object
      properties:
        nodes:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              dimensionKey:
                type: string
                enum:
                  - all_tickets
                  - replied_by
                  - outcome
                  - handoff
                  - channel
                  - integration_source
                  - assist_mode
                  - contact_custom_data
                  - session_custom_data
                  - sentiment
                  - status
                  - assigned_team
                  - contact_source
                  - csat
                  - handoff_reason
                  - contact_reason
              dimensionLabel:
                type: string
              bucket:
                type: string
              count:
                type: number
            required:
              - id
              - dimensionKey
              - dimensionLabel
              - bucket
              - count
            additionalProperties: false
        links:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
              target:
                type: string
              value:
                type: number
            required:
              - source
              - target
              - value
            additionalProperties: false
      required:
        - nodes
        - links
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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