The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.
Marketing Event
Marketing events represent actions taken by your app, on behalf of the merchant, to market products, collections, discounts, pages, blog posts, and other features. These actions target multiple potential customers, rather than specific individuals. For example, you should model your marketing event at the email campaign level, rather than on a per-email basis.
Merchants get value from marketing events because they help them understand sales and traffic attribution. Implementing marketing events for your app is beneficial because it enables Shopify to surface your app in the Shopify admin in ways that are helpful to merchants. Examples of marketing events include an ad campaign that drives multiple potential customers to a product page, or an email marketing campaign advertising a discount code.
Marketing events can be created for email campaigns, affiliate links, advertisements, and other common marketing tactics.
Marketing events include the event_type
and marketing_channel
properties that help Shopify to rank your app and surface it in the Shopify admin in ways that are useful to merchants. Traffic and
order attribution for your app is handled by providing UTM parameters with your marketing events.
The same UTM parameters are also used in the links provided in the marketing event.
Engagements can also be added to marketing events to give merchants more insight into how potential customers interact with your marketing events. For example, engagements for ad campaigns can include clicks, shares, and comments. Creating engagements is optional, and not all marketing events include engagements.
Endpoints
- post/admin/api/latest/marketing_
events. json Creates a marketing event - post/admin/api/latest/marketing_
events/{marketing_ event_ id}/engagements. json Creates marketing engagements on a marketing event - get/admin/api/latest/marketing_
events. json Retrieves a list of all marketing events - get/admin/api/latest/marketing_
events/{marketing_ event_ id}. json Retrieves a single marketing event - get/admin/api/latest/marketing_
events/count. json Retrieves a count of all marketing eventsdeprecated - put/admin/api/latest/marketing_
events/{marketing_ event_ id}. json Updates a marketing event - del/admin/api/latest/marketing_
events/{marketing_ event_ id}. json Deletes a marketing event
The MarketingEvent resource
Properties
An optional remote identifier for a marketing event. The remote identifier lets Shopify validate engagement data.
The type of marketing event. Valid values: ad
, post
, message
, retargeting
, transactional
, affiliate
, loyalty
, newsletter
, abandoned_cart
.
If there are values that you’d like to use for event_type that are not in the list above, then please share your request in the Shopify Community APIs and SDKs discussion board providing as much detail as possible. Our approach is to be more structured than using freeform text, but to still allow for categorization of most types of marketing actions.
The channel that your marketing event will use. Valid values: search
, display
, social
, email
, referral
.
Whether the event is paid or organic.
The destination domain of the marketing event. Required if the marketing_channel
is set to search
or social
.
The budget of the ad campaign.
The currency for the budget. Required if budget
is specified.
The type of the budget. Required if budget
is specified. Valid values: daily
, lifetime
.'
The time when the marketing action was started.
For events with a duration, the time when the event was scheduled to end.
For events with a duration, the time when the event actually ended.
The UTM parameters used in the links provided in the marketing event. Values must be unique and should not be url-encoded.
To do traffic or order attribution you must at least define utm_campaign
, utm_source
, and utm_medium
.
The MarketingEvent resource
Anchor to POST request, Creates a marketing eventpostCreates a marketing event
marketing_events
access scope.Marketing events can be created to track ad campaigns that target a specific time of year. For example, a marketing event can be created to track a Facebook ad campaign
for Christmas 2022. When creating the marketing event, the body of the request includes the UTM parameters that must be included in the links provided in the marketing event.
Each marketing event also includes the event_type
and marketing_channel
properties that help Shopify to rank your app and surface it within
Shopify admin.
After a marketing event is created in Shopify, you can start to drive traffic to Shopify. Make sure that the links for the marketing event contain the same UTM parameters that were defined in the marketing event. For example, marketing activities for the Christmas 2022 ad campaign would use the following URL convention:
https://storename.com/product?utm_source=facebook&utm_medium=cpc&utm_campaign=Christmas2022-12142018
Create a marketing event
Create a marketing event
Show marketing_event properties
The time when the marketing action was started.
The type of marketing event. Valid values: ad
, post
, message
, retargeting
, transactional
, affiliate
, loyalty
, newsletter
, abandoned_cart
.
If there are values that you’d like to use for event_type that are not in the list above, then please share your request in the Shopify Community APIs and SDKs discussion board providing as much detail as possible. Our approach is to be more structured than using freeform text, but to still allow for categorization of most types of marketing actions.
The destination domain of the marketing event. Required if the marketing_channel
is set to search
or social
.
The channel that your marketing event will use. Valid values: search
, display
, social
, email
, referral
.
Whether the event is paid or organic.
/admin/api/2025-07/marketing_ events. json
Response
Anchor to POST request, Creates marketing engagements on a marketing eventpostCreates marketing engagements on a marketing event
Engagements on marketing events represent customer activity taken on the marketing event before customers reach the shop’s website. Not all types of marketing events will necessarily have engagement, and most types of marketing events will only use a subset of the possible engagement types.
Engagements are aggregated on a daily basis. However, the data can be sent more often than once a day if the information is available. If you create an engagement with the same value for occurred_on
as an existing engagement, then the new engagement will overwrite the previous one.
The date that these engagements occurred on, in the format “YYYY-MM-DD”.
The total ad spend for the day, if the marketing event is a paid ad with a daily spend.
The total number of clicks on the marketing event for the day.
The total number of comments for the day.
The total number of favorites for the day.
The total number of impressions for the day. An impression occurs when the marketing event is served to a customer, either as a email or through a marketing channel.
Whether the engagements are reported as lifetime values rather than daily totals.
The total number of shares for the day.
The total number of views for the day. A view occurs when a customer reads the marketing event that was served to them, for example, if the customer opens the email or spends time looking at a Facebook post.
Add engagements to a marketing engagement
Add engagements to a marketing engagement
/admin/api/2025-07/marketing_ events/998730532/engagements. json
Response
Anchor to GET request, Retrieves a list of all marketing eventsgetRetrieves a list of all marketing events
marketing_events
access scope.Retrieves a list of all marketing events. Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.
The amount of results to return.
The number of marketing events to skip.
Retrieve all marketing events
Retrieve all marketing events
/admin/api/2025-07/marketing_ events. json
Response
Anchor to GET request, Retrieves a single marketing eventgetRetrieves a single marketing event
marketing_events
access scope.Retrieves a single marketing event
Retrieve a single marketing event by its ID
Retrieve a single marketing event by its ID
/admin/api/2025-07/marketing_ events/998730532. json
Response
Anchor to GET request, Retrieves a count of all marketing eventsgetRetrieves a count of all marketing events deprecated
marketing_events
access scope.Retrieves a count of all marketing events
Retrieve a count all marketing events
Retrieve a count all marketing events
/admin/api/2025-07/marketing_ events/count. json
Response
Anchor to PUT request, Updates a marketing eventputUpdates a marketing event
marketing_events
access scope.Updates a marketing event
Update a marketing event. Can modify only timestamps, remote_id, and budget/currency.
Update a marketing event. Can modify only timestamps, remote_id, and budget/currency.
Show marketing_event properties
An optional remote identifier for a marketing event. The remote identifier lets Shopify validate engagement data.
The time when the marketing action was started.
For events with a duration, the time when the event actually ended.
For events with a duration, the time when the event was scheduled to end.
The budget of the ad campaign.
The type of the budget. Required if budget
is specified. Valid values: daily
, lifetime
.'
The currency for the budget. Required if budget
is specified.
The type of marketing event. Valid values: ad
, post
, message
, retargeting
, transactional
, affiliate
, loyalty
, newsletter
, abandoned_cart
.
If there are values that you’d like to use for event_type that are not in the list above, then please share your request in the Shopify Community APIs and SDKs discussion board providing as much detail as possible. Our approach is to be more structured than using freeform text, but to still allow for categorization of most types of marketing actions.
The destination domain of the marketing event. Required if the marketing_channel
is set to search
or social
.
/admin/api/2025-07/marketing_ events/998730532. json
Response
Anchor to DELETE request, Deletes a marketing eventdelDeletes a marketing event
marketing_events
access scope.Deletes a marketing event
Delete a marketing event
Delete a marketing event