Exports

Asynchronous bulk exports. The first available export is the AI Calls report — the same dataset the platform UI exports, joined across calls, evaluations, EPA results, and campaigns, available as CSV or Excel.

Endpoints

MethodEndpointDescriptionScope
POST/exports/ai-callsStart an async AI calls export jobanalytics:export
GET/exports/{jobId}Poll status and retrieve the download URLanalytics:export

Both endpoints require API key + HMAC signing. See Authentication for the signing scheme.

How it works — 3 steps

The export is asynchronous because generation may take several seconds to minutes depending on the date range. Your integration starts a job, polls for completion, and downloads the file.

STEP 1

Start the job

POST /exports/ai-calls with date range and format. Responds with a jobId.

STEP 2

Poll status

GET /exports/{jobId} every 2–5 seconds until status is completed.

STEP 3

Download the file

Open downloadUrl directly. It's a signed link valid for 2 hours.

Tip: The downloadUrl is a temporary signed URL — anyone with the link can download the file within the 2-hour window. Treat it as a secret and consume it quickly.

Request body — POST /exports/ai-calls

FieldTypeRequiredNotes
dateFromdate (yyyy-MM-dd)YesInclusive start of the date range.
dateTodate (yyyy-MM-dd)YesInclusive end. Max range: 92 days.
format"csv" \| "xlsx"NoOutput format. Default: csv.
campaignIdstringNoFilter to a single campaign.
statusenumNoevaluated, notEvaluated, pending, processing, failed.
outcomestringNoCall outcome (e.g. completed, transferred).
timezoneIANA timezoneNoE.g. "America/Santiago". Default: UTC. Drives local-day boundaries and displayed dates.

Job statuses

StatusMeaning
queuedJob created, not started yet.
processingFile is being generated. progress goes from 0 to 100.
completedDone. downloadUrl is available (valid 2h).
failedJob failed. error contains the message.

Reference client — Python

Standard library only (Python 3.10+). Set API_KEY and HMAC_KEY environment variables before running.

#!/usr/bin/env python3
"""Auralytik — AI Calls Export reference client. Standard library only."""

import argparse, base64, hashlib, hmac, json, os, sys, time
from datetime import datetime, timedelta, timezone
from urllib.parse import urlsplit
from urllib.request import Request, urlopen
from urllib.error  import HTTPError

BASE = "https://api.auralytik.ai"

def sign(method, url, body_bytes, hmac_key):
    ts = str(int(time.time()))
    path = urlsplit(url).path or "/"
    body_hash = base64.b64encode(hashlib.sha256(body_bytes).digest()).decode()
    canonical = f"{ts}.{method.upper()}.{path}.{body_hash}"
    sig = base64.b64encode(
        hmac.new(hmac_key.encode(), canonical.encode(), hashlib.sha256).digest()
    ).decode()
    return ts, sig

def call(method, url, api_key, hmac_key, body=None):
    headers = {"X-Api-Key": api_key, "Accept": "application/json"}
    body_b = b""
    if body is not None:
        headers["Content-Type"] = "application/json"
        body_b = json.dumps(body).encode()
    ts, sig = sign(method, url, body_b, hmac_key)
    headers["X-Timestamp"] = ts
    headers["X-Signature"] = sig
    req = Request(url, data=body_b if body else None, method=method, headers=headers)
    try:
        with urlopen(req, timeout=60) as r: return r.status, json.loads(r.read())
    except HTTPError as e: return e.code, json.loads(e.read())

# Start
body = {"dateFrom": "2026-05-03", "dateTo": "2026-05-10",
        "format": "csv", "timezone": "America/Santiago"}
status, resp = call("POST", f"{BASE}/api/v1/exports/ai-calls",
                    os.environ["API_KEY"], os.environ["HMAC_KEY"], body)
job_id = resp["data"]["jobId"]

# Poll
while True:
    _, resp = call("GET", f"{BASE}/api/v1/exports/{job_id}",
                   os.environ["API_KEY"], os.environ["HMAC_KEY"])
    job = resp["data"]
    print(f"status={job['status']} progress={job.get('progress', 0)}%")
    if job["status"] == "completed": break
    if job["status"] == "failed":    sys.exit(job.get("error"))
    time.sleep(2)

# Download
with urlopen(job["downloadUrl"]) as r, open(job["fileName"], "wb") as f:
    f.write(r.read())
print(f"Saved: {job['fileName']}")

Reference call — curl + openssl

For shell-based integrations. Requires openssl.

# 1. Start the export
API_KEY="ak_live_..."
HMAC_KEY="hmac_..."
BASE="https://api.auralytik.ai"

BODY='{"dateFrom":"2026-05-03","dateTo":"2026-05-10","format":"csv","timezone":"America/Santiago"}'
TS=$(date +%s)
PATH_REQ="/api/v1/exports/ai-calls"
BODY_HASH=$(echo -n "$BODY" | openssl dgst -sha256 -binary | base64)
SIG=$(echo -n "$TS.POST.$PATH_REQ.$BODY_HASH" | openssl dgst -sha256 -hmac "$HMAC_KEY" -binary | base64)

curl -X POST "$BASE$PATH_REQ" \
  -H "X-Api-Key: $API_KEY" \
  -H "X-Timestamp: $TS" \
  -H "X-Signature: $SIG" \
  -H "Content-Type: application/json" \
  -d "$BODY"

What's in the downloaded file

One row per AI call. 18 fixed columns plus one dynamic column per unique EPA survey question (prefix EPA_).

ColumnDescription
EstadoEvaluation status (Evaluated, Not Evaluated, Pending, Processing, Failed).
FechaCall end date/time in the requested timezone.
TeléfonoCustomer phone number.
CallIdUnique call identifier.
IdentidadCustomer identity (e.g. RUT, contract, depending on campaign).
Versión IAFlow / bot version that handled the call.
ResultadoCall outcome (completed, transferred, no_answer, …).
Duración (s)Conversation seconds.
NotaAverage evaluation score (0–10).
TipificaciónAI-assigned category → reason → sub-reason.
ConfianzaConfidence % for the typification.
CampañaCampaign name.
TransferenciaFunction that triggered a transfer to a human, if any.
EPA EncuestaWhether the call ran a post-call survey (Sí / No).
EPA PuntajeComputed EPA score.
EPA ResultadoReason the EPA ended.
EPA Preguntasanswered / total.
EPA Completitud% answered.

Excel compatibility: CSV is delivered as UTF-8 with BOM and comma separator — Excel auto-detects encoding and opens it directly. XLSX opens natively.

Errors

HTTPCodeCause
400VALIDATION_ERRORMissing or malformed fields; date range exceeds 92 days; unknown format / status / timezone.
401INVALID_API_KEYMissing or unknown API key.
401INVALID_SIGNATUREMissing X-Signature header, or the HMAC signature doesn't match.
401TIMESTAMP_EXPIREDX-Timestamp is more than 5 minutes off from UTC.
403INSUFFICIENT_SCOPEAPI key is missing the analytics:export scope.
404RESOURCE_NOT_FOUNDjobId does not exist or belongs to another client.
429RATE_LIMIT_EXCEEDEDToo many requests per minute. Back off and retry.
503INTERNAL_ERRORService temporarily unavailable. Retry later.

Limits and retention

  • Date range: up to 92 days per request.
  • Row cap: 50,000 rows per export (the most recent calls are included).
  • Download URL TTL: 2 hours after job completes.
  • Job retention: 72 hours (after which the status record is auto-deleted).

Need help integrating?

We can deliver pre-provisioned API credentials with the right scope, and walk your team through a first end-to-end test against a sandbox client.

Contact Support