Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Understanding the PaidAudiencesContainer REST service

Updated on August 3, 2022

Paid Media Manager allows you to include the power of Next-Best-Action decisioning into the pixel calls. You can extend the pixel call with a call to the PaidAudiencesContainer web service to determine ad targeting based on the enterprise decisioning and intelligence embedded in Next-Best-Action.

Pega Customer Decision Hub Paid Media Manager User Guide

PaidAudiencesContainer is a REST service that allows callers to retrieve the list of paid media audiences for a customer in one or more paid media destinations.

The service supports the GET HTTP method.

The URL pattern for this service is:


For the GET request, the service expects a JSON Object with the following attributes:

Used to identify individuals based on information captured during their interactions with the destination. For individuals yet to be identified, a unique id is stored in a browser cookie. Once an individual has been identified as a customer, their encrypted customer id is stored. For more information, see Identity management for the Container REST service.
Destination key of the paid media destination. For multiple destinations, comma-separated lists of paid media destination keys are allowed. To check the destination key for a specific destination, in App Studio, click SettingsChannelsPaid MediaWeb. Take note of the value in the Destination key column.
If set to true, this parameter triggers the Next-Best-Action strategy at the top level for the customer. The results of the strategy execution are sent back to the caller. This process also takes into account any paid strategy that is configured at the top-level Paid Media configuration in the Channels tab of Next-Best-Action Designer. The response will contain all the base audiences returned by the Next-Best-Action strategy and paid strategy (if configured).
If set to false, or not included in the request, the response will contain all the audiences in the paid media master records which include base audiences, negative audiences, lookalike audiences, device-based audiences, and all customer next-best-action audiences.
Note: The paid web service is designed for low latency and does not execute Next-Best-Action for the site visitor which would update the individual's NBA Paid Audiences. However, the real-time container can be called separately to do so.

Sample invocation request and response


Response:{"Status":"OK","CustomerID":"101","AudienceData":{"DKa93e1234":{"PaidAudiences":[{"AudienceId":"6e43cf87"},{"AudienceId":"f7fb59b1"},{"AudienceId":"d9d172bb"}],"pxSubscript":" DKa93e1234"}}}

The AudienceId in the responses is generated by Paid Media Manager and associated with an audience generated in the paid destination. You can see the audience ID for each audience in the AUDIENCE KEY field on the Paid Media Audiences landing page.

You can use the audience ID to fire Facebook Ads pixels or Google Ads events for each audience. Because the audience name is the same as the name of a corresponding action in Pega Customer Decision Hub, you may want to avoid exposing the name at the client-side. Because of that, you can use the audience ID instead of the audience name in a browser cookie to keep track of pixels and events which have already been fired for a particular individual. In the network, while creating audiences out of the pixel, get the relevant audience name for the audience ID from the Paid Media landing page and use the same.

  • Previous topic Configuring web-based and DMP connections to paid destinations
  • Next topic Enabling Next-Best-Action targeting on DMP-based destinations

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us