Templates

Templates define the structure of your content. They are often used as page templates for a website, but can be applied to any application or format. They consist of various elements such as text fields, rich-text editors, images, videos, and other file types. These templates ensure consistency in content structure across different applications. This modular approach streamlines content creation, enhances flexibility, and reduces redundancy, enabling efficient and consistent structuring of all types of application content.


get

List templates

List all templates in a project

Required attributes

projectId
string
Your projectId

Optional attributes

None
Request
get
/api/projects/:projectId/types
Response

get

Retrieve a template

Retrieves a single template based on the provided template ID

Required attributes

projectId
string
Your project ID
templateId
string
The ID of the template to retrieve

Optional attributes

None
Request
get
/api/projects/:projectId/types/:templateId
Response

post

Create a template

Creates a new template

Required attributes

projectId
string
Your project ID
title
string
The name of the new template

Optional attributes

description
string
A description for the new template
Request
post
/api/projects/:projectId/types
Response

patch

Update a template

Updates attributes and content schema for a template.

Required attributes

projectId
string
Your project ID
templateId
string
The ID of the template to retrieve

Optional attributes

title
string
The name for the template
description
string
A description for the template
items
templateItem[]
An array of template items
Request
patch
/api/projects/:projectId/types/:templateId
Response

delete

Delete a template

Deletes a template from your project. Use this method with caution, deleting a template will also delete all entries associated with the template.

Required attributes

projectId
string
Your project ID
templateId
string
The ID of the template to remove

Optional attributes

None
Request
delete
/api/projects/:projectId/types/:templateId
Response

get

Clone a template

Clones a template in your project based on the provided template ID

Required attributes

projectId
string
Your project ID
templateId
string
The ID of the template to remove

Optional attributes

None
Request
get
/api/projects/:projectId/types/:templateId/clone
Response
Last modified 7/6/2024, 5:26:22 PM