---
title: "Start a server-side CSV export of a CRM object into the workspace files (/exports). Returns at once; one export runs per workspace, and a second start returns the running one"
method: POST
path: "/crm/exports"
tags: ["crm"]
---

# Start a server-side CSV export of a CRM object into the workspace files (/exports). Returns at once; one export runs per workspace, and a second start returns the running one

`POST /crm/exports`

## Request

- Base URL: `https://www.dench.com/api/v1`
- URL: `https://www.dench.com/api/v1/crm/exports`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Start a server-side CSV export of a CRM object into the workspace files (/exports). Returns at once; one export runs per workspace, and a second start returns the running one.

## Request body

- object
  - `objectName` string, required
  - `columns` string[]: Fields to export, in order. Default: every field except the long-text Notes.
  - `where` object: Filter in the crm.query DSL, e.g. {"Status":"Open"} or {"Score":{"$gte":50}}. Field names are case-sensitive.
  - `assignedTo` string: Personal scope: "me" (the signed-in member / the human behind an agent session), "unassigned", or a member userId or email. Adds one has_any / is_empty rule on the object's assignee user field; rows, totalCount, sums and analytics all follow it. Never saved onto the view.
  - `assigneeField` string: Which `user` field "assigned" means. Default: the analytics owner role, else the task `Assignee`, else a user field named like owner/assignee, else the first user field.

## Response `200`

Successful response

- object
  - `jobId` string, required
  - `status` 'running' | 'done' | 'failed', required
  - `objectName` string, required
  - `rowsDone` number, required
  - `totalRows` number: Estimated total, only for an unfiltered, unscoped export.
  - `truncated` boolean, required: The export stopped at its 50,000-row cap and more records may match.
  - `filePath` string: Workspace path once done.
  - `downloadUrl` string: Signed link once done.
  - `bytes` number
  - `error` string
  - `message` string, required: One-line status to show the person.
  - `alreadyRunning` boolean: start returned the workspace's running export instead.
  - `createdAt` number, required
  - `finishedAt` number

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid authentication
- `404`: Operation or resource not found
- `500`: Server error

---

[API](https://skmtc.dev/dench/apis/dench-api.md) - [All operations](https://skmtc.dev/dench/apis/dench-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dench/apis/dench-api/revisions/4a145b38f19c?raw)
