Hi Enam,
Thank you for reaching out. It is required to specify the domain while setting up campaigns to create dynamic search ads with the API, said that, you cannot remove the domain in dynamic search ads. Let us know if you need any additional information.
Regards,
Nikisha Patel, Google Ads API Team
Hi Walter,
When you are creating a campaign that is going to be used for Dynamic Search Ads, you set up a campaign like normal campaigns using CampaignService, however, you specify the domain name for the campaign using DynamicSearchAdsSetting that tell Google Ads that you're going to use DSAs with your campaign which is a required attribute and cannot be removed later. For any campaigns that are not going to be used for DSAs, this attribute is not required and need no set up. Please refer to this code sample for adding campaigns via API. Also, you might find the campaign object useful for understanding the fields that needs to be populated for creating campaigns without DSAs. Let us know if this clarifies your concerns.
Regards,
Nikisha Patel, Google Ads API Team