I’m using the Webflow CMS API to delete items from my CMS.
The items get deleted fine, but it seems that after deleting them I need to republish the site. Am I correct to assume that?
According to the Publish Site section of the API, I need to pass two parameters: site_id and domains.
I got the site_id right, but can’t seem to find the right thing to pass for domains.
I tried to pass my staging domain: mysite.webflow.io but that didn’t work.
When I try to list the domains associated with my site, according to the API docs, I get an empty JSON object.
Hi I had trouble with this myself as well but I figured it out. Make sure you try it on Postman so that you can see that your request is working there first. Use a POST request, add your bearer token in Authorization, set the header for accept-version to 1.0.0, and for the body use raw and pass in the correct JSON object:
You can find the domains on your webflow dashboard. Where you publish your sites manually in the editor, you’ll also be able to see your domains there. Hope this helps