---
title: "Environment"
description: "Environment"
url: "https://www.contentstack.com/docs/developers/sdks/content-management-sdk/dot-net/reference/environment"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-06-06"
---

# Environment

## Environment

An environment allows users to publish their content on the destination URL. After you create an entry, you will publish it on an environment. After publishing, you will see the content on your website’s URL (specified in the environment). Being not limited to a single environment, you can publish content on multiple environments too.

## Create

The Create function will add a publishing environment for a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EnvironmentModel model = new EnvironmentModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Environment().Create(model);
```

Environment model for updating the environment.

Query parameter collection

## CreateAsync

The Create function will add a publishing environment for a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EnvironmentModel model = new EnvironmentModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Environment().CreateAsync(model);
```

Environment model for updating the environment.

Query parameter collection

## Delete

The Delete function will delete an existing publishing environment from your stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Environment("<EXTENSION_UID>").Delete();
```

Query parameter collection.

## DeleteAsync

The Delete function will delete an existing publishing environment from your stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Environment("<EXTENSION_UID>").DeleteAsync();
```

Query parameter collection.

## FetchAsync

The Fetch function returns more details about the specified environment of a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Environment("<EXTENSION_UID>").Fetch();
```

Query parameter collection.

## FetchAsync

The Fetch function returns more details about the specified environment of a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Environment("<EXTENSION_UID>").FetchAsync();
```

Query parameter collection.

## Query

The Query on Environment function fetches the list of all environments available in a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Environment().Query();
```

## Update

The Update function will update the details of an existing publishing environment for a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EnvironmentModel model = new EnvironmentModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Environment("<ENVIRONMENT_UID>").Update(model);
```

Environment model for updating the environment.

Query parameter collection

## UpdateAsync

The Update function will update the details of an existing publishing environment for a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EnvironmentModel model = new EnvironmentModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Environment("<ENVIRONMENT_UID>").UpdateAsync(model);
```

Environment model for updating the environment.

Query parameter collection

## Environment | .NET Management SDK | Contentstack

Environment lets you publish content to a destination URL, and you can publish entries across multiple environments as needed.