Skip to main content

Create project from a public template

To give you an idea of how the Content API works in conjunction with templates we will create a project based on this public template.

API Key​

To run this example you need to create an API key with the scope createProject.

Request​

After you have your API key you can run this request:

curl -X POST \
-H "x-vev-key: [your-key]" \
-H "Content-Type: application/json" \
-d '{"pages":[{"data":[{"_type":"hero","header":"That\'s some nice mountains!"},{"_type":"body","text":"This is some text"},{"_type":"body","text":"This is some other text in the same section type"}]}]}' \
https://api.vev.design/project/create-from-template/1Yhf33L1XR

Response​

In the response you will get the project URL that you can open to see your project.

{
"projectKey": "generated_project_id",
"url": "https://editor.vev.design/edit/<project_id>/<page_id>",
"createdOrUpdatedPages": {
"<project_id>": "<page_id>"
},
"response": {
"id": "<generated_project_id>",
"pages": [
{
"id": "<generated_page_id>",
...
}
],
}
}