---
title: "Responses and transcripts | Trellus Call Data API"
description: "How to read Trellus Call Data API responses: positional rows in select order, timestamp units, aligned transcript arrays, session JSON and audio links."
source: "https://www.trellus.ai/developers/api/responses"
note: "Text-only copy of the page for AI assistants and agents. Link to the source address, not this file."
site_summary: "https://www.trellus.ai/llms.txt"
---

# Responses and transcripts

Positional rows, timestamp units, aligned transcript arrays and detail JSON.

## Rows, units and detail JSON

- List responses are JSON arrays of positional rows. Each cell follows the request’s select order. [] is a successful query with no matching readable rows.
- Top-level request start and end use Unix microseconds. List started_at and started_at filter values use Unix seconds. Durations and transcript offsets are seconds.
- Combine turn_data.texts, turn_data.is_customers and turn_data.starts by index. true identifies customer speech; false identifies agent speech.
- /session JSON uses camelCase keys and enum names; byte fields are base64. Default-valued fields may be omitted, and wordData is omitted. Without x-proto-as-json: true, the endpoint returns protobuf.
- /get-audio-links returns one session object plus aligned audio and audio_links arrays. The URLs expire after one hour. Retention can leave both arrays empty.
- Unset proto values can appear as 0, false, empty strings or empty arrays. They do not prove an event was measured. Detection flags are signals, not verified outcomes.

## Map rows in code

Map list rows, transcript turns and grouped metrics

```javascript
// Example only: select = ["session_id", "started_at", "customer_data.name"]
// Response: [["CALL_ID", 1791849600, "Example contact"]]
const calls = rows.map(row => Object.fromEntries(
  select.map((column, index) => [column, row[index]])
));
const startedAt = calls[0] ? new Date(calls[0].started_at * 1000) : null;

// Transcript columns are aligned arrays:
const turns = texts.map((text, index) => ({
  text,
  speaker: isCustomers[index] ? "customer" : "agent",
  startSeconds: starts[index]
}));

// /session with x-proto-as-json: true uses different JSON spelling:
// { "sessionId": "CALL_ID", "customerData": { "name": "Example contact" },
//   "turnData": { "texts": ["Hello"], "isCustomers": [true], "starts": [0] } }
// Default-valued proto fields may be omitted. wordData is omitted.

// Grouped metrics: selects = [{"cnf": []}, {"column_name": "duration"}]
// Example response: [["Interested", 12, 840]]
// Read as: disposition, count, summed duration in seconds.
```

## Common fields

Common fields and their exact paths

| What you need | Column | How to use it |
| --- | --- | --- |
| Call ID | `session_id` | Copy the exact string into the x-session-id header for /session. |
| Call time | `started_at` | Unix seconds in list rows. Convert with new Date(value \* 1000). |
| Customer phone/address | `customer_address` | For phone calls, the customer address; phone is not a column name. |
| Rep ID | `resource_id` | Match to users[].user_id from /visible. |
| Contact name | `customer_data.name` | Use this instead of prospect_name or name. |
| Contact title | `customer_data.title` | Use this instead of title. |
| Company | `customer_data.company_name` | Use this instead of company. |
| Company website | `customer_data.company_url` | May be empty when not enriched. |
| Contact email / custom data | `customer_data.custom_fields` | No standard email column. Custom fields are JSON text; inspect available keys rather than assuming email exists. |
| Transcript text | `turn_data.texts` | Array of utterances, not one transcript string. |
| Transcript speaker | `turn_data.is_customers` | Aligned with texts: true = customer, false = agent. |
| Transcript timing | `turn_data.starts` | Aligned with texts; seconds from the start of the session. |
| Call duration | `duration` | Seconds. dial_metric.live_duration measures the live portion. |
| Saved outcome | `user_log.disposition` | Use /bootstrap for your exact configured option strings. |

The [field reference](https://www.trellus.ai/developers/api/fields) lists every selectable path with its type and values.
