Dear community,
When creating an email program, you often define its audience using a smart list.
Clicking on the number of people in the audience section opens a new browser tab with the people in that smart list - the url will look like https://app-nld123.marketo.com/?satellite=1#SL12345A1! . Is there a way to get the smart list id 12345 programmatically, in order to query it for the members? I've tried to get smart lists by program folder ids, but this does not seem to include these "hidden" assets.
Goal: I want to determine audience sizes for several email programs, before the sends happen, in batch and without going into each program manually. (Maybe there's another way?)
Thanks! 🙂
Solved! Go to Solution.
Sorry to butt in, but it’s not hidden and it’s not temporary!
https://{{munchkinId}}.mktorest.com/rest/asset/v1/program/{{programId}}/smartList.json
Exactly what I was looking for for https://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Programs/getS... . Thanks once again! 👍
Hi @lukea
With my believe, you'll not be able to get the system created smart list under a program via api.
Workaround- You can create a Local Smart list under that program and add filters. Then use it in Email Program Smart List like "Member of Smart List- (Your Local Smart List Name)".
Then fetch the local Smart List with the below endpoint:
https://XXX-XXX-XXX.mktorest.com/rest/asset/v1/folder/{id}/content.json?type=Program
Let me know if that works.
Thanks
Thanks. Yup, that's how I currently do it. I hoped there might be a "direct" solution, maybe undocumented. (Also because the setup is not under my full control - some folks set it up in program, not as a separate asset.) I will leave this open for a few days, and "mark as correct" if no other ideas pop up.
AFAIK you're not able to query the system SL as they aren't saved. This is contrary to campaigns, wherein you can query even the background campaigns (along with the user-created campaigns), as unlike the SLs, they stay associated with the program. It's always best to create an SL in the cloneable program template itself.
Understood, I was not aware of the temporary character of these lists. Thanks for clarifying.
Exactly what I was looking for for https://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Programs/getS... . Thanks once again! 👍