> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datalane.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export results

> Build CSV exports and control which contact rows are included.

[`campaigns/export`](/api-reference/campaigns/export-campaign-results-as-csv) creates a fresh CSV and returns a short-lived presigned download URL. It does not persist export configuration, so calling it again is the supported way to change filters or refresh an expired URL.

## Contact limits

Omit `maxContactsPerAccount` to include every available contact. Pass a positive integer to cap contacts per account.

```json theme={null}
{
  "campaignId": "camp_...",
  "maxContactsPerAccount": 5
}
```

Pass `0` to create an account-only file with one row per account and no contact columns populated.

## Contact filters

Use `hasMobilePhone` and `hasEmail` to require contactability:

```json theme={null}
{
  "campaignId": "camp_...",
  "hasMobilePhone": true,
  "hasEmail": true
}
```

When both values are `true`, a contact is included when it has a mobile phone **or** an email address.

## Download handling

The response describes the generated file and row counts:

```json theme={null}
{
  "data": {
    "campaignId": "camp_...",
    "url": "https://...",
    "urlExpiresAt": "2026-07-21T18:30:00.000Z",
    "rows": {
      "accounts": 125,
      "contacts": 482
    },
    "file": {
      "format": "csv",
      "encoding": "utf-8-bom"
    }
  },
  "error": null
}
```

`url` is presigned and embeds its own credentials. Download it **without** an `Authorization` header. Treat the URL itself as a secret: anyone who has it can fetch the file until `urlExpiresAt` (about one hour). The UTF-8 byte-order mark improves compatibility with spreadsheet applications.

Exports require an `enriched` campaign with unexpired results.

## Columns

API exports always contain the standard DataLane column catalog, regardless of how the campaign was created. For campaigns tied to a customer data graph, a CSV sync in the DataLane application can additionally include graph-specific columns (customer warehouse columns, traits, and custom enrichments); those columns are not available through this endpoint.
