POST /wiki/rest/api/template

Creates a new content template. Note, blueprint templates cannot be created via the REST API.

Permissions required: 'Admin' permission for the space to create a space template or 'Confluence Administrator' global permission to create a global template.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
name String Yes

The name of the new template.

space Object No

The key for the space of the new template. Only applies to space templates. If the spaceKey is not specified, the template will be created as a global template.

space.key String Yes
description String No

A description of the new template.

labels[] Array No

Labels for the new template.

labels[].id String Yes
labels[].prefix String Yes
labels[].name String Yes
labels[].label String Yes
body Object Yes

The body of the new content. Does not apply to attachments. Only one body format should be specified as the property for this object, e.g. storage.

Note, editor2 format is used by Atlassian only. anonymous_export_view is the same as export_view format but only content viewable by an anonymous user is included.

body.export_view Object No

This object is used when creating or updating content.

body.export_view.representation String Yes

The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.

Possible values:

  • "editor"
  • "wiki"
  • "atlas_doc_format"
  • "export_view"
  • "storage"
  • "plain"
  • "raw"
  • "view"
  • "styled_view"
  • "editor2"
  • "anonymous_export_view"
body.export_view.value String Yes

The body of the content in the relevant format.

body.styled_view Object No

This object is used when creating or updating content.

body.styled_view.representation String Yes

The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.

Possible values:

  • "editor"
  • "wiki"
  • "atlas_doc_format"
  • "export_view"
  • "storage"
  • "plain"
  • "raw"
  • "view"
  • "styled_view"
  • "editor2"
  • "anonymous_export_view"
body.styled_view.value String Yes

The body of the content in the relevant format.

body.storage Object No

This object is used when creating or updating content.

body.storage.representation String Yes

The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.

Possible values:

  • "editor"
  • "wiki"
  • "atlas_doc_format"
  • "export_view"
  • "storage"
  • "plain"
  • "raw"
  • "view"
  • "styled_view"
  • "editor2"
  • "anonymous_export_view"
body.storage.value String Yes

The body of the content in the relevant format.

body.editor2 Object No

This object is used when creating or updating content.

body.editor2.representation String Yes

The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.

Possible values:

  • "editor"
  • "wiki"
  • "atlas_doc_format"
  • "export_view"
  • "storage"
  • "plain"
  • "raw"
  • "view"
  • "styled_view"
  • "editor2"
  • "anonymous_export_view"
body.editor2.value String Yes

The body of the content in the relevant format.

body.wiki Object No

This object is used when creating or updating content.

body.wiki.representation String Yes

The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.

Possible values:

  • "editor"
  • "wiki"
  • "atlas_doc_format"
  • "export_view"
  • "storage"
  • "plain"
  • "raw"
  • "view"
  • "styled_view"
  • "editor2"
  • "anonymous_export_view"
body.wiki.value String Yes

The body of the content in the relevant format.

body.anonymous_export_view Object No

This object is used when creating or updating content.

body.anonymous_export_view.representation String Yes

The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.

Possible values:

  • "editor"
  • "wiki"
  • "atlas_doc_format"
  • "export_view"
  • "storage"
  • "plain"
  • "raw"
  • "view"
  • "styled_view"
  • "editor2"
  • "anonymous_export_view"
body.anonymous_export_view.value String Yes

The body of the content in the relevant format.

body.atlas_doc_format Object No

This object is used when creating or updating content.

body.atlas_doc_format.representation String Yes

The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.

Possible values:

  • "editor"
  • "wiki"
  • "atlas_doc_format"
  • "export_view"
  • "storage"
  • "plain"
  • "raw"
  • "view"
  • "styled_view"
  • "editor2"
  • "anonymous_export_view"
body.atlas_doc_format.value String Yes

The body of the content in the relevant format.

body.view Object No

This object is used when creating or updating content.

body.view.representation String Yes

The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.

Possible values:

  • "editor"
  • "wiki"
  • "atlas_doc_format"
  • "export_view"
  • "storage"
  • "plain"
  • "raw"
  • "view"
  • "styled_view"
  • "editor2"
  • "anonymous_export_view"
body.view.value String Yes

The body of the content in the relevant format.

body.editor Object No

This object is used when creating or updating content.

body.editor.representation String Yes

The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.

Possible values:

  • "editor"
  • "wiki"
  • "atlas_doc_format"
  • "export_view"
  • "storage"
  • "plain"
  • "raw"
  • "view"
  • "styled_view"
  • "editor2"
  • "anonymous_export_view"
body.editor.value String Yes

The body of the content in the relevant format.

templateType String Yes

The type of the new template. Set to page.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.