---
title: "Create"
method: POST
path: "/landscapes/{landscapeId}/versions/{versionId}/diagrams"
tags: ["Diagrams"]
---

# Create

`POST /landscapes/{landscapeId}/versions/{versionId}/diagrams`

## Request

- Base URL: `https://api.icepanel.io/v1`
- URL: `https://api.icepanel.io/v1/landscapes/{landscapeId}/versions/{versionId}/diagrams`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

## Path parameters

- `landscapeId` string, required
- `versionId` string, required

## Query parameters

- `updateViewedAt` boolean

## Request body

- DiagramCreate
  - `commit` number: The commit number of the diagram content, incremented on each change
  - `description` string
  - `groupId` string, nullable
  - `index` number, required
  - `labels` object
  - `modelId` string, required: model object id this object belongs to
  - `name` string, required
  - `parentId` string, nullable
  - `pinned` boolean
  - `pinnedAt` string, date-time
  - `pinnedIndex` number
  - `status` 'current'
  - `zoomOverrides` DiagramZoomOverridesNullable: Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id.
  - `handleId` string
  - `type` 'app-diagram' | 'component-diagram' | 'context-diagram', required
  - `comments` object: The comments on the diagram, keyed by comment id
  - `connections` object: The connections on the diagram, keyed by connection id
  - `objects` object: The objects on the diagram, keyed by object id

## Response `200`

OK

- object
  - `diagram` Diagram, required
    - `commit` number, required
    - `description` string
    - `groupId` string, nullable, required
    - `index` number, required
    - `labels` object, required
    - `modelId` string, required: model object id this object belongs to
    - `name` string, required
    - `parentId` string, nullable, required
    - `pinned` boolean, required
    - `pinnedAt` string, date-time
    - `pinnedIndex` number
    - `status` 'current', required
    - `zoomOverrides` DiagramZoomOverridesNullable: Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id.
    - `handleId` string, required
    - `type` 'app-diagram' | 'component-diagram' | 'context-diagram', required
    - `commentCount` number, required
    - `connectionCount` number, required
    - `createdAt` string, date-time, required
    - `createdBy` 'user' | 'api-key' | 'notification-key' | 'service', required
    - `createdById` string, required
    - `deletedAt` string, date-time
    - `deletedBy` 'user' | 'api-key' | 'notification-key' | 'service'
    - `deletedById` string
    - `id` string, required
    - `landscapeId` string, required
    - `latestEntityId` string
    - `objectCount` DiagramObjectCount, required: The number of objects on the diagram, counted by object type and shape
      - `actor` number, required
      - `app` number, required
      - `component` number, required
      - `group` number, required
      - `store` number, required
      - `system` number, required
      - `area` number, required
      - `box` number, required
    - `updatedAt` string, date-time, required
    - `updatedBy` 'user' | 'api-key' | 'notification-key' | 'service', required
    - `updatedById` string, required
    - `version` number, required
    - `versionId` string, required
  - `diagramContent` DiagramContent, required
    - `comments` object, required: The comments on the diagram, keyed by comment id
    - `commit` number, required: The commit number of the diagram content, incremented on each change
    - `connections` object, required
    - `objects` object, required
    - `createdAt` string, date-time, required
    - `createdBy` 'user' | 'api-key' | 'notification-key' | 'service', required
    - `createdById` string, required
    - `deletedAt` string, date-time
    - `deletedBy` 'user' | 'api-key' | 'notification-key' | 'service'
    - `deletedById` string
    - `groupId` string, nullable, required: The id of the diagram group the diagram belongs to, null when not in a group
    - `handleId` string, required: A short id of the diagram stable across landscape versions
    - `id` string, required
    - `landscapeId` string, required
    - `latestEntityId` string
    - `modelId` string, required: The id of the model object the diagram belongs to
    - `name` string, required
    - `status` 'current', required
    - `type` 'app-diagram' | 'component-diagram' | 'context-diagram', required
    - `updatedAt` string, date-time, required
    - `updatedBy` 'user' | 'api-key' | 'notification-key' | 'service', required
    - `updatedById` string, required
    - `version` number, required: The version number of the diagram content, incremented on each update
    - `versionId` string, required
    - `viewedAt` string, date-time
    - `viewedBy` 'user' | 'api-key' | 'notification-key' | 'service'
    - `viewedById` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Entity
- `429`: Resource Exhausted
- `500`: Internal Server
- `503`: Service Unavailable

## Changes

- **2026-09-21** `047e51f699ff`: 2 info
  - added the new optional request property `allOf[#/components/schemas/DiagramContentRequired]/connections/additionalProperties/breakpoints`
  - added the optional property `diagramContent/connections/additionalProperties/breakpoints` to the response with the `200` status
- **2026-08-19** `27e82759be89`: 4 warning, 6 info
  - the `allOf[#/components/schemas/DiagramContentRequired]/connections/additionalProperties/labelPosition` request property's max was set to `100.00`
  - the `allOf[#/components/schemas/DiagramContentRequired]/connections/additionalProperties/labelPosition` request property's min was set to `0.00`
  - removed the request property `allOf[#/components/schemas/DiagramContentRequired]/connections/additionalProperties/id`
  - removed the request property `allOf[#/components/schemas/DiagramContentRequired]/objects/additionalProperties/id`
  - …6 more
- **2026-08-12** `2ebc2913a98a`: 1 breaking, 3 info
  - the response property `diagramContent/connections/additionalProperties/points` became optional for the status `200`
  - the request property `allOf[#/components/schemas/DiagramContentRequired]/connections/additionalProperties/points` became optional
  - request property `allOf[#/components/schemas/DiagramContentRequired]/connections/additionalProperties/points` deprecated
  - response property `diagramContent/connections/additionalProperties/points` deprecated
- …earlier changes not shown

[Operation history](https://skmtc.dev/icepanel/apis/icepanel-api/changes/landscapes/:landscapeId/versions/:versionId/diagrams/post.md)

---

[API](https://skmtc.dev/icepanel/apis/icepanel-api.md) - [All operations](https://skmtc.dev/icepanel/apis/icepanel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/icepanel/apis/icepanel-api/revisions/7d1119835bbb?raw)
