/LESSON 6
Step 4
Create site
Create a site from a template via Duda's API
In this lesson, we’ll walk through how to create a new site using the Duda API based on a template.
To create a site from a template, you’ll need to include the
template_id
in your request. Every template in Duda has a unique ID, and this ID tells the API which template to use when generating the new site.
We'll also take a look at the Site Object, which defines all the data you can include when creating a site. This includes both required and optional fields—like custom content, metadata, or even a predefined site name.
Once the API call is successful, the response body will include a value called
site_name
. This is the site’s unique identifier, and it’s what you’ll use to manage or reference the site moving forward.
API Endpoint
POST https://api.duda.co/api/sites/multiscreen/create
Creates a new site based on a specified template.
Documentation:
Developer Reference – Create Site |
Site Object