Hi Daniel,
Thanks for reaching out. You can manage affinity and in-market audiences using the
CampaignCriterionService. Please see this
campaign and ad group criteria reference page for more information on using CustomAffinityInfo and UserInterestInfo (these are the
criterion you must specify in your campaign criterion operation). For a list of in-market and affinity categories, please see
this page. At the moment, the documentation currently does not have a code sample for managing affinity and in-market audiences, although
there is a sample for using custom audiences, which is the migration from affinity and interest audiences.
Regards,
Matt
Google Ads API Team

ref:_00D1U1174p._5004Q2HLPte:ref