---
title: "Publish a new device template. Default views will be automatically generated for new device templates created this way."
method: PUT
path: "/deviceTemplates/{deviceTemplateId}"
---

# Publish a new device template. Default views will be automatically generated for new device templates created this way.

`PUT /deviceTemplates/{deviceTemplateId}`

## Path parameters

- `deviceTemplateId` string, required

## Query parameters

- `api-version` string, required

## Request body

- DeviceTemplate — The device template definition.
  - `@id` string — Unique ID of the device template.
  - `@type` string[], required — The JSON-LD types of this device template.
  - `etag` string — ETag used to prevent conflict in device template updates.
  - `displayName` string — Display name of the device template.
  - `description` string — Detailed description of the device template.
  - `capabilityModel` object, required — The capability model utilized by this device template.

## Response `200`

Success

- DeviceTemplate — The device template definition.
  - `@id` string — Unique ID of the device template.
  - `@type` string[], required — The JSON-LD types of this device template.
  - `etag` string — ETag used to prevent conflict in device template updates.
  - `displayName` string — Display name of the device template.
  - `description` string — Detailed description of the device template.
  - `capabilityModel` object, required — The capability model utilized by this device template.

## Other responses

- `default` — An error response received from the IoT Central Service.

---

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