---
title: "POST /provisioning-templates"
method: POST
path: "/provisioning-templates"
---

# POST /provisioning-templates

`POST /provisioning-templates`

Creates a provisioning template.

Requires permission to access the [CreateProvisioningTemplate](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Request body

- object
  - `templateName` string, required — The name of the provisioning template.
  - `description` string — The description of the provisioning template.
  - `templateBody` string, required — The JSON formatted contents of the provisioning template.
  - `enabled` boolean — True to enable the provisioning template, otherwise false.
  - `provisioningRoleArn` string, required — The role ARN for the role associated with the provisioning template. This IoT role grants permission to provision a device.
  - `preProvisioningHook` object — Structure that contains <code>payloadVersion</code> and <code>targetArn</code>.
    - `payloadVersion` string — <p>The payload that was sent to the target function.</p> <p> <i>Note:</i> Only Lambda functions are currently supported.</p>
    - `targetArn` string — <p>The ARN of the target function.</p> <p> <i>Note:</i> Only Lambda functions are currently supported.</p>
  - `tags` Tag[] — <p>Metadata which can be used to manage the provisioning template.</p> <note> <p>For URI Request parameters use format: ...key1=value1&amp;key2=value2...</p> <p>For the CLI command-line parameter use format: &amp;&amp;tags "key1=value1&amp;key2=value2..."</p> <p>For the cli-input-json file use format: "tags": "key1=value1&amp;key2=value2..."</p> </note>
    - `Key` string, required — The tag's key.
    - `Value` string — The tag's value.
  - `type` 'FLEET_PROVISIONING' | 'JITP' — The type you define in a provisioning template. You can create a template with only one type. You can't change the template type after its creation. The default value is <code>FLEET_PROVISIONING</code>. For more information about provisioning template, see: <a href="https://docs.aws.amazon.com/iot/latest/developerguide/provision-template.html">Provisioning template</a>.

## Response `200`

Success

- CreateProvisioningTemplateResponse
  - `templateArn` string — The ARN that identifies the provisioning template.
  - `templateName` string — The name of the provisioning template.
  - `defaultVersionId` integer — The default version of the provisioning template.

## Other responses

- `480` — InternalFailureException
- `481` — InvalidRequestException
- `482` — LimitExceededException
- `483` — ThrottlingException
- `484` — UnauthorizedException
- `485` — ResourceAlreadyExistsException

---

[API](https://skmtc.net/aws/apis/iot.md) · [All operations](https://skmtc.net/aws/apis/iot/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/iot/versions/deef5c4b09f0/schema)
