# Export conversations, contacts or the whole workspace

```http
POST https://trydimmi.com/api/v1/data-exports
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `conversations:read`.

## Body

- `format` (string, required): Conversations: txt (readable transcripts, 1,000 at most), csv (50,000) or json (10,000). Contacts: csv (50,000) or json (10,000). Workspace: zip. One of: `txt`, `pdf`, `csv`, `json`, `zip`.
- `include_notes` (boolean): true to include the team's internal notes, only if you may moderate conversations.
- `kind` (string, required): conversations, contacts, or workspace for everything the workspace owns (owners only). One of: `conversations`, `contacts`, `conversation_facts`, `workspace`.
- `selection` (object)
  - `conditions` (string): Contact exports only: the same conditions as the contact list takes, a JSON list written as text, at most 8000 characters, such as [{"field":"email","op":"contains","value":"@acme.com"}].
  - `filter` (object): Filters as an object of filter name to text value, the same names the matching list takes; for kind conversation_facts the report's from, to, inbox, team and so on. Such as {"status": "closed"}.
  - `ids` (string[] | null): The exact records to export, as a list of up to 10000 ids: conversation ids (conv_...) for conversations, contact ids (ctc_...) for contacts. When given, the filters are not used. Such as ["conv_01jx2m8k4t"].
  - `q` (string): Words to search for, so only the records that match are exported, such as refund.
  - `view_id` (string): Conversation exports only: the list to export, as the conversation list's view filter takes it, such as a saved view's id cvw_01jx2m8k4t (from GET /conversation-views) or all.

## Response 202 (Accepted)

- `data` (object, required)
  - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `error` (string | null, required): A sentence saying the export could not be built. Null unless status is failed.
  - `expires_at` (string | null, required): When the export file is removed and can no longer be downloaded. Null until the file is built.
  - `file_name` (string, required): The name of the export file, such as export.csv.
  - `format` (string, required): The file format: txt, pdf, csv or json.
  - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
  - `include_notes` (boolean, required): True when the team's internal notes are part of the export.
  - `kind` (string, required): What is exported: conversations, contacts or conversation_facts (each conversation's report figures as a spreadsheet).
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `row_count` (integer | null, required): How many rows the file holds. Null until it is built.
  - `size_bytes` (integer | null, required): Size of the export file in bytes. Null until it is built.
  - `status` (string, required): Where the export stands: pending, running, ready, failed or expired.
  - `url` (string | null, required): The API path the ready file downloads from, such as /api/v1/data-exports/dex_.../download. Null unless status is ready.
  - `warnings` (any, required): A list naming what the file could not hold as asked. An empty list when there is nothing to flag.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request POST \
  --url 'https://trydimmi.com/api/v1/data-exports' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "format": "txt",
  "include_notes": true,
  "kind": "conversations",
  "selection": {
    "conditions": "<string>",
    "filter": {
      "<key>": "<string>"
    },
    "ids": [
      "<string>"
    ],
    "q": "<string>",
    "view_id": "<string>"
  }
}'
```

## Example response

```json
{
  "data": {
    "created_at": "2026-11-01T09:30:00Z",
    "error": "<string>",
    "expires_at": "2026-11-01T09:30:00Z",
    "file_name": "<string>",
    "format": "<string>",
    "id": "<string>",
    "include_notes": true,
    "kind": "<string>",
    "object": "<string>",
    "row_count": 123,
    "size_bytes": 123,
    "status": "<string>",
    "url": "<string>",
    "warnings": null
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
