---
title: "Create content template"
method: POST
path: "/wiki/rest/api/template"
tags: ["Template"]
---

# Create content template

`POST /wiki/rest/api/template`

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

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
'Admin' permission for the space to create a space template or 'Confluence Administrator'
global permission to create a global template.

## Request body

- ContentTemplateCreate — This object is used to create content templates.
  - `name` string, required — The name of the new template.
  - `templateType` string, required — The type of the new template. Set to `page`.
  - `body` ContentTemplateBodyCreate, required — 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.
    - `view` ContentBodyCreate — This object is used when creating or updating content.
      - `value` string, required — The body of the content in the relevant format.
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'plain' | 'raw', required — The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.
    - `export_view` ContentBodyCreate — This object is used when creating or updating content.
      - `value` string, required — The body of the content in the relevant format.
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'plain' | 'raw', required — The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.
    - `styled_view` ContentBodyCreate — This object is used when creating or updating content.
      - `value` string, required — The body of the content in the relevant format.
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'plain' | 'raw', required — The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.
    - `storage` ContentBodyCreate — This object is used when creating or updating content.
      - `value` string, required — The body of the content in the relevant format.
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'plain' | 'raw', required — The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.
    - `editor` ContentBodyCreate — This object is used when creating or updating content.
      - `value` string, required — The body of the content in the relevant format.
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'plain' | 'raw', required — The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.
    - `editor2` ContentBodyCreate — This object is used when creating or updating content.
      - `value` string, required — The body of the content in the relevant format.
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'plain' | 'raw', required — The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.
    - `wiki` ContentBodyCreate — This object is used when creating or updating content.
      - `value` string, required — The body of the content in the relevant format.
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'plain' | 'raw', required — The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.
    - `atlas_doc_format` ContentBodyCreate — This object is used when creating or updating content.
      - `value` string, required — The body of the content in the relevant format.
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'plain' | 'raw', required — The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.
    - `anonymous_export_view` ContentBodyCreate — This object is used when creating or updating content.
      - `value` string, required — The body of the content in the relevant format.
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'plain' | 'raw', required — The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.
  - `description` string — A description of the new template.
  - `labels` Label[] — Labels for the new template.
    - `prefix` string, required
    - `name` string, required
    - `id` string, required
    - `label` string, required
  - `space` object, nullable — 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.
    - `key` string, required

## Response `200`

Returned if the template is created.

