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
| Method | Endpoint | Description | Scope |
|---|---|---|---|
| POST | /exports/ai-calls | Start an async AI calls export job | analytics:export |
| GET | /exports/{jobId} | Poll status and retrieve the download URL | analytics: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.
Start the job
POST /exports/ai-calls with date range and format. Responds with a jobId.
Poll status
GET /exports/{jobId} every 2–5 seconds until status is completed.
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
| Field | Type | Required | Notes |
|---|---|---|---|
| dateFrom | date (yyyy-MM-dd) | Yes | Inclusive start of the date range. |
| dateTo | date (yyyy-MM-dd) | Yes | Inclusive end. Max range: 92 days. |
| format | "csv" \| "xlsx" | No | Output format. Default: csv. |
| campaignId | string | No | Filter to a single campaign. |
| status | enum | No | evaluated, notEvaluated, pending, processing, failed. |
| outcome | string | No | Call outcome (e.g. completed, transferred). |
| timezone | IANA timezone | No | E.g. "America/Santiago". Default: UTC. Drives local-day boundaries and displayed dates. |
Job statuses
| Status | Meaning |
|---|---|
| queued | Job created, not started yet. |
| processing | File is being generated. progress goes from 0 to 100. |
| completed | Done. downloadUrl is available (valid 2h). |
| failed | Job 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_).
| Column | Description |
|---|---|
| Estado | Evaluation status (Evaluated, Not Evaluated, Pending, Processing, Failed). |
| Fecha | Call end date/time in the requested timezone. |
| Teléfono | Customer phone number. |
| CallId | Unique call identifier. |
| Identidad | Customer identity (e.g. RUT, contract, depending on campaign). |
| Versión IA | Flow / bot version that handled the call. |
| Resultado | Call outcome (completed, transferred, no_answer, …). |
| Duración (s) | Conversation seconds. |
| Nota | Average evaluation score (0–10). |
| Tipificación | AI-assigned category → reason → sub-reason. |
| Confianza | Confidence % for the typification. |
| Campaña | Campaign name. |
| Transferencia | Function that triggered a transfer to a human, if any. |
| EPA Encuesta | Whether the call ran a post-call survey (Sí / No). |
| EPA Puntaje | Computed EPA score. |
| EPA Resultado | Reason the EPA ended. |
| EPA Preguntas | answered / 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
| HTTP | Code | Cause |
|---|---|---|
| 400 | VALIDATION_ERROR | Missing or malformed fields; date range exceeds 92 days; unknown format / status / timezone. |
| 401 | INVALID_API_KEY | Missing or unknown API key. |
| 401 | INVALID_SIGNATURE | Missing X-Signature header, or the HMAC signature doesn't match. |
| 401 | TIMESTAMP_EXPIRED | X-Timestamp is more than 5 minutes off from UTC. |
| 403 | INSUFFICIENT_SCOPE | API key is missing the analytics:export scope. |
| 404 | RESOURCE_NOT_FOUND | jobId does not exist or belongs to another client. |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests per minute. Back off and retry. |
| 503 | INTERNAL_ERROR | Service 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