---
title: "PATCH /digitaltwins/{id}"
method: PATCH
path: "/digitaltwins/{id}"
tags: ["Twins"]
---

# PATCH /digitaltwins/{id}

`PATCH /digitaltwins/{id}`

Updates a digital twin.
Status codes:
* 204 No Content
* 400 Bad Request
  * InvalidArgument - The digital twin id or payload is invalid.
  * JsonPatchInvalid - The JSON Patch provided is invalid.
  * ValidationFailed - Applying the patch results in an invalid digital twin.
* 404 Not Found
  * DigitalTwinNotFound - The digital twin was not found.
* 412 Precondition Failed
  * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.

## Path parameters

- `id` string, required

## Query parameters

- `api-version` string, required

## Headers

- `If-Match` string

## Response `204`

Success

## Other responses

- `default` — Default response.

## Changes

> 7 revisions in range; 1 could not be searched.

- **2026-07-13** (2020-05-31-preview) `d78bed2ca1fd` — 1 breaking
  - removed the success response with the status `202`
- **2026-07-13** (2020-05-31-preview) `d47143e47755` — 2 info
  - added the new optional `header` request parameter `traceparent` to all path's operations
  - added the new optional `header` request parameter `tracestate` to all path's operations

[Change history](https://skmtc.dev/azure/apis/digitaltwins-digitaltwins/changes/digitaltwins/:id/patch.md)

---

[API](https://skmtc.dev/azure/apis/digitaltwins-digitaltwins.md) · [All operations](https://skmtc.dev/azure/apis/digitaltwins-digitaltwins/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/digitaltwins-digitaltwins/revisions/8d81dcdaf9a2/schema)
