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
support@userpilot.com.
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. | [“example@work.com”] |
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.