> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.icepanel.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.icepanel.io/_mcp/server.

# Create model objects

> Add new objects to your landscape.

This guide shows how to create new objects in your landscape model. Useful for automatically filling out your model from another source.

## Prerequisites

* [IcePanel account](https://app.icepanel.io/user/sign-up)
* [API key](https://app.icepanel.io)

```bash
export ICEPANEL_API_KEY='your-api-key'
export ICEPANEL_ORGANIZATION_ID='your-organization-id'
```

## Steps

#### Get your landscape

Get all landscapes in your organization and select a landscape ID:

### Request

GET [https://api.icepanel.io/v1/organizations/\{organizationId}/landscapes](https://api.icepanel.io/v1/organizations/\{organizationId}/landscapes)

```curl
curl https://api.icepanel.io/v1/organizations/organizationId/landscapes \
     -H "X-API-Key: <apiKey>"
```

```typescript
import { IcePanelClient } from "@icepanel/sdk";

async function main() {
    const client = new IcePanelClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.organizations.landscapes.list({
        organizationId: "organizationId",
    });
}
main();

```

```java
package com.example.usage;

import com.icepanel.IcePanelClient;
import com.icepanel.organizations.types.OrganizationLandscapesListRequest;

public class Example {
    public static void main(String[] args) {
        IcePanelClient client = IcePanelClient
            .builder()
            .apiKey("YOUR_API_KEY_HERE")
            .build();

        client.organizations().landscapes().list(
            OrganizationLandscapesListRequest
                .builder()
                .organizationId("organizationId")
                .build()
        );
    }
}
```

```python
import requests

url = "https://api.icepanel.io/v1/organizations/organizationId/landscapes"

headers = {"X-API-Key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.icepanel.io/v1/organizations/organizationId/landscapes"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```csharp
using RestSharp;

var client = new RestClient("https://api.icepanel.io/v1/organizations/organizationId/landscapes");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

Note the `id` of the landscape:

```bash
export ICEPANEL_LANDSCAPE_ID='your-landscape-id'
```

#### Find the root object

Call a `GET` request with query parameter `?filter[type]=root` to find the root model object. Your landscape may have multiple root model objects if you use domains.

### Request

GET [https://api.icepanel.io/v1/landscapes/\{landscapeId}/versions/\{versionId}/model/objects](https://api.icepanel.io/v1/landscapes/\{landscapeId}/versions/\{versionId}/model/objects)

```curl
curl https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/objects \
     -H "X-API-Key: <apiKey>"
```

```typescript
import { IcePanelClient } from "@icepanel/sdk";

async function main() {
    const client = new IcePanelClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.model.objects.list({
        landscapeId: "landscapeId",
        versionId: "versionId",
    });
}
main();

```

```java
package com.example.usage;

import com.icepanel.IcePanelClient;
import com.icepanel.model.types.ModelObjectsListRequest;

public class Example {
    public static void main(String[] args) {
        IcePanelClient client = IcePanelClient
            .builder()
            .apiKey("YOUR_API_KEY_HERE")
            .build();

        client.model().objects().list(
            ModelObjectsListRequest
                .builder()
                .landscapeId("landscapeId")
                .versionId("versionId")
                .build()
        );
    }
}
```

```python
import requests

url = "https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/objects"

headers = {"X-API-Key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/objects"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```csharp
using RestSharp;

var client = new RestClient("https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/objects");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

Note the `id` from the response. This is the `parentId` for any top-level objects you create.

#### Create an object

Create a new model object as a child of the root:

### Request

POST [https://api.icepanel.io/v1/landscapes/\{landscapeId}/versions/\{versionId}/model/objects](https://api.icepanel.io/v1/landscapes/\{landscapeId}/versions/\{versionId}/model/objects)

```curl
curl -X POST https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/objects \
     -H "X-API-Key: <apiKey>" \
     -H "Content-Type: application/json" \
     -d '{
  "name": "string",
  "parentId": "string",
  "type": "actor"
}'
```

```typescript
import { IcePanelClient } from "@icepanel/sdk";

async function main() {
    const client = new IcePanelClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.model.objects.create({
        landscapeId: "landscapeId",
        versionId: "versionId",
        body: {
            name: "string",
            parentId: "string",
            type: "actor",
        },
    });
}
main();

```

```java
package com.example.usage;

import com.icepanel.IcePanelClient;
import com.icepanel.core.OptionalNullable;
import com.icepanel.model.types.ModelObjectCreateRequest;
import com.icepanel.types.ModelObjectRequired;
import com.icepanel.types.ModelObjectType;

public class Example {
    public static void main(String[] args) {
        IcePanelClient client = IcePanelClient
            .builder()
            .apiKey("YOUR_API_KEY_HERE")
            .build();

        client.model().objects().create(
            ModelObjectCreateRequest
                .builder()
                .landscapeId("landscapeId")
                .versionId("versionId")
                .body(
                    ModelObjectRequired
                        .builder()
                        .name("string")
                        .type(ModelObjectType.ACTOR)
                        .parentId(
                            OptionalNullable.of("string")
                        )
                        .build()
                )
                .build()
        );
    }
}
```

```python
import requests

url = "https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/objects"

payload = {
    "name": "string",
    "parentId": "string",
    "type": "actor"
}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/objects"

	payload := strings.NewReader("{\n  \"name\": \"string\",\n  \"parentId\": \"string\",\n  \"type\": \"actor\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```csharp
using RestSharp;

var client = new RestClient("https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/objects");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"string\",\n  \"parentId\": \"string\",\n  \"type\": \"actor\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

Below is a list of different objects you can create.

### Object types

| Type        | Description                               |
| ----------- | ----------------------------------------- |
| `root`      | A root object of a landscape.             |
| `system`    | A top-level system or bounded context     |
| `app`       | An application or service within a system |
| `component` | A component within an app                 |
| `store`     | A data store (database, queue, cache)     |
| `actor`     | An external user, team, or system         |
| `group`     | A logical grouping within a diagram       |