---
title: "Export Text Sessions"
method: GET
path: "/api/v1/text-ai/text-sessions/export"
tags: ["text-ai", "text_sessions"]
deprecated: true
---

# Export Text Sessions

`GET /api/v1/text-ai/text-sessions/export`

> **Deprecated.**

Export the sessions matching the current filters as typed .xlsx / pure CSV.

Same filters, same crud query, same enrichment as ``list_text_sessions`` —
the file equals the screen by construction. Above the row cap the request
422s rather than silently truncating. Every export writes a durable
ExportAudit row (metadata only, never row contents).

## Query parameters

- `text_widget_group_id` string, uuid, nullable
- `was_transferred` boolean, nullable
- `contact_source` string, nullable
- `outcome` 'voicemail' | 'missed_by_system' | 'transferred' | 'handled_end_to_end', nullable
- `has_first_response` boolean, nullable
- `has_ended` boolean, nullable
- `local_hour_of_day` integer, nullable — Filter to rows stamped at this tenant-local hour (0-23); heatmap cell drill.
- `local_day_of_week` integer, nullable — Filter to rows stamped on this tenant-local weekday (0=Mon..6=Sun); heatmap cell drill.
- `buckets` string[], nullable
- `dispositions` string[], nullable
- `needs_owner_review` boolean, nullable
- `use_created_at` boolean, nullable — Deprecated - use date_field=created_at.
- `format` 'xlsx' | 'csv' — File format: xlsx or csv.
- `columns` string[], nullable — Ordered visible column keys to export. Core identity columns (when/visitor/hotel) always export. Unknown keys are a 422.
- `metric_ids` string[], nullable — Custom metrics to export — two columns each (result, score).
- `ids` string[], nullable — Export only these selected sessions (still ANDed with filters).
- `report_name` string, nullable — Filename stem (sanitized to ASCII kebab).
- `context_label` string, nullable — Human filter description for the workbook context header.
- `limit` integer, nullable
- `offset` integer, nullable
- `page` integer, nullable — Deprecated - use offset.
- `per_page` integer, nullable — Deprecated - use limit.
- `start_date` string, date, nullable
- `end_date` string, date, nullable
- `date_field` string, nullable — Which timestamp the date range filters. Valid values differ per subject; an unknown one is a 422 listing them.
- `date_from` string, date-time, nullable — Deprecated - use start_date.
- `date_to` string, date-time, nullable — Deprecated - use end_date.
- `property_ids` string[], nullable
- `property_ids_exclude` string[], nullable
- `include_considered_hotels` boolean, nullable — Include hotels the conversation was only considered for, not just the one it was attributed to.
- `agent_id` string, uuid, nullable
- `outcome_agent_ref` string, nullable
- `outcome_agent_refs` string[], nullable
- `outcome_agent_refs_exclude` string[], nullable
- `outcome_agent_kind` 'ai_voice' | 'ai_text' | 'human', nullable
- `reviewed` boolean, nullable
- `status` string, nullable
- `has_booking_intent` boolean, nullable
- `has_booking` boolean, nullable
- `booking_made` boolean, nullable
- `booking_attributed` boolean, nullable
- `tag_ids` string[], nullable
- `country` string, nullable
- `is_after_hours` boolean, nullable
- `population_filters` string[], nullable — Named conversation-population filters: business_hours, min_call_25s, real_customer_message, exclude_spam_test, dedupe_24h.
- `search` string, nullable
- `standard_filters` string, nullable
- `metric_filters` string, nullable
- `sort_by` string, nullable
- `sort_order` 'asc' | 'desc', nullable
- `strict` boolean — Reject filters this subject cannot apply with a 422, instead of returning a wider population and reporting them in ignored_filters.
- `voice_agent_id` string, uuid, nullable — Deprecated - use agent_id.
- `metric_id` string, uuid, nullable — Deprecated - use metric_filters.
- `metric_state` 'pass' | 'fail' | 'na' | 'not_run' | 'error', nullable — Deprecated - use metric_filters.
- `booking_intent` boolean, nullable — Deprecated - use has_booking_intent.

## Response `200`

The export file (XLSX or CSV, per the `format` param).

- unknown

## Other responses

- `400` — Invalid parameter combination
- `401` — Authentication required
- `403` — Missing the required permission for call logs
- `422` — Unknown column/metric keys, or too many rows to export

---

[API](https://skmtc.dev/getanana/apis/cleon-api.md) · [All operations](https://skmtc.dev/getanana/apis/cleon-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getanana/cleon-api/revisions/c0f54348e251/schema)
