Hello Matthieu,
Thank you for reaching out. It is not possible to achieve this via API, you need to implement the language level logic on your end for this functionality. Let us know if you need any additional API related information.
Regards,
Nikisha Patel, Google Ads API Team