---
title: "Create or update the metadata of a Windows IoT Device Service."
method: PUT
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WindowsIoT/deviceServices/{deviceName}"
tags: ["DeviceServices"]
---

# Create or update the metadata of a Windows IoT Device Service.

`PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WindowsIoT/deviceServices/{deviceName}`

## Request

- Base URL: `https://management.azure.com`
- URL: `https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WindowsIoT/deviceServices/{deviceName}`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Scopes: `user_impersonation`

Create or update the metadata of a Windows IoT Device Service. The usual pattern to modify a property is to retrieve the Windows IoT Device Service metadata and security metadata, and then combine them with the modified values in a new body to update the Windows IoT Device Service.

## Path parameters

- `subscriptionId` string, required
- `resourceGroupName` string, required
- `deviceName` string, required

## Query parameters

- `api-version` string, required

## Headers

- `If-Match` string

## Request body

- DeviceService: The core properties of ARM resources
  - `id` string: Fully qualified resource Id for the resource
  - `name` string: The name of the resource
  - `type` string: The type of the resource.

## Response `200`

OK. The request has succeeded.

- DeviceService: The core properties of ARM resources
  - `id` string: Fully qualified resource Id for the resource
  - `name` string: The name of the resource
  - `type` string: The type of the resource.

## Other responses

- `default`: DefaultErrorResponse

## Changes

- **2026-07-13** (2018-02-16-preview) `70e6fcc2c58a`: 1 breaking
  - removed the success response with the status `201`
- **2026-07-13** (2018-02-16-preview) `152fd9003ee4`: 1 info
  - added the success response with the status `201`

[Operation history](https://skmtc.dev/azure/apis/windowsiot-microsoft-windowsiot-windowsiotservices/changes/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.WindowsIoT/deviceServices/:deviceName/put.md)

---

[API](https://skmtc.dev/azure/apis/windowsiot-microsoft-windowsiot-windowsiotservices.md) - [All operations](https://skmtc.dev/azure/apis/windowsiot-microsoft-windowsiot-windowsiotservices/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/windowsiot-microsoft-windowsiot-windowsiotservices/revisions/70e6fcc2c58a?raw)
