Join the Webstudio community

Updated 3 weeks ago

Does Webstudio have an API?

I was wondering whether the cloud-hosted version of Webstudio (Pro) has an API that would allow us to do things like create or edit a site remotely? The use-case I have in mind is asking a visitor in my website a series of questions, and based on the answers have a single-page website automatically created in Webstudio...
O
I
12 comments
not yet, also you are thinking of generating with AI and publishing, publishing and generating would take time, can't do this yet in real-time as user visits your site
do you have any examples of anyone already doing it?
Thanks for the quick reply! The use-case I'm thinking about is as follows: we create a 'template' single-page website for a niche market β€” eg., 'dentists', or 'business coaches'. Using Webstudio, we can make the template easily adaptable by using CSS and data variables. We could then do an email campaign that would invite our target audience to come over to our site, answer a few questions, which would then duplicate our 'template' site and populate the variables for us. Of course, further customisation might be possible β€” eg. adding/removing pages and sections, replacing fonts and media assets, etc. β€” depending on the capabilities of the API.

There are some website builder platforms that are starting to focus on this kind of capability: https://blog.duda.co/instant-sites
Got it, this is probably already poossible
Only thing that is not possible rn I can think of is programmatic domain adding, but not sure that's even needed, your goal is to show a personalized site to the user, not publish a new site for them
Here is the route that comes into my mind:

  1. You show somewhere questions to get the personalization data, submit it to your backend
  2. Backend generates all required content and stores it under id 123456
  3. You set the url to https://yourwebsite.com?page=123456
  4. You define a resource for fetching content that goes to the same backend and provides that page id
  5. Now with all the personalized content, you bind images, text and even styles to according to that data - you got a fully personalized site
After that you probably want to show the user a button to claim that site or something
Yes, that sounds like what I'd like to do. But what happens when they click the 'Claim Site' button?... I'd like to be able to automate the project/site generation, so it doesn't have to be done manually for every site.
cloning the template and providing that backend data by default without the page id or something
I guess this would need a public api, right now it exists but for builder only, not documented for public
I also doubt connecting a custom domain is easy to automate without having a a specific domain registrar etc
cloning, publishing and getting domain settings all via api wouldn't be a big problem though
Add a reply
Sign up and join the conversation on Discord