Skip to main content
Solved

Is audience a list or segment?

  • June 28, 2023
  • 1 reply
  • 124 views

Forum|alt.badge.img+2

Hey all,

I’m using the get campaign API, and I’m reading the audiences include/exclude:

      "audiences": {
        "included": [
          "Y6nRLr"
        ],
        "excluded": [
          "UTd5ui"
        ]
      },

 

My problem is I don’t know if the ID is of a list or a segments, so for each ID I first have to try list API, and if it fails I move to segment API. 

Is there any smarter way?

Best answer by Brian Turcotte

Hi @matanper!

 

While there’s currently no way to achieve what you’re asking directly through the API, our product team is aware that it would be helpful for more detail to be included in the included/excluded audiences in the response. I will update the thread if there are any changes to this functionality in the future, but for now your current method is an appropriate workaround.

 

Best,

Brian

1 reply

Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • June 28, 2023

Hi @matanper!

 

While there’s currently no way to achieve what you’re asking directly through the API, our product team is aware that it would be helpful for more detail to be included in the included/excluded audiences in the response. I will update the thread if there are any changes to this functionality in the future, but for now your current method is an appropriate workaround.

 

Best,

Brian