Export event data with 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 Klaviyo user roles.
To export event data via SFTP you must first enable it for your account by following the steps to set up SFTP data transfer.
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, navigate to the Data export tab.
Scheduled export
Data can be exported via SFTP at regular intervals.
Toggle to turn On scheduled exports.
Select an export cadence to determine how often the export should process, e.g., every hour or every day.
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.
Select the output format. Exports use CSV format by default, but also support JSON format.
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.
Click Create export
Select a date range for the export. The default date range is the last 30 days.
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.
Select the output format. Exports use CSV format by default, but also support JSON format.
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, orcompleteexports.
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.gzYou 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:
idThe ID of the event object.metric_idThe ID of the corresponding metric.profile_idThe ID of the associated profile.event_propertiesJSON containing all of the event's properties, such as name and subject line.datetimeThe timestamp of when the event was recorded.uuidThe unique user ID associated with the event.