---
title: "Export event data with SFTP"
description: "Learn how to use your SFTP client and Klaviyo’s SFTP export tool to download event data from Klaviyo."
url: "https://developers.klaviyo.com/en/docs/export_event_data_sftp"
category: "Build with Klaviyo"
lastUpdated: "2025-08-19"
related: ["https://developers.klaviyo.com/en/docs/llms.txt"]
---

# Export event data with SFTP

> This is the Markdown version of https://developers.klaviyo.com/en/docs/export_event_data_sftp

Learn how to use your SFTP client and Klaviyo’s SFTP export tool to download event data from Klaviyo.

## Before you begin

This feature is only available to Klaviyo users with an Owner, Admin, or Manager role. Learn more about <a href="https://help.klaviyo.com/hc/en-us/articles/115005231648-Understand-user-management-and-privileges" target="_blank">Klaviyo user roles</a>.

To export event data via SFTP you must first enable it for your account by following the steps to [set up SFTP data transfer](https://developers.klaviyo.com/en/docs/use_klaviyos_sftp_tool.md).

## You will learn

In this guide we'll cover how to export event data from Klaviyo using the SFTP export tool, how to schedule a recurring export, and take a look at the output data.

## Initiate SFTP export

From [SFTP data transfer](https://www.klaviyo.com/sftp/set-up?tab=setup), navigate to the [**Data export** tab](https://www.klaviyo.com/sftp/set-up?tab=export).

> [!NOTE]
> The amount of time an export takes to process may vary depending on the quantity of event data in your account. Exporting all event data can result in long processing times.

### Scheduled export

Data can be exported via SFTP at regular intervals.

1. Toggle to turn **On** scheduled exports.

2. Select an _export cadence_ to determine how often the export should process, e.g., every hour or every day.

3. Choose the **Events** data object. From the dropdown, place a check next to all defined events that you would like to include in this export, or include all event data in your account by checking **All Events**.

4. Select the output format. Exports use CSV format by default, but also support JSON format.

5. Click **Save**.

If you need to make changes to these settings later, click the **Change settings** button to modify the cadence and data objects.

### Historical export

Data can also be exported on a one-off basis using the historical export.

1. Click **Create export**

2. Select a date range for the export. The default date range is the last 30 days.

3. Choose the **Events** data object. From the dropdown, place a check next to all defined events that you would like to include in this export, or include all event data in your account by checking **All Events**.

4. Select the output format. Exports use CSV format by default, but also support JSON format.

5. Click **Save**.

## Review exports

All requested exports appear in the table below _Historical Export_. For each export, you will be able to see:

- Requested on: the date the report was requested.
- Data objects: which data objects were included, such as `Events`.
- Date range: the date range used, such as `Last 365 days`.
- Requested by: the email address of the logged-in user on your account who submitted the request.
- Status: the current status of the export. The _Status_ column shows the `processing`, `failed`, `canceled`, or `complete` exports.

Click the carrot next to each line to open up additional _Event details_ about the export, including which data objects were specifically included.

### Export format

#### Folders

Both scheduled and historical exports generate the same folder and file structure. Each export creates a folder in your STFP directory under `/exports/events`, named with the datetime when the job ran. The folder contains files with export data, and each file name includes the timestamp (in UTC) when it was created.

Export jobs generate multiple files. For a historical export, the job writes data to the export folder while it runs. This means that even for long-running exports, you can begin processing the data as it is generated.

Each export folder can contain multiple files, depending on how much data is exported that day.

If export jobs ran from May 10 to May 12, the file structure might look like this:

```
exports
    └── events
    │   ├── dt=2025-05-10
    │   │   ├── 01-22-45-342142.csv.gz
    │   │   └── 13-11-10-004345.csv.gz
    │   ├── dt=2025-05-11
    │   │   ├── 09-10-22-223670.csv.gz
    │   │   └── 18-13-00-334560.csv.gz
    │   ├── dt=2025-05-12
    │   │   └── 15-19-55-789008.csv.gz
```

You can access these files with an SFTP client. However, in production, it's best to connect programmatically to the SFTP directory and process files as they are generated.

#### Files

Files are in either `.csv.gz` or `.jsonl.gz` format, depending on the configuration. You can unzip them using the `gunzip` command on Mac or Linux, or a 3rd party tool like 7-Zip or WinRAR on Windows.

Exports contain the following data about your events:

- `id`
    The ID of the event object.

- `metric_id`
    The ID of the corresponding metric.

- `profile_id`
    The ID of the associated profile.

- `event_properties`
    JSON containing all of the event's properties, such as name and subject line.

- `datetime`
    The timestamp of when the event was recorded.

- `uuid`
    The unique user ID associated with the event.

> [!WARNING]
> Note that the CSVs generated with the SFTP export tool cannot be reuploaded to Klaviyo without modification to the data formatting. For more information about how to import data to Klaviyo and how to format your imports, check out how to [import profile and event data with SFTP](https://developers.klaviyo.com/en/docs/sftp_import_tool.md).

## Additional resources

- [Bulk Import Profiles API](https://developers.klaviyo.com/en/docs/use_klaviyos_bulk_profile_import_api.md)
- [Export data from Klaviyo](https://developers.klaviyo.com/en/docs/export_data_from_klaviyo.md)
