analytics_export_create
Start a background export of organization analytics data (events, one user's events, or user properties) to CSV or JSONL, then poll status and download the file via a time-limited link.
Instructions
Start a file export of analytics data of an org (org_id from analytics_orgs_list or MCP_ANALYTICS_ORG_ID): EVENTS (events of the org or project), USER_EVENTS (events of one user, user_filter.analytics_user_ids must have exactly one ID) or USERS (users with their properties). Up to 1,000,000 rows per file, is_truncated is true when more rows matched. Limits per org: one active export at a time (HTTP 409 analytics_export_already_running), 10 exports per hour (HTTP 429 analytics_export_hourly_limit), exports started with an API key: one per 10 minutes (HTTP 429 analytics_export_api_key_interval). HTTP 400 analytics_export_invalid_filter means the filter does not fit the export kind, HTTP 403 means the API key user is not a member of the org. The export runs in the background: export_status goes QUEUED -> RUNNING -> DONE or FAILED. Poll analytics_export_status until DONE or FAILED, not more often than once per ~10 seconds. When DONE, download_url is a direct link valid for 15 minutes (call analytics_export_status again for a fresh one). The file is served gzipped with Content-Encoding: gzip: a browser saves plain CSV or JSONL, from a shell use curl --compressed -o file.csv "<download_url>". Files are deleted 7 days after creation. No rows are returned through MCP, only the status and the link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org_id | No | The analytics org ID from analytics_orgs_list (uses MCP_ANALYTICS_ORG_ID env if not provided) | |
| time_to | No | EVENTS and USER_EVENTS only: events up to this time, ISO 8601 date-time with a timezone (e.g. 2026-10-08T00:00:00.000Z) | |
| time_from | No | EVENTS and USER_EVENTS only: events from this time, ISO 8601 date-time with a timezone (e.g. 2026-10-01T00:00:00.000Z) | |
| export_kind | Yes | What to export | |
| file_format | No | File format, CSV by default. JSONL is one JSON object per line | |
| user_filter | No | For EVENTS: only events of the matching users. For USER_EVENTS: required, analytics_user_ids with exactly one user ID. For USERS: which users to export, all users if not provided | |
| csv_delimiter | No | CSV column delimiter, comma by default | |
| app_project_id | No | The analytics app project ID, all projects of the org if not provided | |
| event_types_filter | No | EVENTS and USER_EVENTS only: events of any of these types, each type with its own property conditions. All event types if not provided |