This endpoint creates an asynchronous export job that generates a downloadable file containing events data. The export is processed in the background and returns a presigned download URL when complete.Use this endpoint when you need to extract large volumes of event data (10,000+ events) efficiently. For real-time needs, use the List Events endpoint instead.
When to use exports: See Exports vs Pagination to understand when to use exports versus the paginated list endpoint.
Request Body
Required Parameters
string
required
The date to export events for in YYYY-MM-DD format. The date is interpreted in your space’s timezone and exports events from 00:00:00 to 23:59:59 for that day.Limit: Maximum 1 day per export.Example: 2024-01-15
Optional Parameters
string
default:"profile"
Determines whether to report metrics by contact or company level.Options:
profile - Contact-level events (default)
company - Company-level events
string[]
Filter results to specific event names. Defaults to all events when omitted.Limits: Minimum 1, maximum 10 event names. Duplicate values are not allowed.Values:
add_payment_info
add_to_cart
complete_registration
contact
initiate_checkout
lead_generated
purchase
schedule
sign_up
start_trial
submit_application
subscribe
upsell_purchase
view_content
webinar_registration
Custom events: custom_event_1 through custom_event_50.
string[]
Filter events by traffic sources. When provided, attribution_model and attribution_window become required.Limits: Minimum 1, maximum 15 sources. Duplicate values are not allowed.
Attribution model to use for filtering events. Required when sources is provided.Options:
first_touch - First interaction attribution
last_touch - Last interaction attribution
linear - Equal credit across all touchpoints
first_platform_touch - First paid platform touch
last_platform_touch - Last paid platform touch
linear_paid - Linear attribution across paid touchpoints only
u_shaped - 40% first, 40% last, 20% middle touchpoints
last_non_direct_touch - Last touch excluding direct traffic
integer
Attribution lookback window in days. Required when sources is provided.Options: 0 (LTV), 1, 7, 14, 30, 60, 90
string[]
default:"['id', 'event_time_utc']"
Specify which fields to include in the exported file.Limits: Minimum 1, maximum 20 fields. Duplicate values are not allowed.Note:id and event_time_utc are always included in the export. When sources are provided for attribution, touchpoint_id is also always included.Available fields:
profile_id - Contact profile identifier
company_id - Company identifier
space_id - Space identifier
event_name - Event name
configured_name - The configured name of the event. For custom events (custom_event_1 through custom_event_50), this is the user-configured name. For standard events, this equals event_name.
amount - Transaction amount (with attribution, this is the partial amount credited to the touchpoint)
is_upsell - Upsell flag
ad_id - Platform-specific ad identifier (requires sources to be provided)
ad_name - Ad name from the ad platform (requires sources to be provided)
adset_id - Platform-specific ad set identifier (requires sources to be provided)
adset_name - Ad set name from the ad platform (requires sources to be provided)
campaign_id - Platform-specific campaign identifier (requires sources to be provided)
campaign_name - Campaign name from the ad platform (requires sources to be provided)
account_id - Platform-specific ad account identifier (requires sources to be provided)
account_name - Ad account name from the ad platform (requires sources to be provided)
order_id - Order identifier
order_name - Order name
event_url - The full URL where the event occurred
Auto-included fields (not user-requestable):
id - Event identifier (always included)
event_time_utc - Event timestamp in UTC (always included)
touchpoint_id - Touchpoint identifier (automatically included when sources are provided)
source - Traffic source (automatically included when any ad hierarchy field is requested: ad_id, ad_name, adset_id, adset_name, campaign_id, campaign_name, account_id, account_name)
Response
Success Response (202 Accepted)
string
Unique identifier for the export job. Use this to check status with the Get Event Export endpoint.
string
Current status of the export. Will be queued immediately after creation.
Error Response
string
Error description explaining what went wrong
Export File Format
Completed exports are delivered as gzipped NDJSON (Newline-Delimited JSON) files. Each line contains a complete JSON object representing one event record.
API key doesn’t have permission or subscription is inactive
422
Invalid parameters provided (check error message for details)
429
Too many requests - rate limit exceeded. See Rate Limiting
Next Steps
After creating an export, you need to poll the Get Event Export endpoint to check the status and retrieve the download URL when ready.
Notes
Rate Limit: This endpoint has a limit of 5 requests per minute per Space. See Rate Limiting for details.
Processing Time: Exports typically complete within seconds to a few minutes depending on data volume
Max Date Range: Each export can only contain one day of data (00:00:00 to 23:59:59 in your space’s timezone)
Export Capacity: Can handle 100,000+ events per day efficiently
Status Checking: Use the Get Event Export endpoint to check status (30 requests/min limit)
Attribution Breakdown: With multi-touch attribution models (linear, u_shaped, linear_paid), each event may generate multiple rows in the export - one per attributed touchpoint. Each row contains the touchpoint’s partial credit (e.g., a $100 conversion with 4 touchpoints returns 4 rows with $25 each). Single-touch models (first_touch, last_touch) return one row per event.
When sources are not provided, all events in the specified date are exported without attribution filtering
The ad hierarchy fields (ad_id, ad_name, adset_id, adset_name, campaign_id, campaign_name, account_id, account_name) require sources to be provided. Requesting higher-level hierarchy fields (such as account_name) may increase processing time compared to requesting only lower-level fields (such as ad_name), so selecting only the fields you need will generally be more efficient.
By default, only id and event_time_utc are included in the export (plus touchpoint_id when using attribution). Specify additional fields as needed to minimize file size.
File Expiration: Download URLs expire after 15 minutes for security. Retrieve the file promptly after completion.
Security: Export files use UUID-based filenames with time-limited presigned URLs to prevent unauthorized access
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cometly API Docs","colors":{"primary":"#0086FF","light":"#0086FF","dark":"#0086FF"},"logo":{"light":"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/logo/light.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=1b725e99cd933554c9ab680583d1b779","dark":"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/logo/dark.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=5b27a31c96508945608d23fa3394eafc"},"favicon":"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/favicon.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=676feb9017410d273527df10995ef763","api":{"playground":{},"mdx":{"auth":{"method":"bearer"},"server":"https://app.cometly.com"}},"navbar":{"links":[{"href":"mailto:support@cometly.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.cometly.com"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cometly","hasAudioNarration":false,"actualSubdomain":"cometly","customDomains":["docs.cometly.com"],"gitSource":{"type":"github","owner":"cometly","repo":"app","deployBranch":"main","contentDirectory":"publicApiDocs/V1","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeccca749ba6b608729de3c","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"MCP","count":58},{"language":"default","tag":"Tools","count":49},{"language":"default","tag":"API Reference","count":27},{"language":"default","tag":"Contacts","count":14},{"language":"default","tag":"Data Warehouse","count":13},{"language":"default","tag":"Events","count":12},{"language":"default","tag":"Get Started","count":9},{"language":"default","tag":"Companies","count":8},{"language":"default","tag":"Reports","count":8},{"language":"default","tag":"Concepts","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@cometly.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoint/create-event-export","slug":"/api-reference/endpoint/create-event-export","pageMetadata":{"title":"Create Event Export","api":"POST https://app.cometly.com/public-api/v1/events/exports","description":"Create an asynchronous export job to generate a downloadable file of events","href":"/api-reference/endpoint/create-event-export"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create an asynchronous export job to generate a downloadable file of events\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,CodeBlock,CodeGroup,Heading,Info,ParamField,ResponseField,Table}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`This endpoint creates an asynchronous export job that generates a downloadable file containing events data. The export is processed in the background and returns a presigned download URL when complete.`}),`\n`,_jsxs(_components.p,{children:[`Use this endpoint when you need to extract large volumes of event data (10,000+ events) efficiently. For real-time needs, use the `,_jsx(_components.a,{href:`/api-reference/endpoint/list-events`,children:`List Events`}),` endpoint instead.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`When to use exports`}),`: See `,_jsx(_components.a,{href:`/concepts/exports-vs-pagination`,children:`Exports vs Pagination`}),` to understand when to use exports versus the paginated list endpoint.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(Heading,{level:`3`,id:`required-parameters`,children:`Required Parameters`}),`\n`,_jsxs(ParamField,{body:`date`,type:`string`,required:true,id:`param-date`,children:[_jsxs(_components.p,{children:[`The date to export events for in `,_jsx(_components.code,{children:`YYYY-MM-DD`}),` format. The date is interpreted in your space’s timezone and exports events from 00:00:00 to 23:59:59 for that day.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Limit`}),`: Maximum 1 day per export.`]}),_jsxs(_components.p,{children:[`Example: `,_jsx(_components.code,{children:`2024-01-15`})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`optional-parameters`,children:`Optional Parameters`}),`\n`,_jsxs(ParamField,{body:`query_mode`,type:`string`,default:`profile`,id:`param-query-mode`,children:[_jsx(_components.p,{children:`Determines whether to report metrics by contact or company level.`}),_jsx(_components.p,{children:`Options:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`profile`}),` - Contact-level events (default)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`company`}),` - Company-level events`]}),`\n`]})]}),`\n`,_jsxs(ParamField,{body:`event_names`,type:`string[]`,placeholder:`['purchase', 'lead_generated']`,id:`param-event-names`,children:[_jsx(_components.p,{children:`Filter results to specific event names. Defaults to all events when omitted.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Limits:`}),` Minimum 1, maximum 10 event names. Duplicate values are not allowed.`]}),_jsx(_components.p,{children:`Values:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`add_payment_info`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`add_to_cart`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`complete_registration`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`contact`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`initiate_checkout`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`lead_generated`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`purchase`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`schedule`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`sign_up`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`start_trial`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`submit_application`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`subscribe`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`upsell_purchase`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`view_content`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`webinar_registration`})}),`\n`]}),_jsxs(_components.p,{children:[`Custom events: `,_jsx(_components.code,{children:`custom_event_1`}),` through `,_jsx(_components.code,{children:`custom_event_50`}),`.`]})]}),`\n`,_jsxs(ParamField,{body:`sources`,type:`string[]`,placeholder:`['facebook_ads', 'google_ads']`,id:`param-sources`,children:[_jsxs(_components.p,{children:[`Filter events by traffic sources. When provided, `,_jsx(_components.code,{children:`attribution_model`}),` and `,_jsx(_components.code,{children:`attribution_window`}),` become required.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Limits:`}),` Minimum 1, maximum 15 sources. Duplicate values are not allowed.`]}),_jsxs(Accordion,{title:`Available sources`,id:`available-sources`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Paid Ads:`}),`\n`,_jsx(_components.code,{children:`facebook_ads`}),`, `,_jsx(_components.code,{children:`google_ads`}),`, `,_jsx(_components.code,{children:`linkedin_ads`}),`, `,_jsx(_components.code,{children:`tiktok_ads`}),`, `,_jsx(_components.code,{children:`youtube_ads`}),`, `,_jsx(_components.code,{children:`instagram_ads`}),`, `,_jsx(_components.code,{children:`bing_ads`}),`, `,_jsx(_components.code,{children:`yahoo_ads`}),`, `,_jsx(_components.code,{children:`pinterest_ads`}),`, `,_jsx(_components.code,{children:`reddit_ads`}),`, `,_jsx(_components.code,{children:`snapchat_ads`}),`, `,_jsx(_components.code,{children:`telegram_ads`}),`, `,_jsx(_components.code,{children:`twitch_ads`}),`, `,_jsx(_components.code,{children:`x_ads`}),`, `,_jsx(_components.code,{children:`quora_ads`}),`, `,_jsx(_components.code,{children:`duckduckgo_ads`}),`, `,_jsx(_components.code,{children:`whop_ads`}),`, `,_jsx(_components.code,{children:`chatgpt_ads`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Organic:`}),`\n`,_jsx(_components.code,{children:`facebook_organic`}),`, `,_jsx(_components.code,{children:`google_organic`}),`, `,_jsx(_components.code,{children:`linkedin_organic`}),`, `,_jsx(_components.code,{children:`tiktok_organic`}),`, `,_jsx(_components.code,{children:`youtube_organic`}),`, `,_jsx(_components.code,{children:`instagram_organic`}),`, `,_jsx(_components.code,{children:`bing_organic`}),`, `,_jsx(_components.code,{children:`yahoo_organic`}),`, `,_jsx(_components.code,{children:`pinterest_organic`}),`, `,_jsx(_components.code,{children:`reddit_organic`}),`, `,_jsx(_components.code,{children:`snapchat_organic`}),`, `,_jsx(_components.code,{children:`telegram_organic`}),`, `,_jsx(_components.code,{children:`twitch_organic`}),`, `,_jsx(_components.code,{children:`x_organic`}),`, `,_jsx(_components.code,{children:`quora_organic`}),`, `,_jsx(_components.code,{children:`duckduckgo_organic`}),`, `,_jsx(_components.code,{children:`messenger_organic`}),`, `,_jsx(_components.code,{children:`brave_organic`}),`, `,_jsx(_components.code,{children:`threads_organic`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`AI Platforms:`}),`\n`,_jsx(_components.code,{children:`ai_chat_gpt`}),`, `,_jsx(_components.code,{children:`ai_perplexity`}),`, `,_jsx(_components.code,{children:`ai_copilot`}),`, `,_jsx(_components.code,{children:`ai_claude`}),`, `,_jsx(_components.code,{children:`ai_grok`}),`, `,_jsx(_components.code,{children:`ai_gemini`}),`, `,_jsx(_components.code,{children:`ai_deepseek`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Other:`}),`\n`,_jsx(_components.code,{children:`email`}),`, `,_jsx(_components.code,{children:`sms`}),`, `,_jsx(_components.code,{children:`referral`}),`, `,_jsx(_components.code,{children:`direct`}),`, `,_jsx(_components.code,{children:`shop_app`}),`, `,_jsx(_components.code,{children:`substack`}),`, `,_jsx(_components.code,{children:`capterra`}),`, `,_jsx(_components.code,{children:`trustpilot`}),`, `,_jsx(_components.code,{children:`g2`}),`, `,_jsx(_components.code,{children:`yelp`})]})]})]}),`\n`,_jsxs(ParamField,{body:`attribution_model`,type:`string`,id:`param-attribution-model`,children:[_jsxs(_components.p,{children:[`Attribution model to use for filtering events. Required when `,_jsx(_components.code,{children:`sources`}),` is provided.`]}),_jsx(_components.p,{children:`Options:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`first_touch`}),` - First interaction attribution`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`last_touch`}),` - Last interaction attribution`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`linear`}),` - Equal credit across all touchpoints`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`first_platform_touch`}),` - First paid platform touch`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`last_platform_touch`}),` - Last paid platform touch`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`linear_paid`}),` - Linear attribution across paid touchpoints only`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`u_shaped`}),` - 40% first, 40% last, 20% middle touchpoints`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`last_non_direct_touch`}),` - Last touch excluding direct traffic`]}),`\n`]})]}),`\n`,_jsxs(ParamField,{body:`attribution_window`,type:`integer`,id:`param-attribution-window`,children:[_jsxs(_components.p,{children:[`Attribution lookback window in days. Required when `,_jsx(_components.code,{children:`sources`}),` is provided.`]}),_jsxs(_components.p,{children:[`Options: `,_jsx(_components.code,{children:`0`}),` (LTV), `,_jsx(_components.code,{children:`1`}),`, `,_jsx(_components.code,{children:`7`}),`, `,_jsx(_components.code,{children:`14`}),`, `,_jsx(_components.code,{children:`30`}),`, `,_jsx(_components.code,{children:`60`}),`, `,_jsx(_components.code,{children:`90`})]})]}),`\n`,_jsxs(ParamField,{body:`fields`,type:`string[]`,default:`['id', 'event_time_utc']`,placeholder:`['id', 'event_name', 'amount']`,id:`param-fields`,children:[_jsx(_components.p,{children:`Specify which fields to include in the exported file.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Limits:`}),` Minimum 1, maximum 20 fields. Duplicate values are not allowed.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Note:`}),` `,_jsx(_components.code,{children:`id`}),` and `,_jsx(_components.code,{children:`event_time_utc`}),` are always included in the export. When `,_jsx(_components.code,{children:`sources`}),` are provided for attribution, `,_jsx(_components.code,{children:`touchpoint_id`}),` is also always included.`]}),_jsx(_components.p,{children:`Available fields:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`profile_id`}),` - Contact profile identifier`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`company_id`}),` - Company identifier`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`space_id`}),` - Space identifier`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`event_name`}),` - Event name`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`configured_name`}),` - The configured name of the event. For custom events (`,_jsx(_components.code,{children:`custom_event_1`}),` through `,_jsx(_components.code,{children:`custom_event_50`}),`), this is the user-configured name. For standard events, this equals `,_jsx(_components.code,{children:`event_name`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`amount`}),` - Transaction amount (with attribution, this is the partial amount credited to the touchpoint)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`is_upsell`}),` - Upsell flag`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ad_id`}),` - Platform-specific ad identifier (requires `,_jsx(_components.code,{children:`sources`}),` to be provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ad_name`}),` - Ad name from the ad platform (requires `,_jsx(_components.code,{children:`sources`}),` to be provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`adset_id`}),` - Platform-specific ad set identifier (requires `,_jsx(_components.code,{children:`sources`}),` to be provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`adset_name`}),` - Ad set name from the ad platform (requires `,_jsx(_components.code,{children:`sources`}),` to be provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`campaign_id`}),` - Platform-specific campaign identifier (requires `,_jsx(_components.code,{children:`sources`}),` to be provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`campaign_name`}),` - Campaign name from the ad platform (requires `,_jsx(_components.code,{children:`sources`}),` to be provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`account_id`}),` - Platform-specific ad account identifier (requires `,_jsx(_components.code,{children:`sources`}),` to be provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`account_name`}),` - Ad account name from the ad platform (requires `,_jsx(_components.code,{children:`sources`}),` to be provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`order_id`}),` - Order identifier`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`order_name`}),` - Order name`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`event_url`}),` - The full URL where the event occurred`]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Auto-included fields (not user-requestable):`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`id`}),` - Event identifier (always included)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`event_time_utc`}),` - Event timestamp in UTC (always included)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`touchpoint_id`}),` - Touchpoint identifier (automatically included when sources are provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`source`}),` - Traffic source (automatically included when any ad hierarchy field is requested: `,_jsx(_components.code,{children:`ad_id`}),`, `,_jsx(_components.code,{children:`ad_name`}),`, `,_jsx(_components.code,{children:`adset_id`}),`, `,_jsx(_components.code,{children:`adset_name`}),`, `,_jsx(_components.code,{children:`campaign_id`}),`, `,_jsx(_components.code,{children:`campaign_name`}),`, `,_jsx(_components.code,{children:`account_id`}),`, `,_jsx(_components.code,{children:`account_name`}),`)`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`success-response-202-accepted`,children:`Success Response (202 Accepted)`}),`\n`,_jsx(ResponseField,{name:`export_id`,type:`string`,id:`param-export-id`,children:_jsxs(_components.p,{children:[`Unique identifier for the export job. Use this to check status with the `,_jsx(_components.a,{href:`/api-reference/endpoint/get-event-export`,children:`Get Event Export`}),` endpoint.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[`Current status of the export. Will be `,_jsx(_components.code,{children:`queued`}),` immediately after creation.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`error-response`,children:`Error Response`}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Error description explaining what went wrong`})}),`\n`,_jsx(Heading,{level:`2`,id:`export-file-format`,children:`Export File Format`}),`\n`,_jsxs(_components.p,{children:[`Completed exports are delivered as `,_jsx(_components.strong,{children:`gzipped NDJSON`}),` (Newline-Delimited JSON) files. Each line contains a complete JSON object representing one event record.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"event_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"purchase\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`99.99`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"event_time_utc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:23:45Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"124\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"event_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sign_up\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"event_time_utc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:24:12Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"125\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"event_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"purchase\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`149.50`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"event_time_utc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:25:33Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This format is ideal for streaming and processing large files line-by-line without loading the entire file into memory.`}),`\n`,_jsx(Heading,{level:`2`,id:`example-requests`,children:`Example Requests`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`33`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`33`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create export for a single day with minimal parameters`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X POST `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://app.cometly.com/public-api/v1/events/exports\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Accept: application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"date\": \"2024-01-15\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create export with event filtering and specific fields`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X POST `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://app.cometly.com/public-api/v1/events/exports\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Accept: application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"date\": \"2024-01-15\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"query_mode\": \"profile\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"event_names\": [\"purchase\", \"sign_up\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"fields\": [\"id\", \"event_name\", \"amount\", \"profile_id\", \"event_time_utc\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create export with attribution filtering`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X POST `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://app.cometly.com/public-api/v1/events/exports\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Accept: application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"date\": \"2024-01-15\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sources\": [\"facebook_ads\", \"google_ads\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"attribution_model\": \"last_touch\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"attribution_window\": 30,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"fields\": [\"id\", \"event_name\", \"amount\", \"ad_id\", \"event_time_utc\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`52`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`52`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Create export for a single day with minimal parameters`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.cometly.com/public-api/v1/events/exports'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` method: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body: JSON.stringify({`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` date: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2024-01-15'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` data = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Export created: ${data.export_id}, Status: ${data.status}`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Create export with event filtering and specific fields`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` filteredResponse = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.cometly.com/public-api/v1/events/exports'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` method: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body: JSON.stringify({`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` date: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2024-01-15'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` query_mode: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'profile'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event_names: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'purchase'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sign_up'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fields: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'amount'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'profile_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_time_utc'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` filteredData = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` filteredResponse.json();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Create export with attribution filtering`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` attributedResponse = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.cometly.com/public-api/v1/events/exports'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` method: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body: JSON.stringify({`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` date: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2024-01-15'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sources: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'facebook_ads'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'google_ads'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` attribution_model: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'last_touch'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` attribution_window: 30,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fields: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'amount'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ad_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_time_utc'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` attributedData = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` attributedResponse.json();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`PHP`,numberOfLines:`65`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`65`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c?php`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Create export for a single day with minimal parameters`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$baseUrl = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.cometly.com/public-api/v1/events/exports'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$headers = [`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept: application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$data = json_encode([`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'date'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2024-01-15'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$ch = curl_init();`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_URL, $baseUrl);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_POST, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_POSTFIELDS, $data);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_RETURNTRANSFER, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$response = curl_exec($ch);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$result = json_decode($response, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_close($ch);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`echo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Export created: {$result['export_id']}, Status: {$result['status']}\\\\n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Create export with event filtering and specific fields`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$filteredData = json_encode([`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'date'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2024-01-15'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'query_mode'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'profile'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'event_names'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'purchase'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sign_up'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'fields'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'amount'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'profile_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_time_utc'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$ch = curl_init();`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_URL, $baseUrl);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_POST, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_POSTFIELDS, $filteredData);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_RETURNTRANSFER, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$filteredResponse = curl_exec($ch);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$filteredResult = json_decode($filteredResponse, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_close($ch);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Create export with attribution filtering`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$attributedData = json_encode([`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'date'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2024-01-15'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'sources'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'facebook_ads'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'google_ads'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'attribution_model'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'last_touch'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'attribution_window'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => 30,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'fields'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'amount'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ad_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_time_utc'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$ch = curl_init();`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_URL, $baseUrl);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_POST, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_POSTFIELDS, $attributedData);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_setopt($ch, CURLOPT_RETURNTRANSFER, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$attributedResponse = curl_exec($ch);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$attributedResult = json_decode($attributedResponse, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`curl_close($ch);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?>`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`41`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`41`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create export for a single day with minimal parameters`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`base_url = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.cometly.com/public-api/v1/events/exports'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers = {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data = {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'date'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2024-01-15'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response = requests.post(base_url, headers=headers, json=data)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result = response.json()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`print(f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Export created: {result['export_id']}, Status: {result['status']}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create export with event filtering and specific fields`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`filtered_data = {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'date'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2024-01-15'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'query_mode'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'profile'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'event_names'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'purchase'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sign_up'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'fields'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'amount'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'profile_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_time_utc'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`filtered_response = requests.post(base_url, headers=headers, json=filtered_data)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`filtered_result = filtered_response.json()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create export with attribution filtering`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`attributed_data = {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'date'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2024-01-15'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'sources'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'facebook_ads'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'google_ads'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'attribution_model'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'last_touch'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'attribution_window'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: 30,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'fields'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'amount'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ad_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'event_time_utc'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`attributed_response = requests.post(base_url, headers=headers, json=attributed_data)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`attributed_result = attributed_response.json()`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`status-codes`,children:`Status Codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`202`}),_jsx(_components.td,{children:`Export job created and queued for processing`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:`Missing or invalid API key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:`API key doesn’t have permission or subscription is inactive`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:`Invalid parameters provided (check error message for details)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsxs(_components.td,{children:[`Too many requests - rate limit exceeded. See `,_jsx(_components.a,{href:`/introduction/rate-limiting`,children:`Rate Limiting`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next Steps`}),`\n`,_jsxs(_components.p,{children:[`After creating an export, you need to poll the `,_jsx(_components.a,{href:`/api-reference/endpoint/get-event-export`,children:`Get Event Export`}),` endpoint to check the status and retrieve the download URL when ready.`]}),`\n`,_jsx(Heading,{level:`2`,id:`notes`,children:`Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rate Limit`}),`: This endpoint has a limit of `,_jsx(_components.strong,{children:`5 requests per minute`}),` per Space. See `,_jsx(_components.a,{href:`/introduction/rate-limiting`,children:`Rate Limiting`}),` for details.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Processing Time`}),`: Exports typically complete within seconds to a few minutes depending on data volume`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Max Date Range`}),`: Each export can only contain `,_jsx(_components.strong,{children:`one day`}),` of data (00:00:00 to 23:59:59 in your space’s timezone)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Export Capacity`}),`: Can handle 100,000+ events per day efficiently`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Status Checking`}),`: Use the `,_jsx(_components.a,{href:`/api-reference/endpoint/get-event-export`,children:`Get Event Export`}),` endpoint to check status (30 requests/min limit)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Attribution Breakdown`}),`: With multi-touch attribution models (linear, u_shaped, linear_paid), each event may generate multiple rows in the export - one per attributed touchpoint. Each row contains the touchpoint’s partial credit (e.g., a $100 conversion with 4 touchpoints returns 4 rows with $25 each). Single-touch models (first_touch, last_touch) return one row per event.`]}),`\n`,_jsxs(_components.li,{children:[`When `,_jsx(_components.code,{children:`sources`}),` are not provided, all events in the specified date are exported without attribution filtering`]}),`\n`,_jsxs(_components.li,{children:[`The ad hierarchy fields (`,_jsx(_components.code,{children:`ad_id`}),`, `,_jsx(_components.code,{children:`ad_name`}),`, `,_jsx(_components.code,{children:`adset_id`}),`, `,_jsx(_components.code,{children:`adset_name`}),`, `,_jsx(_components.code,{children:`campaign_id`}),`, `,_jsx(_components.code,{children:`campaign_name`}),`, `,_jsx(_components.code,{children:`account_id`}),`, `,_jsx(_components.code,{children:`account_name`}),`) require `,_jsx(_components.code,{children:`sources`}),` to be provided. Requesting higher-level hierarchy fields (such as `,_jsx(_components.code,{children:`account_name`}),`) may increase processing time compared to requesting only lower-level fields (such as `,_jsx(_components.code,{children:`ad_name`}),`), so selecting only the fields you need will generally be more efficient.`]}),`\n`,_jsxs(_components.li,{children:[`By default, only `,_jsx(_components.code,{children:`id`}),` and `,_jsx(_components.code,{children:`event_time_utc`}),` are included in the export (plus `,_jsx(_components.code,{children:`touchpoint_id`}),` when using attribution). Specify additional fields as needed to minimize file size.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`File Expiration`}),`: Download URLs expire after 15 minutes for security. Retrieve the file promptly after completion.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Security`}),`: Export files use UUID-based filenames with time-limited presigned URLs to prevent unauthorized access`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Event Export","api":"POST https://app.cometly.com/public-api/v1/events/exports","description":"Create an asynchronous export job to generate a downloadable file of events","href":"/api-reference/endpoint/create-event-export"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Request Body","slug":"request-body","depth":2,"children":[{"title":"Required Parameters","slug":"required-parameters","depth":3,"children":[]},{"title":"Optional Parameters","slug":"optional-parameters","depth":3,"children":[]}]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"Success Response (202 Accepted)","slug":"success-response-202-accepted","depth":3,"children":[]},{"title":"Error Response","slug":"error-response","depth":3,"children":[]}]},{"title":"Export File Format","slug":"export-file-format","depth":2,"children":[]},{"title":"Example Requests","slug":"example-requests","depth":2,"children":[]},{"title":"Status Codes","slug":"status-codes","depth":2,"children":[]},{"title":"Next Steps","slug":"next-steps","depth":2,"children":[]},{"title":"Notes","slug":"notes","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Create Event Export","path":"/public-api/v1/events/exports","servers":[{"url":"https://app.cometly.com"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"date":[{"type":"string","description":"The date to export events for in `YYYY-MM-DD` format. The date is interpreted in your space’s timezone and exports events from 00:00:00 to 23:59:59 for that day. Limit : Maximum 1 day per export. Example: `2024-01-15`","required":true}],"query_mode":[{"type":"string","description":"Determines whether to report metrics by contact or company level. Options: `profile` - Contact-level events (default) `company` - Company-level events"}],"event_names":[{"type":"array","items":[{"type":"string"}],"description":"Filter results to specific event names. Defaults to all events when omitted. Limits: Minimum 1, maximum 10 event names. Duplicate values are not allowed. Values: `add_payment_info` `add_to_cart` `complete_registration` `contact` `initiate_checkout` `lead_generated` `purchase` `schedule` `sign_up` `start_trial` `submit_application` `subscribe` `upsell_purchase` `view_content` `webinar_registration` Custom events: `custom_event_1` through `custom_event_50` .","placeholder":"['purchase', 'lead_generated']"}],"sources":[{"type":"array","items":[{"type":"string"}],"description":"Filter events by traffic sources. When provided, `attribution_model` and `attribution_window` become required. Limits: Minimum 1, maximum 15 sources. Duplicate values are not allowed.","placeholder":"['facebook_ads', 'google_ads']"}],"attribution_model":[{"type":"string","description":"Attribution model to use for filtering events. Required when `sources` is provided. Options: `first_touch` - First interaction attribution `last_touch` - Last interaction attribution `linear` - Equal credit across all touchpoints `first_platform_touch` - First paid platform touch `last_platform_touch` - Last paid platform touch `linear_paid` - Linear attribution across paid touchpoints only `u_shaped` - 40% first, 40% last, 20% middle touchpoints `last_non_direct_touch` - Last touch excluding direct traffic"}],"attribution_window":[{"type":"integer","description":"Attribution lookback window in days. Required when `sources` is provided. Options: `0` (LTV), `1` , `7` , `14` , `30` , `60` , `90`"}],"fields":[{"type":"array","items":[{"type":"string"}],"description":"Specify which fields to include in the exported file. Limits: Minimum 1, maximum 20 fields. Duplicate values are not allowed. Note: `id` and `event_time_utc` are always included in the export. When `sources` are provided for attribution, `touchpoint_id` is also always included. Available fields: `profile_id` - Contact profile identifier `company_id` - Company identifier `space_id` - Space identifier `event_name` - Event name `configured_name` - The configured name of the event. For custom events ( `custom_event_1` through `custom_event_50` ), this is the user-configured name. For standard events, this equals `event_name` . `amount` - Transaction amount (with attribution, this is the partial amount credited to the touchpoint) `is_upsell` - Upsell flag `ad_id` - Platform-specific ad identifier (requires `sources` to be provided) `ad_name` - Ad name from the ad platform (requires `sources` to be provided) `adset_id` - Platform-specific ad set identifier (requires `sources` to be provided) `adset_name` - Ad set name from the ad platform (requires `sources` to be provided) `campaign_id` - Platform-specific campaign identifier (requires `sources` to be provided) `campaign_name` - Campaign name from the ad platform (requires `sources` to be provided) `account_id` - Platform-specific ad account identifier (requires `sources` to be provided) `account_name` - Ad account name from the ad platform (requires `sources` to be provided) `order_id` - Order identifier `order_name` - Order name `event_url` - The full URL where the event occurred Auto-included fields (not user-requestable): `id` - Event identifier (always included) `event_time_utc` - Event timestamp in UTC (always included) `touchpoint_id` - Touchpoint identifier (automatically included when sources are provided) `source` - Traffic source (automatically included when any ad hierarchy field is requested: `ad_id` , `ad_name` , `adset_id` , `adset_name` , `campaign_id` , `campaign_name` , `account_id` , `account_name` )","placeholder":"['id', 'event_name', 'amount']"}]}}],"examples":{"example":{"value":{"date":"\u003cstring>","query_mode":"\u003cstring>","event_names":["\u003cstring>"],"sources":["\u003cstring>"],"attribution_model":"\u003cstring>","attribution_window":123,"fields":["\u003cstring>"]}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"export_id":[{"type":"string","description":"Unique identifier for the export job. Use this to check status with the Get Event Export endpoint."}],"status":[{"type":"string","description":"Current status of the export. Will be `queued` immediately after creation."}],"message":[{"type":"string","description":"Error description explaining what went wrong"}]}}],"examples":{"example":{"value":{"export_id":"\u003cstring>","status":"\u003cstring>","message":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"cometly","siteName":"Cometly API Docs","title":"Create Event Export - Cometly API Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-02T18:45:18.634Z","originalFileLocation":"api-reference/endpoint/create-event-export.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create an asynchronous export job to generate a downloadable file of events\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cometly API Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Event Export - Cometly API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create an asynchronous export job to generate a downloadable file of events\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cometly API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cometly.com/api-reference/endpoint/create-event-export\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cometly.mintlify.site/_mintlify/api/og/v2?division=Events\u0026amp;title=Create+Event+Export\u0026amp;description=Create+an+asynchronous+export+job+to+generate+a+downloadable+file+of+events\u0026amp;theme=4b81b0d192612debf11d7771\u0026amp;signature=c2cf305002cba7b65f18dec5e2093a061674041c55a25e5cb3b48953f0a5509e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Event Export - Cometly API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create an asynchronous export job to generate a downloadable file of events\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cometly.mintlify.site/_mintlify/api/og/v2?division=Events\u0026amp;title=Create+Event+Export\u0026amp;description=Create+an+asynchronous+export+job+to+generate+a+downloadable+file+of+events\u0026amp;theme=4b81b0d192612debf11d7771\u0026amp;signature=c2cf305002cba7b65f18dec5e2093a061674041c55a25e5cb3b48953f0a5509e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cometly API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0086FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cometly.com/api-reference/endpoint/create-event-export\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/create-event-export.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cometly.com/#organization\",\"name\":\"Cometly API Docs\",\"url\":\"https://docs.cometly.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/logo/light.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=1b725e99cd933554c9ab680583d1b779\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cometly.com#website\",\"name\":\"Cometly API Docs\",\"url\":\"https://docs.cometly.com\",\"publisher\":{\"@id\":\"https://docs.cometly.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cometly.com/api-reference/endpoint/create-event-export#webpage\",\"url\":\"https://docs.cometly.com/api-reference/endpoint/create-event-export\",\"name\":\"Create Event Export\",\"description\":\"Create an asynchronous export job to generate a downloadable file of events\",\"dateModified\":\"2026-11-02T18:45:18.634Z\",\"isPartOf\":{\"@id\":\"https://docs.cometly.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cometly.com/api-reference/endpoint/create-event-export#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cometly.com/api-reference/endpoint/create-event-export#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Events\",\"item\":\"https://docs.cometly.com/api-reference/endpoint/create-event\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Event Export\",\"item\":\"https://docs.cometly.com/api-reference/endpoint/create-event-export\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.cometly.com/api-reference/endpoint/create-event-export#apireference\",\"headline\":\"Create Event Export\",\"name\":\"Create Event Export\",\"description\":\"Create an asynchronous export job to generate a downloadable file of events\",\"url\":\"https://docs.cometly.com/api-reference/endpoint/create-event-export\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cometly.com/api-reference/endpoint/create-event-export#webpage\"},\"dateModified\":\"2026-11-02T18:45:18.634Z\",\"publisher\":{\"@id\":\"https://docs.cometly.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cometly.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cometly API Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cometly API Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoint/create-event-export.md","siteName":"Cometly API Docs","nav":{"global":null,"tabs":[{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"Cometly API Documentation","href":""},{"title":"Authentication","href":"/introduction/authentication"},{"title":"Rate Limiting","href":"/introduction/rate-limiting"},{"title":"Status Codes","href":"/introduction/status-codes"},{"title":"Changelog","href":"/changelog"}]},{"group":"Events","pages":[{"title":"Create Event","api":"POST https://app.cometly.com/public-api/v1/events/track","href":"/api-reference/endpoint/create-event"},{"title":"List Events","api":"GET https://app.cometly.com/public-api/v1/events","href":"/api-reference/endpoint/list-events"},{"title":"Get Event","api":"GET https://app.cometly.com/public-api/v1/events/{event_id}","href":"/api-reference/endpoint/get-event"},{"title":"Update Event","api":"PUT https://app.cometly.com/public-api/v1/events/{event_id}","href":"/api-reference/endpoint/update-event"},{"title":"Delete Event","api":"DELETE https://app.cometly.com/public-api/v1/events/{event_id}","description":"Delete a specific event by its ID","href":"/api-reference/endpoint/delete-event"},{"title":"Create Event Export","api":"POST https://app.cometly.com/public-api/v1/events/exports","href":"/api-reference/endpoint/create-event-export"},{"title":"Get Event Export","api":"GET https://app.cometly.com/public-api/v1/events/exports/{id}","description":"Check the status of an export job and retrieve the download URL when ready","href":"/api-reference/endpoint/get-event-export"}]},{"group":"Contacts","pages":[{"title":"Create Contact","api":"POST https://app.cometly.com/public-api/v1/contacts","href":"/api-reference/endpoint/create-contact"},{"title":"List Contacts","api":"GET https://app.cometly.com/public-api/v1/contacts","href":"/api-reference/endpoint/list-contacts"},{"title":"Get Contact","api":"GET https://app.cometly.com/public-api/v1/contacts/{id}","href":"/api-reference/endpoint/get-contact"},{"title":"Get Contact by Email","api":"GET https://app.cometly.com/public-api/v1/contacts/by-email/{email}","href":"/api-reference/endpoint/get-contact-by-email"},{"title":"Update Contact","api":"PUT https://app.cometly.com/public-api/v1/contacts/{id}","href":"/api-reference/endpoint/update-contact"},{"title":"Attach Contact Company","api":"PUT https://app.cometly.com/public-api/v1/contacts/{id}/company","href":"/api-reference/endpoint/attach-contact-company"},{"title":"Detach Contact Company","api":"DELETE https://app.cometly.com/public-api/v1/contacts/{id}/company","href":"/api-reference/endpoint/detach-contact-company"},{"title":"Delete Contact PII","api":"DELETE https://app.cometly.com/public-api/v1/contacts/{id}/pii","href":"/api-reference/endpoint/delete-contact-pii"},{"title":"Create Contact Export","api":"POST https://app.cometly.com/public-api/v1/contacts/exports","href":"/api-reference/endpoint/create-contact-export"},{"title":"Get Contact Export","api":"GET https://app.cometly.com/public-api/v1/contacts/exports/{id}","href":"/api-reference/endpoint/get-contact-export"}]},{"group":"Companies","pages":[{"title":"List Companies","api":"GET https://app.cometly.com/public-api/v1/companies","href":"/api-reference/endpoint/list-companies"},{"title":"Get Company","api":"GET https://app.cometly.com/public-api/v1/companies/{id}","href":"/api-reference/endpoint/get-company"},{"title":"Update Company","api":"PUT https://app.cometly.com/public-api/v1/companies/{id}","href":"/api-reference/endpoint/update-company"},{"title":"Create Company Export","api":"POST https://app.cometly.com/public-api/v1/companies/exports","href":"/api-reference/endpoint/create-company-export"},{"title":"Get Company Export","api":"GET https://app.cometly.com/public-api/v1/companies/exports/{id}","href":"/api-reference/endpoint/get-company-export"}]}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"Concepts","pages":[{"title":"Concepts","href":"/concepts/sending-data-to-cometly"}]},{"tab":"Data Warehouse","pages":[{"title":"Data Warehouse","href":"/data-warehouse/overview"}]}]},"basePath":"","title":"Create Event Export - Cometly API Docs","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DdEMm2kG.js","utils-BMo572L7.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C-4m9KAx.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DPLK2Oq9.js","snippetPresets-BKjfJMC9.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DTsgtCEj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C8vmhyQM.js","shallow-r9w8LQGS.js","getApiPlaygroundDisplay-DjPI64HQ.js","CodeSnippet-C8Bvhl16.js","CodeSnippets-BtWUwcMy.js","Page-BIYvYBgk.js","getPastedJson-Dcm_3Pgl.js","icon-BXwrTpjc.js","MethodPill-CcjfVmmy.js","DuplicateIcon-BuKIbXAQ.js","createIcon-DaL9yXsO.js","DynamicMarkdown-Co5nikxh.js","SectionHeading-P4UNTsMZ.js","axios-vUo_bRtp.js"]}