> For the complete documentation index, see [llms.txt](https://help.branch.io/llms.txt).

# Aggregate API

Export log-level and aggregate-level data for measuring campaign performance.

[Read the Aggregate API overview](https://help.branch.io/apidocs/aggregate/overview.md)

## Get export download status

`GET https://api2.branch.io/v2/analytics/{job_id}`

Check the status of an aggregate export job. When the job's status is `FINISHED`, the response includes a signed `response_url` you can use to download the export.

### Parameters

- `app_id` (string, query, required) — Unique identifier for the Branch app of the requested data.
- `job_id` (string, path, required) — The unique ID of the request. Obtained from the [Export Request](https://help.branch.io/apidocs/aggregate/overview.md#request-aggregate-export). 
- `format` (enum, query) — Format of the returned data: json or csv. One of `csv`, `json`.
- `limit` (integer, query) — The maximum number of results to return.

### Responses

- `200` — Current status of the aggregate export job. When `status` is `FINISHED`, `response_url` contains the signed download link.
- `400` — Bad request—typically an invalid or missing credential or parameter.
- `404` — Job ID not found.
- `429` — Rate limit exceeded—reduce request frequency and retry.

### Returns

Current status of the aggregate export job. When `status` is `FINISHED`, `response_url` contains the signed download link. Returns `400`, `404`, and `429` on failure — see the response panel for the error shape.

### Example request

```bash
curl 'https://api2.branch.io/v2/analytics/a1b2c3d4?app_id=123456789012345680' \
  --request GET \
  --header 'Access-Token: <Access-Token>'
```

### Example responses

`200`

```json
{
  "code": 200,
  "status": "FINISHED",
  "response_url": "https://branch-exports-usw2.s3.amazonaws.com/partner-query/2023-05-12-2023-05-19-eo_install-day-{JOB_ID}.csv?Signature={SIGNATURE}&AWSAccessKeyId={AWS_KEY}&Expires={EXPIRATION}"
}
```

`400`

```json
{
  "error": {
    "message": "Authentication failed.",
    "code": 400
  }
}
```

`429`

```json
{
  "error": {
    "code": 429,
    "message": "Rate limit reached."
  }
}
```

## Request aggregate export

`POST https://api2.branch.io/v2/analytics`

By passing in the appropriate options, you can initiate an export of your aggregate Branch data.

### Parameters

- `data_source` (enum, required) — A string value representing the data source. See [Topics](https://help.branch.io/apidocs/aggregate/overview.md#topics) for the complete list. One of `eo_impression`, `eo_click`, `eo_web_to_app_auto_redirect`, `eo_branch_cta_view`, `eo_open`, `eo_install`, `eo_reinstall`, `eo_web_session_start`, `eo_pageview`, `eo_commerce_event`, `eo_custom_event`, `eo_content_event`, `eo_dismissal`, `eo_user_lifecycle_event`, `cost`, `skadnetwork-valid-messages`, `eo_click_blocked`, `eo_impression_blocked`, `eo_install_blocked`, `eo_reinstall_blocked`, `eo_open_blocked`, `eo_web_session_start_blocked`, `eo_pageview_blocked`, `eo_custom_event_blocked`, `eo_content_event_blocked`, `eo_commerce_event_blocked`, `eo_user_lifecycle_event_blocked`, `eo_branch_cta_view_blocked`, `eo_web_to_app_auto_redirect_blocked`.
- `dimensions` (array of enum, required) — An array representing the dimensions to group by. The limit is 11. See [Dimensions](https://help.branch.io/apidocs/aggregate/overview.md#dimensions) for the complete list. One of `name`, `app_id`, `app_name`, `origin`, `timestamp`, `deep_linked`, `from_desktop`, `attributed`, `user_data_app_store`, `user_data_app_version`, `user_data_os`, `user_data_language`, `user_data_platform`, `user_data_environment`, `user_data_geo_dma_code`, `user_data_geo_country_code`, `user_data_country`, `user_data_cpp_level`, `user_data_geo_region_en`, `user_data_opted_in`, `user_data_opted_in_status`, `last_attributed_touch_type`, `last_attributed_touch_data_tilde_tags`, `last_attributed_touch_data_tilde_secondary_publisher`, `last_attributed_touch_data_tilde_campaign`, `last_attributed_touch_data_tilde_advertising_partner_name`, `last_attributed_touch_data_tilde_advertising_partner_id`, `last_attributed_touch_data_tilde_feature`, `last_attributed_touch_data_tilde_creative_name`, `last_attributed_touch_data_tilde_creative_id`, `last_attributed_touch_data_tilde_ad_name`, `last_attributed_touch_data_tilde_ad_id`, `last_attributed_touch_data_tilde_campaign_id`, `last_attributed_touch_data_tilde_placement`, `last_attributed_touch_data_tilde_stage`, `last_attributed_touch_data_tilde_channel`, `last_attributed_touch_data_tilde_ad_set_name`, `last_attributed_touch_data_tilde_ad_set_id`, `last_attributed_touch_data_tilde_keyword`, `last_attributed_touch_data_tilde_keyword_id`, `last_attributed_touch_data_tilde_journey_id`, `last_attributed_touch_data_tilde_view_name`, `last_attributed_touch_data_tilde_view_id`, `last_attributed_touch_data_tilde_agency`, `last_attributed_touch_data_tilde_agency_id`, `last_attributed_touch_data_tilde_customer_secondary_publisher`, `last_attributed_touch_data_tilde_customer_ad_set_name`, `last_attributed_touch_data_tilde_customer_ad_name`, `last_attributed_touch_data_tilde_customer_keyword`, `last_attributed_touch_data_tilde_customer_placement`, `last_attributed_touch_data_tilde_customer_sub_site_name`, `last_attributed_touch_data_tilde_customer_campaign`, `last_attributed_touch_data_plus_web_format`, `last_attributed_touch_data_plus_current_feature`, `last_attributed_touch_data_plus_via_features`, `last_attributed_touch_data_plus_aggregate_measurement`, `last_attributed_touch_data_plus_pam_enabled`, `last_attributed_touch_data_dollar_marketing_title`, `last_attributed_touch_data_dollar_meta_is_mobile_data_terms_signed`, `last_attributed_touch_data_dollar_3p`, `last_cta_view_data_tilde_ad_name`, `last_cta_view_data_tilde_secondary_publisher`, `last_cta_view_data_tilde_campaign`, `last_cta_view_data_tilde_advertising_partner_name`, `last_cta_view_data_tilde_feature`, `last_cta_view_data_tilde_ad_set_name`, `last_cta_view_data_tilde_ad_set_id`, `last_cta_view_data_tilde_campaign_id`, `last_cta_view_data_tilde_creative_name`, `last_cta_view_data_tilde_creative_id`, `last_cta_view_data_plus_via_features`, `last_cta_view_data_dollar_3p`, `last_cta_view_data_dollar_meta_is_mobile_data_terms_signed`, `last_cta_view_data_tilde_tags`, `last_cta_view_data_plus_web_format`, `last_cta_view_data_tilde_channel`, `last_cta_view_data_tilde_ad_id`, `last_cta_view_data_tilde_stage`, `body_ad_network_id`, `body_campaign_id`, `body_app_id`, `body_redownload`, `body_source_app_id`, `body_conversion_value`, `body_last_attributed_touch_data_tilde_creative_name`, `body_last_attributed_touch_data_tilde_ad_set_name`, `body_last_attributed_touch_data_tilde_creative_id`, `body_last_attributed_touch_data_tilde_ad_set_id`, `body_last_attributed_touch_data_tilde_ad_name`, `body_last_attributed_touch_data_tilde_ad_id`, `body_last_attributed_touch_data_tilde_campaign`, `body_last_attributed_touch_data_tilde_campaign_id`, `body_last_attributed_touch_data_tilde_campaign_name`, `annotation_dollar_3p`, `annotation_conversion_value_mapped_value`, `annotation_conversion_value_revision`, `annotation_campaign_id_mapped_value`, `annotation_campaign_id_revision`, `annotation_source_app_id_mapped_value`, `annotation_source_app_id_revision`, `annotation_customer_event_alias`, `install_activity_touch_data_dollar_meta_is_mobile_data_terms_signed`, `reengagement_activity_touch_data_dollar_meta_is_mobile_data_terms_signed`, `days_from_last_attributed_touch_to_event`, `days_from_last_cta_view_to_event`, `event_data_product_categories`, `event_data_custom_param_1`, `event_data_custom_param_2`, `event_data_custom_param_3`, `first_event_for_user`, `customer_event_alias`.
- `end_date` (string, required) — The end of the interval time range represented as an ISO-8601 complete date.
- `start_date` (string, required) — The start of the interval time range represented as an ISO-8601 complete date.
- `aggregation` (enum) — How to count events toward the final result count. When querying with a data source of "eo_commerce_event", the aggregation may also be specified as "revenue", in which case the counts returned are the sum of revenue from matching events, and not the number of events themselves. One of `unique_count`, `total_count`, `revenue`, `cost`, `cost-in-local-currency`.
- `enable_install_calculation` (boolean) — If true, then Branch will dedupe unattributed installs caused by duplicate events from non-opt-in users coming from paid ads (resulting from [iOS 14.5 privacy changes](https://help.branch.io/marketer-hub/category/ios-14-faqs.md)).
- `filters` (object) — Keys are the same as dimensions. Values are an array of values to match for the dimension. An object defining filters to match or disallow certain values.
- `filters.name` (array of string) — The name of the event, such as "CLICK", "INSTALL", "PURCHASE", or custom event names like "UpdateSettings". Set either by the client (for example, custom events) or automatically server side. See [events](https://help.branch.io/developer-hub/track-branch-events.md#types-of-branch-events) for the Standard Events enum.
- `filters.app_id` (array of string) — Unique identifier for the Branch app of the requested data.
- `filters.app_name` (array of string) — The name of your Branch app.
- `filters.origin` (array of enum) — Whether the event originated with a Branch SDK/API call, or was sent by Segment or mParticle. Set automatically server side. One of `BRANCH`, `SEGMENT`, `MPARTICLE`.
- `filters.timestamp` (array of string) — Unix timestamp in milliseconds for the event. Set automatically server side.
- `filters.deep_linked` (array of enum) — True if the current app or web session resulted in the user being deep linked. Set automatically server side. One of `true`, `false`.
- `filters.from_desktop` (array of enum) — True if the last attributed touch originated on desktop and the user continued through to mobile via Text Me The App. Set automatically server side. One of `true`, `false`.
- `filters.attributed` (array of enum) — Whether the event is attributed. This will always be accompanied by last_attributed_touch_type and last_attributed_touch_data. Set automatically server side. One of `true`, `false`.
- `filters.user_data_os` (array of enum) — Operating system (OS) of the device where the event occurred. Note that robots include web and app robots for easy filtering. Specified by the client. One of `AMAZON_FIRE`, `AMAZON_FIRE_TV`, `ANDROID`, `BADA`, `BEOS`, `BLACKBERRY`, `BSD`, `CENTOS`, `CHROMIUM_OS`, `DEBIAN`, `DRAGONFLY`, `FEDORA`, `FIREFOX_OS`, `FREEBSD`, `GENTOO`, `GNU`, `IOS`, `JOLI`, `KUBUNTU`, `LINUX`, `MAC_OS`, `MANDRIVA`, `MEEGO`, `MINT`, `NETBSD`, `NINTENDO`, `OPENBSD`, `OS_2`, `OTHER`, `PLAYSTATION`, `RIM_TABLET_OS`, `ROBOTS`, `SAILFISH`, `SLACKWARE`, `SOLARIS`, `SUSE`, `SYMBIAN`, `TIZEN`, `TVOS`, `UBUNTU`, `UNIX`, `WINDOWS`, `WINDOWS_PHONE`, `ZENWALK`, `ROKU`, `SAMSUNG`, `ANDROID_TV`, `LG`, `PANASONIC`.
- `filters.user_data_language` (array of string) — Language specified in the user_agent string (or, in some cases, other headers). Specified by the client.
- `filters.user_data_platform` (array of string) — Convenience dimension that lets you easily see web versus app, desktop versus mobile, and iOS versus Android versus other. Derived from information specified by the client.
- `filters.user_data_environment` (array of enum) — Runtime environment where the event occurred, which can distinguish between, for example, full app and instant app. Specified by the client. One of `FULL_WEB`, `FULL_APP`, `IMESSAGE_APP`, `INSTANT_APP`, `TV_WEB`, `TV_APP`, `APP_CLIP`.
- `filters.user_data_geo_dma_code` (array of string) — DMA code, derived from IP address. https://support.google.com/richmedia/answer/2745487?hl=en. Set automatically server side.
- `filters.user_data_geo_country_code` (array of string) — Country code, derived from IP address. Set automatically server side.
- `filters.user_data_country` (array of string) — Country, derived from user agent string or request body field. Specified by the client.
- `filters.user_data_cpp_level` (array of string) — Consumer Protection Preference level.
- `filters.user_data_geo_region_en` (array of string) — Human-readable region, derived from IP address. Set automatically server side.
- `filters.user_data_opted_in` (array of enum) — Boolean for whether the second OPEN can be inferred as INSTALL after opt-in. If set, the event can be considered as our synthetic OPEN generated by api-open by inspecting incoming event parameters with persona data. If the event isn't considered as the second OPEN, the flag isn't present. Only available for iOS 14.5 or higher. One of `true`, `false`.
- `filters.user_data_opted_in_status` (array of string) — Current authorization status of the opt-in flag for iOS 14.5 or higher traffic. The flag is sent directly from the SDK.
- `filters.last_attributed_touch_type` (array of enum) — Whether the last attributed touch was an impression, a click, or a web-to-app auto redirect. Set automatically server side. One of `CLICK`, `WEB_TO_APP_AUTO_REDIRECT`, `IMPRESSION`.
- `filters.last_attributed_touch_data_tilde_campaign` (array of string) — Campaign (name) specified for the last attributed touch. Can be specified on links by the client, or prefilled automatically server side in some cases.
- `filters.last_attributed_touch_data_tilde_campaign_id` (array of string) — Campaign ID specified for the last attributed touch. Set automatically server side.
- `filters.last_attributed_touch_data_tilde_channel` (array of string) — Channel specified for the last attributed touch. Can be specified on links by the client, or prefilled automatically server side in some cases.
- `filters.last_attributed_touch_data_tilde_feature` (array of string) — Feature specified for the last attributed touch. Can be specified on links by the client, or prefilled automatically server side in some cases.
- `filters.last_attributed_touch_data_tilde_stage` (array of string) — Stage specified for the last attributed touch. Can be specified on links by the client, or prefilled automatically server side in some cases.
- `filters.last_attributed_touch_data_tilde_tags` (array of string) — Tags specified for the last attributed touch. Can be specified on links by the client, or prefilled automatically server side in some cases.
- `filters.last_attributed_touch_data_tilde_advertising_partner_name` (array of string) — Human-readable advertising partner name specified for the last attributed touch. Set automatically server side.
- `filters.last_attributed_touch_data_tilde_advertising_partner_id` (array of string) — ID for the advertising partner specified for the last attributed touch. Set automatically server side or specified by the client, for now, specific to partners migrating from TUNE.
- `filters.last_attributed_touch_data_tilde_secondary_publisher` (array of string) — Secondary publisher specified for the last attributed touch. Passed by the ad network.
- `filters.last_attributed_touch_data_tilde_creative_name` (array of string) — Creative name specified for the last attributed touch. Set automatically server side.
- `filters.last_attributed_touch_data_tilde_creative_id` (array of string) — Creative ID specified for the last attributed touch. Set automatically server side.
- `filters.last_attributed_touch_data_tilde_ad_set_name` (array of string) — Ad set name specified for the last attributed touch. Set automatically server side.
- `filters.last_attributed_touch_data_tilde_ad_set_id` (array of string) — Ad set ID specified for the last attributed touch. Set automatically server side.
- `filters.last_attributed_touch_data_tilde_ad_name` (array of string) — Ad name specified for the last attributed touch. Set automatically server side.
- `filters.last_attributed_touch_data_tilde_ad_id` (array of string) — Ad ID specified for the last attributed touch. Set automatically server side.
- `filters.last_attributed_touch_data_tilde_keyword` (array of string) — Keyword specified for the last attributed touch. Set automatically server side.
- `filters.last_attributed_touch_data_tilde_keyword_id` (array of string) — Keyword ID for the last attributed touch. Set automatically server side.
- `filters.last_attributed_touch_data_tilde_placement` (array of string) — Placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on in display campaigns.
- `filters.last_attributed_touch_data_tilde_agency` (array of string) — Agency of the last touch, as set with an analytics tag. The agency that runs ad campaigns on behalf of the advertiser.
- `filters.last_attributed_touch_data_tilde_agency_id` (array of string) — ID of the agency of the last touch, as set with an analytics tag. The agency that runs ad campaigns on behalf of the advertiser.
- `filters.last_attributed_touch_data_tilde_customer_secondary_publisher` (array of string) — Customer secondary publisher.
- `filters.last_attributed_touch_data_tilde_customer_ad_set_name` (array of string) — Customer ad set name.
- `filters.last_attributed_touch_data_tilde_customer_ad_name` (array of string) — Customer ad name.
- `filters.last_attributed_touch_data_tilde_customer_keyword` (array of string) — Customer keyword.
- `filters.last_attributed_touch_data_tilde_customer_placement` (array of string) — Customer placement.
- `filters.last_attributed_touch_data_tilde_customer_sub_site_name` (array of string) — Customer sub site name.
- `filters.last_attributed_touch_data_tilde_customer_campaign` (array of string) — Customer campaign.
- `filters.last_attributed_touch_data_dollar_marketing_title` (array of string) — Marketing title of the Branch Link.
- `filters.last_attributed_touch_data_dollar_meta_is_mobile_data_terms_signed` (boolean) — Whether the Meta mobile data terms have been signed for the last attributed touch. When true, Meta doesn't require Branch to scrub Meta-related data from this attribution record.
- `filters.last_attributed_touch_data_dollar_3p` (array of string) — The third party that was part of the last touch.
- `filters.last_attributed_touch_data_plus_current_feature` (array of enum) — Branch feature (determined by Branch) of the current touch. Set automatically server side. One of `EMAIL`, `ADS`, `DESKTOP_JOURNEYS`, `MOBILE_JOURNEYS`, `DESKTOP_DEEPVIEWS`, `MOBILE_DEEPVIEWS`, `SOCIAL`, `QUICK_LINKS`, `APP_CLIP`.
- `filters.last_attributed_touch_data_plus_via_features` (array of enum) — All Branch features (determined by Branch) that were determined, via attribution, to have led to this event. For example, if an email link click leads to a Journey that leads to the app, the published eo_open will have +via_features: [EMAIL, JOURNEYS]. Set automatically server side. One of `EMAIL`, `ADS`, `DESKTOP_JOURNEYS`, `MOBILE_JOURNEYS`, `DESKTOP_DEEPVIEWS`, `MOBILE_DEEPVIEWS`, `SOCIAL`, `QUICK_LINKS`, `APP_CLIP`.
- `filters.last_attributed_touch_data_plus_web_format` (array of enum) — Set if an event originated with a touch on Google AMP or Facebook Instant Article. Specified by the client. One of `AMP`, `INSTANT_ARTICLES`.
- `filters.last_attributed_touch_data_plus_aggregate_measurement` (boolean) — Aggregate measurement associated with the last attributed touch.
- `filters.last_attributed_touch_data_plus_pam_enabled` (boolean) — Whether PAM was enabled for the last attributed touch.
- `filters.last_attributed_touch_data_tilde_journey_id` (array of string) — Audience rule ID for a Journey. Set automatically server side.
- `filters.last_attributed_touch_data_tilde_view_name` (array of string) — "View Name" or "title" for a Branch view/template. Can be specified on links by the client, or prefilled automatically server side in some cases.
- `filters.last_attributed_touch_data_tilde_view_id` (array of string) — Branch View ID for a Journey. Set automatically server side.
- `filters.last_cta_view_data_tilde_campaign` (array of string) — Campaign (name) specified for the last Branch CTA view. Can be specified on links by the client, or prefilled automatically server side in some cases.
- `filters.last_cta_view_data_tilde_campaign_id` (array of string) — Campaign ID specified for the last Branch CTA view. Set automatically server side.
- `filters.last_cta_view_data_tilde_channel` (array of string) — Channel specified for the last Branch CTA view. Can be specified on links by the client, or prefilled automatically server side in some cases.
- `filters.last_cta_view_data_tilde_feature` (array of string) — Feature specified for the last Branch CTA view. Can be specified on links by the client, or prefilled automatically server side in some cases.
- `filters.last_cta_view_data_tilde_stage` (array of string) — Stage specified for the last Branch CTA view. Can be specified on links by the client, or prefilled automatically server side in some cases.
- `filters.last_cta_view_data_tilde_tags` (array of string) — Tags specified for the last Branch CTA view. Can be specified on links by the client, or prefilled automatically server side in some cases.
- `filters.last_cta_view_data_tilde_advertising_partner_name` (array of string) — Human-readable advertising partner name specified for the last Branch CTA view. Set automatically server side.
- `filters.last_cta_view_data_tilde_secondary_publisher` (array of string) — Secondary publisher specified for the last Branch CTA view. Passed by the ad network.
- `filters.last_cta_view_data_tilde_creative_name` (array of string) — Creative name specified for the last Branch CTA view. Set automatically server side.
- `filters.last_cta_view_data_tilde_creative_id` (array of string) — Creative ID specified for the last Branch CTA view. Set automatically server side.
- `filters.last_cta_view_data_tilde_ad_set_name` (array of string) — Ad set name specified for the last Branch CTA view. Set automatically server side.
- `filters.last_cta_view_data_tilde_ad_set_id` (array of string) — Ad set ID specified for the last Branch CTA view. Set automatically server side.
- `filters.last_cta_view_data_tilde_ad_name` (array of string) — Ad name specified for the last Branch CTA view. Set automatically server side.
- `filters.last_cta_view_data_tilde_ad_id` (array of string) — Ad ID specified for the last Branch CTA view. Set automatically server side.
- `filters.last_cta_view_data_plus_via_features` (array of enum) — All Branch features (determined by Branch) that were determined, via attribution, to have led to this event. For example, if an email link click leads to a Journeys CTA view, the published eo_branch_cta_view will have +via_features: [EMAIL, JOURNEYS]. Set automatically server side. One of `EMAIL`, `ADS`, `DESKTOP`, `JOURNEYS`, `MOBILE_JOURNEYS`, `DESKTOP_DEEPVIEWS`, `MOBILE_DEEPVIEWS`, `SOCIAL`, `QUICK_LINKS`.
- `filters.last_cta_view_data_dollar_3p` (array of string) — Advertising partner shortcode (for example, e_rs) specified for the last Branch CTA view. Specified by the client.
- `filters.last_cta_view_data_dollar_meta_is_mobile_data_terms_signed` (boolean) — Whether the Meta mobile data terms have been signed for the last CTA view touch. When true, Meta doesn't require Branch to scrub Meta-related data from this CTA view record.
- `filters.last_cta_view_data_plus_web_format` (array of string) — Set if an event originated with a Branch CTA view on Google AMP or Facebook Instant Article. Specified by the client.
- `filters.install_activity_touch_data_dollar_meta_is_mobile_data_terms_signed` (boolean) — Whether the Meta mobile data terms have been signed for the install touch. When true, Meta doesn't require Branch to scrub Meta-related data from this record.
- `filters.reengagement_activity_touch_data_dollar_meta_is_mobile_data_terms_signed` (boolean) — Whether the Meta mobile data terms have been signed for the reengagement touch. When true, Meta doesn't require Branch to scrub Meta-related data from this reengagement record.
- `filters.body_ad_network_id` (array of string) — SKAdNetwork ad network ID. Set server side.
- `filters.body_campaign_id` (array of string) — SKAdNetwork campaign ID. Set server side.
- `filters.body_app_id` (array of string) — SKAdNetwork app ID. Set server side.
- `filters.body_redownload` (array of string) — SKAdNetwork redownload status. Set server side.
- `filters.body_source_app_id` (array of string) — SKAdNetwork source app ID. Set server side.
- `filters.body_conversion_value` (array of string) — SKAdNetwork conversion value. Set server side.
- `filters.body_last_attributed_touch_data_tilde_creative_name` (array of string) — SKAdNetwork LATD creative name. Set server side.
- `filters.body_last_attributed_touch_data_tilde_ad_set_name` (array of string) — SKAdNetwork LATD ad set name. Set server side.
- `filters.body_last_attributed_touch_data_tilde_creative_id` (array of string) — SKAdNetwork LATD creative ID. Set server side.
- `filters.body_last_attributed_touch_data_tilde_ad_set_id` (array of string) — SKAdNetwork LATD ad set ID. Set server side.
- `filters.body_last_attributed_touch_data_tilde_ad_name` (array of string) — SKAdNetwork LATD ad name. Set server side.
- `filters.body_last_attributed_touch_data_tilde_ad_id` (array of string) — SKAdNetwork LATD ad ID. Set server side.
- `filters.body_last_attributed_touch_data_tilde_campaign_id` (array of string) — SKAdNetwork LATD campaign ID. Set server side.
- `filters.body_last_attributed_touch_data_tilde_campaign_name` (array of string) — SKAdNetwork LATD campaign name. Set server side.
- `filters.body_last_attributed_touch_data_tilde_campaign` (array of string) — SKAdNetwork LATD campaign. Set server side.
- `filters.annotation_dollar_3p` (array of string) — SKAdNetwork annotation 3p shortcode. Set server side.
- `filters.annotation_conversion_value_mapped_value` (array of string) — SKAdNetwork annotation conversion value mapped value. Set server side.
- `filters.annotation_conversion_value_revision` (array of string) — SKAdNetwork annotation conversion value revision. Set server side.
- `filters.annotation_campaign_id_mapped_value` (array of string) — SKAdNetwork annotation campaign ID mapped value. Set server side.
- `filters.annotation_campaign_id_revision` (array of string) — SKAdNetwork annotation campaign ID revision. Set server side.
- `filters.annotation_source_app_id_mapped_value` (array of string) — SKAdNetwork annotation source app ID mapped value. Set server side.
- `filters.annotation_source_app_id_revision` (array of string) — SKAdNetwork annotation source app ID. Set server side.
- `filters.annotation_customer_event_alias` (array of string) — SKAdNetwork annotation customer event alias. Set server side.
- `filters.days_from_last_attributed_touch_to_event` (array of string) — Number of days between when the last touch occurred and when this event subsequently occurred. Set automatically server side.
- `filters.days_from_last_cta_view_to_event` (array of string) — Number of days between when the last Branch CTA view occurred and when this event subsequently occurred. Set automatically server side.
- `filters.event_data_product_categories` (array of enum) — Iterate over content_items and aggregate the `category` from each product. Specified by the client. One of `ANIMALS_AND_PET_SUPPLIES`, `APPAREL_AND_ACCESSORIES`, `ARTS_AND_ENTERTAINMENT`, `BABY_AND_TODDLER`, `BUSINESS_AND_INDUSTRIAL`, `CAMERAS_AND_OPTICS`, `ELECTRONICS`, `FOOD_BEVERAGES_AND_TOBACCO`, `FURNITURE`, `HARDWARE`, `HEALTH_AND_BEAUTY`, `HOME_AND_GARDEN`, `LUGGAGE_AND_BAGS`, `MATURE`, `MEDIA`, `OFFICE_SUPPLIES`, `RELIGIOUS_AND_CEREMONIAL`, `SOFTWARE`, `SPORTING_GOODS`, `TOYS_AND_GAMES`, `VEHICLES_AND_PARTS`.
- `filters.first_event_for_user` (array of enum) — Whether this is the first time for this persona that this event has been triggered. Set automatically server side. One of `true`, `false`.
- `filters.customer_event_alias` (array of string) — You can specify that an event of type "purchase" should have the name "buy20tokens". customer_event_alias captures this name, which is additional information. For most events, this is likely unnecessary.
- `format` (enum, query) — Format of the returned data: json or csv. One of `csv`, `json`.
- `granularity` (enum) — The time granularity that each band value will represent. One of `day`, `week`, `month`.
- `limit` (integer, query) — The maximum number of results to return.

### Responses

- `200` — Status of aggregate export.
- `400` — Bad request—typically an invalid or missing credential or parameter.
- `429` — Rate limit exceeded—reduce request frequency and retry.
- `500` — Internal server error.

### Returns

Status of aggregate export. Returns `400`, `429`, and `500` on failure — see the response panel for the error shape.

### Example request

```bash
curl 'https://api2.branch.io/v2/analytics?app_id=%3Capp_id%3E' \
  --request POST \
  --header 'Access-Token: <Access-Token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "start_date": "2023-05-15",
    "end_date": "2023-05-16",
    "data_source": "eo_install",
    "dimensions": [
      "user_data_os"
    ],
    "granularity": "day",
    "aggregation": "total_count",
    "filters": {
      "attributed": "true",
      "user_data_os": [
        "IOS",
        "ANDROID"
      ]
    }
  }'
```

### Example responses

`200`

```json
{
  "code": 200,
  "job_id": "XXXX-0000-xxxx",
  "status_url": "https://api2.branch.io/v2/analytics/a1b2c3d4"
}
```

`400`

```json
{
  "error": {
    "message": "Authentication failed.",
    "code": 400
  }
}
```

`429`

```json
{
  "error": {
    "code": 429,
    "message": "Rate limit reached."
  }
}
```

`500`

```json
{
  "error": {
    "message": "Our product is failing to serve your request at this moment. Please try again later.",
    "code": 500
  }
}
```