- ContentTemplate
  - `templateId` string, required
  - `originalTemplate` object
    - `pluginKey` string
    - `moduleKey` string
  - `referencingBlueprint` string
  - `name` string, required
  - `description` string, required
  - `space` object
  - `labels` Label[], required
    - `prefix` string, required
    - `name` string, required
    - `id` string, required
    - `label` string, required
  - `templateType` string, required
  - `editorVersion` string
  - `body` ContentTemplateBody — 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.
    - `view` ContentBody
      - `value` string, required
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'raw', required
      - `embeddedContent` EmbeddedContent[]
        - `entityId` integer
        - `entityType` string
        - `entity` Embeddable
      - `webresource` WebResourceDependencies
        - `_expandable` object
          - `uris` union
            - string
            - object
        - `keys` string[]
        - `contexts` string[]
        - `uris` object
          - `all` union
            - string[]
            - string
          - `css` union
            - string[]
            - string
          - `js` union
            - string[]
            - string
          - `_expandable` object
            - `css` union
              - …
            - `js` union
              - …
        - `tags` object
          - `all` string
          - `css` string
          - `data` string
          - `js` string
          - `_expandable` object
        - `superbatch` SuperBatchWebResources
          - `uris` object
            - `all` union
              - …
            - `css` union
              - …
            - `js` union
              - …
          - `tags` object
            - `all` string
            - `css` string
            - `data` string
            - `js` string
          - `metatags` string
          - `_expandable` object
      - `mediaToken` object
        - `collectionIds` string[]
        - `contentId` string
        - `expiryDateTime` string
        - `fileIds` string[]
        - `token` string
      - `_expandable` object
        - `content` string
        - `embeddedContent` string
        - `webresource` string
        - `mediaToken` string
      - `_links` GenericLinks
    - `export_view` ContentBody
      - `value` string, required
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'raw', required
      - `embeddedContent` EmbeddedContent[]
        - `entityId` integer
        - `entityType` string
        - `entity` Embeddable
      - `webresource` WebResourceDependencies
        - `_expandable` object
          - `uris` union
            - string
            - object
        - `keys` string[]
        - `contexts` string[]
        - `uris` object
          - `all` union
            - string[]
            - string
          - `css` union
            - string[]
            - string
          - `js` union
            - string[]
            - string
          - `_expandable` object
            - `css` union
              - …
            - `js` union
              - …
        - `tags` object
          - `all` string
          - `css` string
          - `data` string
          - `js` string
          - `_expandable` object
        - `superbatch` SuperBatchWebResources
          - `uris` object
            - `all` union
              - …
            - `css` union
              - …
            - `js` union
              - …
          - `tags` object
            - `all` string
            - `css` string
            - `data` string
            - `js` string
          - `metatags` string
          - `_expandable` object
      - `mediaToken` object
        - `collectionIds` string[]
        - `contentId` string
        - `expiryDateTime` string
        - `fileIds` string[]
        - `token` string
      - `_expandable` object
        - `content` string
        - `embeddedContent` string
        - `webresource` string
        - `mediaToken` string
      - `_links` GenericLinks
    - `styled_view` ContentBody
      - `value` string, required
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'raw', required
      - `embeddedContent` EmbeddedContent[]
        - `entityId` integer
        - `entityType` string
        - `entity` Embeddable
      - `webresource` WebResourceDependencies
        - `_expandable` object
          - `uris` union
            - string
            - object
        - `keys` string[]
        - `contexts` string[]
        - `uris` object
          - `all` union
            - string[]
            - string
          - `css` union
            - string[]
            - string
          - `js` union
            - string[]
            - string
          - `_expandable` object
            - `css` union
              - …
            - `js` union
              - …
        - `tags` object
          - `all` string
          - `css` string
          - `data` string
          - `js` string
          - `_expandable` object
        - `superbatch` SuperBatchWebResources
          - `uris` object
            - `all` union
              - …
            - `css` union
              - …
            - `js` union
              - …
          - `tags` object
            - `all` string
            - `css` string
            - `data` string
            - `js` string
          - `metatags` string
          - `_expandable` object
      - `mediaToken` object
        - `collectionIds` string[]
        - `contentId` string
        - `expiryDateTime` string
        - `fileIds` string[]
        - `token` string
      - `_expandable` object
        - `content` string
        - `embeddedContent` string
        - `webresource` string
        - `mediaToken` string
      - `_links` GenericLinks
    - `storage` ContentBody
      - `value` string, required
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'raw', required
      - `embeddedContent` EmbeddedContent[]
        - `entityId` integer
        - `entityType` string
        - `entity` Embeddable
      - `webresource` WebResourceDependencies
        - `_expandable` object
          - `uris` union
            - string
            - object
        - `keys` string[]
        - `contexts` string[]
        - `uris` object
          - `all` union
            - string[]
            - string
          - `css` union
            - string[]
            - string
          - `js` union
            - string[]
            - string
          - `_expandable` object
            - `css` union
              - …
            - `js` union
              - …
        - `tags` object
          - `all` string
          - `css` string
          - `data` string
          - `js` string
          - `_expandable` object
        - `superbatch` SuperBatchWebResources
          - `uris` object
            - `all` union
              - …
            - `css` union
              - …
            - `js` union
              - …
          - `tags` object
            - `all` string
            - `css` string
            - `data` string
            - `js` string
          - `metatags` string
          - `_expandable` object
      - `mediaToken` object
        - `collectionIds` string[]
        - `contentId` string
        - `expiryDateTime` string
        - `fileIds` string[]
        - `token` string
      - `_expandable` object
        - `content` string
        - `embeddedContent` string
        - `webresource` string
        - `mediaToken` string
      - `_links` GenericLinks
    - `editor` ContentBody
      - `value` string, required
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'raw', required
      - `embeddedContent` EmbeddedContent[]
        - `entityId` integer
        - `entityType` string
        - `entity` Embeddable
      - `webresource` WebResourceDependencies
        - `_expandable` object
          - `uris` union
            - string
            - object
        - `keys` string[]
        - `contexts` string[]
        - `uris` object
          - `all` union
            - string[]
            - string
          - `css` union
            - string[]
            - string
          - `js` union
            - string[]
            - string
          - `_expandable` object
            - `css` union
              - …
            - `js` union
              - …
        - `tags` object
          - `all` string
          - `css` string
          - `data` string
          - `js` string
          - `_expandable` object
        - `superbatch` SuperBatchWebResources
          - `uris` object
            - `all` union
              - …
            - `css` union
              - …
            - `js` union
              - …
          - `tags` object
            - `all` string
            - `css` string
            - `data` string
            - `js` string
          - `metatags` string
          - `_expandable` object
      - `mediaToken` object
        - `collectionIds` string[]
        - `contentId` string
        - `expiryDateTime` string
        - `fileIds` string[]
        - `token` string
      - `_expandable` object
        - `content` string
        - `embeddedContent` string
        - `webresource` string
        - `mediaToken` string
      - `_links` GenericLinks
    - `editor2` ContentBody
      - `value` string, required
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'raw', required
      - `embeddedContent` EmbeddedContent[]
        - `entityId` integer
        - `entityType` string
        - `entity` Embeddable
      - `webresource` WebResourceDependencies
        - `_expandable` object
          - `uris` union
            - string
            - object
        - `keys` string[]
        - `contexts` string[]
        - `uris` object
          - `all` union
            - string[]
            - string
          - `css` union
            - string[]
            - string
          - `js` union
            - string[]
            - string
          - `_expandable` object
            - `css` union
              - …
            - `js` union
              - …
        - `tags` object
          - `all` string
          - `css` string
          - `data` string
          - `js` string
          - `_expandable` object
        - `superbatch` SuperBatchWebResources
          - `uris` object
            - `all` union
              - …
            - `css` union
              - …
            - `js` union
              - …
          - `tags` object
            - `all` string
            - `css` string
            - `data` string
            - `js` string
          - `metatags` string
          - `_expandable` object
      - `mediaToken` object
        - `collectionIds` string[]
        - `contentId` string
        - `expiryDateTime` string
        - `fileIds` string[]
        - `token` string
      - `_expandable` object
        - `content` string
        - `embeddedContent` string
        - `webresource` string
        - `mediaToken` string
      - `_links` GenericLinks
    - `wiki` ContentBody
      - `value` string, required
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'raw', required
      - `embeddedContent` EmbeddedContent[]
        - `entityId` integer
        - `entityType` string
        - `entity` Embeddable
      - `webresource` WebResourceDependencies
        - `_expandable` object
          - `uris` union
            - string
            - object
        - `keys` string[]
        - `contexts` string[]
        - `uris` object
          - `all` union
            - string[]
            - string
          - `css` union
            - string[]
            - string
          - `js` union
            - string[]
            - string
          - `_expandable` object
            - `css` union
              - …
            - `js` union
              - …
        - `tags` object
          - `all` string
          - `css` string
          - `data` string
          - `js` string
          - `_expandable` object
        - `superbatch` SuperBatchWebResources
          - `uris` object
            - `all` union
              - …
            - `css` union
              - …
            - `js` union
              - …
          - `tags` object
            - `all` string
            - `css` string
            - `data` string
            - `js` string
          - `metatags` string
          - `_expandable` object
      - `mediaToken` object
        - `collectionIds` string[]
        - `contentId` string
        - `expiryDateTime` string
        - `fileIds` string[]
        - `token` string
      - `_expandable` object
        - `content` string
        - `embeddedContent` string
        - `webresource` string
        - `mediaToken` string
      - `_links` GenericLinks
    - `atlas_doc_format` ContentBody
      - `value` string, required
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'raw', required
      - `embeddedContent` EmbeddedContent[]
        - `entityId` integer
        - `entityType` string
        - `entity` Embeddable
      - `webresource` WebResourceDependencies
        - `_expandable` object
          - `uris` union
            - string
            - object
        - `keys` string[]
        - `contexts` string[]
        - `uris` object
          - `all` union
            - string[]
            - string
          - `css` union
            - string[]
            - string
          - `js` union
            - string[]
            - string
          - `_expandable` object
            - `css` union
              - …
            - `js` union
              - …
        - `tags` object
          - `all` string
          - `css` string
          - `data` string
          - `js` string
          - `_expandable` object
        - `superbatch` SuperBatchWebResources
          - `uris` object
            - `all` union
              - …
            - `css` union
              - …
            - `js` union
              - …
          - `tags` object
            - `all` string
            - `css` string
            - `data` string
            - `js` string
          - `metatags` string
          - `_expandable` object
      - `mediaToken` object
        - `collectionIds` string[]
        - `contentId` string
        - `expiryDateTime` string
        - `fileIds` string[]
        - `token` string
      - `_expandable` object
        - `content` string
        - `embeddedContent` string
        - `webresource` string
        - `mediaToken` string
      - `_links` GenericLinks
    - `anonymous_export_view` ContentBody
      - `value` string, required
      - `representation` 'view' | 'export_view' | 'styled_view' | 'storage' | 'editor' | 'editor2' | 'anonymous_export_view' | 'wiki' | 'atlas_doc_format' | 'raw', required
      - `embeddedContent` EmbeddedContent[]
        - `entityId` integer
        - `entityType` string
        - `entity` Embeddable
      - `webresource` WebResourceDependencies
        - `_expandable` object
          - `uris` union
            - string
            - object
        - `keys` string[]
        - `contexts` string[]
        - `uris` object
          - `all` union
            - string[]
            - string
          - `css` union
            - string[]
            - string
          - `js` union
            - string[]
            - string
          - `_expandable` object
            - `css` union
              - …
            - `js` union
              - …
        - `tags` object
          - `all` string
          - `css` string
          - `data` string
          - `js` string
          - `_expandable` object
        - `superbatch` SuperBatchWebResources
          - `uris` object
            - `all` union
              - …
            - `css` union
              - …
            - `js` union
              - …
          - `tags` object
            - `all` string
            - `css` string
            - `data` string
            - `js` string
          - `metatags` string
          - `_expandable` object
      - `mediaToken` object
        - `collectionIds` string[]
        - `contentId` string
        - `expiryDateTime` string
        - `fileIds` string[]
        - `token` string
      - `_expandable` object
        - `content` string
        - `embeddedContent` string
        - `webresource` string
        - `mediaToken` string
      - `_links` GenericLinks
  - `_expandable` object
    - `body` string
  - `_links` GenericLinks, required

## Other responses

- `400` — Returned if template name is null or an empty string.
- `403` — Returned if the calling user does not have permission to create the template.

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api/revisions/70088490f406/schema)
