---
title: "Save a template as draft"
method: PUT
path: "/api/v1/templates/draft"
tags: ["Template"]
---

# Save a template as draft

`PUT /api/v1/templates/draft`

Saves a new draft version of an existing template without publishing it. The form must contain the template identifier. The 'theme' field in the form corresponds to the theme folder identifier (referred to as 'themeId' in other endpoints). Returns 404 if the template does not exist.

## Response `200`

Template draft saved successfully

- ResponseEntityTemplateView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` TemplateView
    - `identifier` string
    - `inode` string
    - `categoryId` string
    - `body` string
    - `selectedimage` string
    - `image` string
    - `drawed` boolean
    - `deleted` boolean
    - `live` boolean
    - `locked` boolean
    - `lockedBy` string
    - `working` boolean
    - `hasLiveVersion` boolean
    - `showOnMenu` boolean
    - `drawedBody` string
    - `countAddContainer` integer
    - `countContainers` integer
    - `headCode` string
    - `theme` string
    - `themeName` string
    - `footer` string
    - `friendlyName` string
    - `header` string
    - `modDate` string, date-time
    - `modUser` string
    - `owner` string
    - `name` string
    - `title` string
    - `sortOrder` integer
    - `canRead` boolean
    - `canWrite` boolean
    - `canPublish` boolean
    - `layout` TemplateLayoutView
      - `width` string
      - `title` string
      - `header` boolean
      - `footer` boolean
      - `body` BodyView
        - `rows` TemplateLayoutRowView[]
          - `styleClass` string
          - `columns` TemplateLayoutColumnView[]
            - `containers` ContainerUUID[]
              - …
            - `width` integer
            - `leftOffset` integer
            - `styleClass` string
            - `metadata` object
          - `metadata` object
      - `sidebar` SidebarView
        - `containers` ContainerUUID[]
          - `identifier` string
          - `uuid` string
          - `historyUUIDs` string[]
        - `location` string
        - `width` string
    - `containers` object
    - `themeInfo` ThemeView
      - `path` string
      - `defaultFileType` string
      - `filesMasks` string
      - `getiDate` string, date-time
      - `hostId` string
      - `identifier` string
      - `inode` string
      - `modDate` string, date-time
      - `name` string
      - `showOnMenu` boolean
      - `sortOrder` integer
      - `title` string
      - `type` string
    - `hostName` string
    - `hostId` string
    - `fullTitle` string
    - `htmlTitle` string
    - `new` boolean
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400` — Invalid template data
- `401` — Authentication required
- `404` — Template with the given identifier does not exist

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jostens/dotcms-rest-api/revisions/a088fe9f515c/schema)
