I’m currently working with the Webflow CMS API to publish items in a collection. I’m able to successfully publish the default localization (English), but I’m running into issues when trying to publish the secondary localization (Spanish) via the API.
I’ve reviewed the documentation thoroughly but couldn’t find any clear guidance on how to publish localized versions beyond the default. Is there a supported method or workaround for publishing non-default localizations through the API?
Any help or pointers would be greatly appreciated!
Hi @Sai_harish, sorry you’re having issues with localized item publishing!
A few questions/notes:
Can you confirm in the CMS UI in Webflow that you see that particular CMS item has a English and Spanish variant? The APIs support publishing to secondary locales if the item was created in both the primary and secondary locales set up for your site, but the APIs currently do not support adding a secondary locale variant to a CMS item if the item. This typically occurs when an item was created before the target secondary locale was configured for the site. This is on our backlog to address.
If you confirmed the item does indeed have a secondary locale variant, then you can use the Publish Item API with the “Item IDs with Locales” request payload. That might look something like: