---
title: "Create Template"
method: POST
path: "/operation/automation/templates/{tenant_id}"
tags: ["Automation"]
---

# Create Template

`POST /operation/automation/templates/{tenant_id}`

Creates a new Template under the tenant. However the script will be accessible based on its scope. Global Templates - All user will have access to CoreStack's Marketplace Templates (Can view and execute). Account - All users under that account will have access (Can view and execute). Only Account admins can update/delete. Tenant - Users with access to the specific tenant will have access template (Can view and execute). Tenant admins can update/delete. Private - User who created will only have access.

## Path parameters

- `tenant_id` string, required

## Request body

- CreateTemplateRequest
  - `name` string, required — template name which is unique and does not allow special character or space
  - `description` string — Usage of the template.
  - `content` string, required — The template content
  - `metadata` MetaDataModel
    - `tags` object, required — template tags
  - `status` string — Status of the template [active/inactive]. active:- Templates which can be executed. inactive:- Template which cannot be executed
  - `classification` string[], required — Templates are classified based orchestration actions like Provision, Configure, Backup, Catalog Builder, Deployment, Autoscaling
  - `scope` 'private' | 'account' | 'tenant' — The scope of the template: Account scope - All users under that account will have access to view and execute Only Account admins can update/delete the templates, Tenant Scope - Users with access to the specific tenant will have access to templates who can describe or execute templates. Tenant admins can only update/delete. Private Scope - User who created will only have access
  - `type` string[], required — Type of the template (Cloud, Monitoring, Virtualization)
  - `services` string[], required — Displays the service associated with the template, for example, AWS, AzureRM, Openstack., etc
  - `engine_type` 'cfn' | 'arm' | 'terraform' | 'mistral' | 'heat' | 'oracle' | 'dm', required — Template formats such as AWS CFN, Azure ARM, Openstack Heat and Mistral
  - `blueprint_support` boolean — Flag to add template to blueprints

## Response `201`

Created

- TemplateCreateResponse
  - `template_id` string, required — Unique Id of the template

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

---

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