---
title: "POST /models"
method: POST
path: "/models"
tags: ["Models"]
---

# POST /models

`POST /models`

Uploads one or more models. When any error occurs, no models are uploaded.
Status codes:
* 201 Created
* 400 Bad Request
  * DTDLParserError - The models provided are not valid DTDL.
  * InvalidArgument - The model id is invalid.
  * LimitExceeded - The maximum number of model ids allowed in 'dependenciesFor' has been reached.
  * ModelVersionNotSupported - The version of DTDL used is not supported.
* 409 Conflict
  * ModelAlreadyExists - The model provided already exists.

## Query parameters

- `api-version` string, required

## Request body

- object[]

## Response `201`

Success

- DigitalTwinsModelData[] — A collection of DigitalTwinsModelData objects.
  - `displayName` object — A language map that contains the localized display names as specified in the model definition.
  - `description` object — A language map that contains the localized descriptions as specified in the model definition.
  - `id` string, required — The id of the model as specified in the model definition.
  - `uploadTime` string, date-time — The time the model was uploaded to the service.
  - `decommissioned` boolean — Indicates if the model is decommissioned. Decommissioned models cannot be referenced by newly created digital twins.
  - `model` object — The model definition.

## Other responses

- `default` — Default response.

---

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