This feature is available on the Enterprise plan only or as an add-on to the
Growth plan. If interested in adding this feature please contact
[email protected].
Authorization
Userpilot API uses an API key to authenticate requests. You can find your API key on the Environment Page. Authentication Method: Include your API key in theAuthorization header:
All API requests must be made over HTTPS.
Rate Limits
The Export API enforces rate limiting to ensure reliable data export operations and maintain system performance for all users. These limits help balance resource usage while enabling comprehensive analytics data retrieval.Rate Limit Details
- Job Limitation: One export job at a time per application token
Error Responses
The API returns specific error codes when limits are exceeded:409 Conflict: Returned when attempting to create a new export job while another is in progress
Best Practices
Data Restrictions
- Job Status Availability: Once an export job is created, the job status and related information will be available for 3 days. After this period, the job status will no longer be accessible via the API.
- File Download Expiry: The URLs generated to download the exported data files will expire after 2 days. Ensure you download the files within this time frame, as the links will no longer be valid afterward.
For the schema of exported events and data, see the Event
Schema page.
Data Schema Reference
The data exported via the Userpilot Export Analytics Data API follows the Userpilot Event Data Schema. This schema defines the structure, attributes, and relationships of all events, users, and companies included in your export. Key points:- Each exported event will include fields such as
app_token,event_type,event_name,user_id,company_id,source,inserted_at, and more. - Auto-captured attributes (e.g.,
hostname,device_type,browser, etc.) and custom attributes (in the metadata object) are included as described in the schema. - The schema covers all event types (
identify_user,identify_company,track,track_feature,page_view,interaction,session_start, etc.) and their specific attribute structures.
API Endpoints
1. Trigger an Export Job
Endpoint
The endpoint URL uses the
appex environment. For EU data residency, use
appex-eu instead. See Environment
Settings for your specific endpoint.Description
Creates an export job to extract analytics data based on the specified parameters.Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
from | string | Yes | Start date of the export in YYYY-MM-DD format. | ”2024-05-02” |
to | string | Yes | End date of the export in YYYY-MM-DD format. | ”2024-09-30” |
emails | string[] | No | List of email addresses to receive the exported data. If omitted, no email is sent. | [“[email protected]”] |
event_type | string[] | No | List of event types to filter. Defaults: see below. | [“track”, “page_view”] |
user_id | string[] | No | Specific user IDs to filter. If omitted, all users are included. | [“123456”] |
company_id | string[] | No | Specific company IDs to filter. If omitted, all companies are included. | [“13162551529”] |
segment_id | string | No | Filter data based on a specific segment. | ”987654” |
format | string | No | Format of the exported data. Options: json (default) or csv. | ”csv” |
exclusions | boolean | No | Exclude users/companies set in the web app. Default: false. | true |
event_typedefaults to["identify_user", "identify_company", "page_view", "track", "track_feature", "interaction", "session_start"]if not provided.user_idandcompany_iddefault to empty arrays ([]), meaning all users or companies are included by default.- The default export
formatisjson.
Example Request
- Success
- 409 Conflict
2. Show Jobs
Endpoint
Description
Retrieves a list of all export jobs triggered by your API token.Example Request
- Success
3. Show Job by Job ID
Endpoint
Description
Retrieves detailed information about a specific export job identified by itsjob_id.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| job_id | String | Yes | The unique identifier of the export job |
Example Request
- Success
- 404 Not Found
- Ensure you retrieve job details within the 3-day availability window to effectively monitor ongoing jobs. - Download links for exported data will expire after 2 days, so make sure to download your data promptly.
Understanding File Names and Date Ranges
The Export API partitions data into files by weeks to avoid oversized files. It’s important to understand how file names relate to the data they contain.File Naming Convention
- Weekly Partitioning: Each file represents a weekly partition of data
- File Name Format: Each weekly file’s name is the date representing the start of the week (Monday) in
YYYY-MM-DDformat - Data Filtering: The file name does not indicate that the file contains all data from that entire week. The data within each file is still restricted to your requested date range filter
Example Scenario
If you request data for the date range November 30, 2025 → December 2, 2025, you may receive files with names that appear outside this range:-
File:
2025-11-24.json.gz- November 30, 2025 belongs to the week starting November 24, 2025 (Monday)
- This file contains data for November 30, 2025 only (matching your filter)
- The file name reflects the week start date, not the actual data range
-
File:
2025-12-01.json.gz- December 2, 2025 belongs to the week starting December 1, 2025 (Monday)
- This file contains data for December 1, 2025 and December 2, 2025 (matching your filter)
- Again, the file name reflects the week start date
Key Points
- File names represent the week start date (Monday) for organizational purposes
- The actual data in each file is filtered to your requested date range
- You may see file names with dates outside your requested range, but the data inside will only include events within your specified
fromandtodates - This partitioning approach helps manage file sizes while maintaining efficient data retrieval