# Create or replace a twin.

Endpoint: PUT /twins
Version: v3
Security: oauth2

## Request fields (application/json):

  - `id` (string, required)
    The unique Id of the digital twin.

  - `modelId` (string, required)
    Digital Twin Model Identifier.

  - `lastUpdateTime` (null | string)
    Timestamp when the twin was last updated in ISO 8601 format.

  - `eTag` (null | string)
    Concurrency tag for optimistic concurrency control. Populated from the underlying ADT entity when sourced from AdtQuery; null when sourced from ADX.

## Response 200 fields (application/json):

  - `id` (string, required)
    The unique Id of the digital twin.

  - `modelId` (string, required)
    Digital Twin Model Identifier.

  - `lastUpdateTime` (null | string)
    Timestamp when the twin was last updated in ISO 8601 format.

  - `eTag` (null | string)
    Concurrency tag for optimistic concurrency control. Populated from the underlying ADT entity when sourced from AdtQuery; null when sourced from ADX.

## Response 400 fields (application/json):

  - `type` (null | string)

  - `title` (null | string)

  - `status` (null | integer)

  - `detail` (null | string)

  - `instance` (null | string)

