---
title: "Import a new template document"
method: POST
path: "/automation-studio/templates/import"
tags: ["Automation Studio"]
---

# Import a new template document

`POST /automation-studio/templates/import`

## Request

- Base URL: `https://example.itential.io`
- URL: `https://example.itential.io/automation-studio/templates/import`
- Auth: none declared

Imports a new template document.

## Request body

- object
  - `templates` AutomationStudioTemplateImport[]: Array of template documents to import. If '_id' is provided, it will be replaced with an autogenerated '_id'. If a template's name is already used in the templates collection, it will be renamed with a numeric suffix.
    - `_id` string, required: Unique identifier of the automation
    - `name` string, required
    - `projectId` string, nullable
    - `group` string
    - `device` string
    - `command` string, required
    - `description` string
    - `template` string, required
    - `data` string
    - `text` string
    - `type` 'textfsm' | 'jinja2', required
    - `createdBy` string: Unique identifier of the automation
    - `created` string, date-time
    - `lastModifiedBy` string: Unique identifier of the automation
    - `lastUpdated` string, date-time
    - `version` number, double
    - `tags` AutomationStudioTemplateImportTagsItems[]
      - `_id` string: Unique identifier of the automation
      - `name` string: user-given, unique string to ID tag

## Response `200`

Results from each individual import operation.

- AutomationStudioImportTemplatesResponse200
  - `imported` AutomationStudioTemplatesImportPostResponsesContentApplicationJsonSchemaImportedItems[]
    - `success` boolean: Status flag denoting the success (true) or failure (false) of the template's import operation.
    - `message` string, required: Message containing either confirmation of the import operation or the reason for the failure of the import operation.
    - `original` AutomationStudioTemplateImport, required: Data to import as a new template document.
      - `_id` string, required: Unique identifier of the automation
      - `name` string, required
      - `projectId` string, nullable
      - `group` string
      - `device` string
      - `command` string, required
      - `description` string
      - `template` string, required
      - `data` string
      - `text` string
      - `type` 'textfsm' | 'jinja2', required
      - `createdBy` string: Unique identifier of the automation
      - `created` string, date-time
      - `lastModifiedBy` string: Unique identifier of the automation
      - `lastUpdated` string, date-time
      - `version` number, double
      - `tags` AutomationStudioTemplateImportTagsItems[]
        - `_id` string: Unique identifier of the automation
        - `name` string: user-given, unique string to ID tag
    - `created` AutomationStudioTemplate, required: An entity representing a data template.
      - `_id` string: Unique identifier of the automation
      - `namespace` AutomationStudioTemplateNamespace
        - `type` unknown, required
        - `_id` AutomationStudioTemplateNamespaceId, required: A MongoDB ObjectId
        - `name` string, required
      - `name` string, required
      - `group` string, required
      - `command` string, required
      - `description` string, required
      - `template` string, required
      - `data` string, required
      - `type` 'textfsm' | 'jinja2', required
      - `createdBy` string: Unique identifier of the automation
      - `created` string, date-time
      - `lastUpdatedBy` string: Unique identifier of the automation
      - `lastUpdated` string, date-time
      - `version` number, double
      - `tags` AutomationStudioTemplateTagsItems[]
        - `_id` string: Unique identifier of the automation
        - `name` string: user-given, unique string to ID tag
    - `edit` string, nullable, required: URI to the edit page for the imported template.

## Other responses

- `500`: Error response from API

## Changes

- **2026-10-31** `2095cc90e583`: 2 info
  - api tag `Automation Studio` added
  - api tag `automationStudio` removed

[Operation history](https://skmtc.dev/itential/apis/itential-2/changes/automation-studio/templates/import/post.md)

---

[API](https://skmtc.dev/itential/apis/itential-2.md) - [All operations](https://skmtc.dev/itential/apis/itential-2/llms.txt) - [OpenAPI document](https://skmtc.dev/itential/apis/itential-2/revisions/2095cc90e583?raw)
