POST/templates/create

Create a template

Creates a template that can be used to create pages. Supply a title; optionally include content, description, and icon, or set spaceId to associate the template with a space. Omitting spaceId creates a workspace-wide template, which requires workspace admin rights.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

5 body fields

The template details. title is required; the other fields are optional.

contentobjectoptional
ProseMirror document JSON.
descriptionstringoptional
A description of the template, up to 2,000 characters.
iconstringoptional
The template's icon.
spaceIdstringoptional
Omit to create a workspace-wide template, which requires workspace admin rights.
titlestringrequired
The template title, between 1 and 500 characters.

2 status codes
200Returns the created template object.
dataobjectoptional
statusintegeroptional
successbooleanoptional
403Returned when the request is forbidden or templates are not included in the current licence.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional

Error handling

title is required and must be between 1 and 500 characters; description must not exceed 2,000 characters. Omitting spaceId creates a workspace-wide template, which requires workspace admin rights. A 403 is returned when the request is forbidden or templates are not included in the current licence.