Skip to main content
POST
/
analytics
Configuration Analysis
curl --request POST \
  --url https://api.heify.com/analytics \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "configuration_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
}
'
{
  "data": {
    "configuration_details": {
      "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
      "tag": "Customer Support Campaign",
      "total_audios_analyzed": 150
    },
    "ai_insights": {
      "actionable_insights": "# Top 3 Acciones Inmediatas\n\n## 1. Mejorar el tiempo de resolución...",
      "executive_narrative": "# Contexto Actual\nHemos analizado 150 llamadas de soporte..."
    },
    "detailed_analysis": {
      "metadata_analysis": {
        "duration_stats": {
          "total_seconds": 54000,
          "average_seconds": 360,
          "min_seconds": 45,
          "max_seconds": 1800,
          "histogram": {
            "0-60": 5,
            "60-120": 18,
            "120-180": 42
          }
        },
        "speaker_stats": {
          "average_per_audio": 2.1,
          "total_distribution": {
            "1": 20,
            "2": 98,
            "3": 32
          }
        },
        "language_distribution": {
          "es": 120,
          "en": 30
        }
      },
      "extracted_fields_analysis": {
        "sentiment_analysis": {
          "type": "string",
          "stats": {
            "total_count": 150,
            "valid_count": 148,
            "missing_count": 2,
            "value_counts": {
              "POSITIVE": 89,
              "NEGATIVE": 42,
              "NEUTRAL": 17
            },
            "total_unique_categories": 3
          }
        }
      },
      "timeseries_analysis": {
        "2026-03-20": {
          "audio_count": 15
        }
      },
      "advanced_analysis": {}
    }
  }
}
The AI output language is controlled by analytics_language on the Configuration. Set it to "df" for auto-detection based on the most prevalent transcription language.
This endpoint has a monthly call limit. The counter resets automatically on the first call of a new month. Exceeding the limit returns 429 Too Many Requests.
Only completed transcriptions are included in the analysis. Pending, processing, or failed transcriptions are excluded.
If no completed transcriptions exist for the configuration, the endpoint returns 200 OK with {"data": {"message": "No completed transcriptions found to analyze."}} — not an error.
The actionable_insights and executive_narrative fields in ai_insights are Markdown-formatted strings, not structured objects. Render them accordingly.

Authorizations

x-api-key
string
header
required

Body

application/json
configuration_id
string<uuid>
required

The configuration whose completed transcriptions to analyze. Must belong to the authenticated client.

Response

Analytics report generated successfully, or no data found.

data
object