---
title: "Export Preview Csv"
method: POST
path: "/api/v1/nlq/export"
tags: ["nlq"]
---

# Export Preview Csv

`POST /api/v1/nlq/export`

Re-run the NLQ filter and stream the matching records as CSV.

Applies the same access_grants + FLS enforcement as submit_query. Capped
at 10 000 rows — the frontend shows a toast when the cap is hit so users
know their export isn't complete.

## Headers

- `authorization` string, nullable
- `X-API-Key` string, nullable

## Request body

- NLQExportRequest
  - `object_type` string, required — Object api_name, e.g. 'Lead'.
  - `filter_tree` object, nullable — FilterGroup tree, same shape submit_query accepts.
  - `limit` integer
  - `sort_field` string, nullable
  - `sort_dir` string, nullable
  - `partition_by` string[], nullable
  - `n_per_group` integer, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/ninjavan/apis/salesforce-sales-cloud-replacement.md) · [All operations](https://skmtc.net/ninjavan/apis/salesforce-sales-cloud-replacement/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ninjavan/salesforce-sales-cloud-replacement/versions/fd3a41a6260b/schema)
