---
title: "Contentstack Management .NET SDK"
description: "Documentation for .NET Management SDK API Reference"
url: "https://www.contentstack.com/docs/developers/sdks/content-management-sdk/dot-net/reference"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-07-01"
---

# Contentstack Management .NET SDK

## Contentstack - .NET Management SDK

## .NET SDK for Contentstack's Content Management API

Contentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful cross-platform applications in their favourite languages. Build your application frontend, and Contentstack will take care of the rest.

For more information, you can check out the GitHub page of our [.NET Management SDK](https://github.com/contentstack/contentstack-management-dotnet).

## Prerequisites

To get started with C#, you will need:

*   .NET 10 and later
*   IDE (Visual Studio)
*   NuGet.

## SDK installation and setup

The .NET SDK provided by contentstack.io is available for .NET 10 applications. You can integrate contentstack with your application by following these steps.

Open the terminal and install the contentstack module via 'Package Manager' command

```
PM> Install-Package contentstack.management.csharp
```

And via ‘.NET CLI’

```
dotnet add package contentstack.management.csharp
```

To import the SDK, use the following code:

```
using Contentstack.Management.Core;

ContentstackClient client = new ContentstackClient();
```

Or

```
using Contentstack.Management.Core;

ContentstackClientOptions options = new ContentstackClientOptions();
ContentstackClient client = new ContentstackClient(new OptionsWrapper<ContentstackClientOptions>(options));
```

## Quickstart in 5 mins

## Initializing Your SDK

To use the .NET CMA SDK, you need to first initialize it. To do this, use the following code:

```
using Contentstack.Management.Core;ContentstackClient client = new ContentstackClient("AUTHTOKEN");
```

## Authentication

To use this SDK, you need to authenticate your users by using the Authtoken, credentials, or Management Token (stack-level token).

**Authtoken**  
An Authtoken is a read-write token used to make authorized CMA requests, and it is a user-specific token.

```
ContentstackClientOptions options = new ContentstackClientOptions() {   Authtoken: ‘AUTHTOKEN’};ContentstackClient client = new ContentstackClient(new OptionsWrapper<ContentstackClientOptions>(options));
```

**Login**

To log in to Contentstack, provide your credentials as shown below.

```
NetworkCredential credentials = new NetworkCredential("EMAIL", "PASSWORD");ContentstackClient client = new ContentstackClient();try{    ContentstackResponse contentstackResponse = client.Login(credentials);} catch (Exception e){}
```

**Management Token**

Management tokens are stack-level tokens with no users attached to them.

```
ContentstackClient client = new ContentstackClient();client.Stack("API_KEY", "MANAGEMENT_TOKEN");
```

## Early Access Header

Integrating EarlyAccess headers into the ContentstackClientOptions grants access to features included in the early access program

```
var contentstackClient = new ContentstackClient(new ContentstackClientOptions(){    Authtoken = "token",    EarlyAccess = new string[] { "ea1", "ea2" }});
```

## Proxy Configuration

Contentstack allows you to define HTTP proxy for your requests with the .NET Management SDK. A proxied request allows you to anonymously access public URLs even from within a corporate firewall through a proxy server. Here is the basic syntax of the proxy settings that you can pass within fetchOptions of the .NET Management SDK:

```
var contentstackConfig = new ContentstackClientOptions();contentstackConfig.ProxyHost = "http://127.0.0.1"contentstackConfig.ProxyPort = 9000;contentstackConfig.ProxyCredentials = new NetworkCredential(userName: "username", password: "password");ContentstackClient client = new ContentstackClient(newOptionsWrapper<ContentstackClientOptions>(options));
```

## Fetch Stack Details

To fetch your stack details through the SDK, use the following code:

```
using Contentstack.Management.Core;using Contentstack.Management.Core.Models;ContentstackClient client = new ContentstackClient("AUTHTOKEN");Stack stack = client.Stack("API_KEY");ContentstackResponse contentstackResponse = stack.Fetch();var response = contentstackResponse.OpenJsonObjectResponse();
```

## Create an Entry

To create an entry, you need to prepare a custom model class that represents the entry's request body. To do so, create a separate EntryModel.cs file and add your custom EntryModel class, implementing IEntry interface, as follows:

```
using Contentstack.Management.Core.Abstractions;using System.Text.Json.Serialization;namespace TestModels{	public class EntryModel : IEntry    {		public EntryModel()		{		}        [JsonPropertyName("title")]        public string Title { get; set; } = "";        [JsonPropertyName("uid")]        public string Uid { get; set; } = "";    }}
```

You can use the following code to create an entry in a specific content type of a stack through the SDK:

```
using Contentstack.Management.Core;using Contentstack.Management.Core.Models;EntryModel entry = new EntryModel() { Title: 'Sample Entry', Url: '/sampleEntry'}ContentstackClient client = new ContentstackClient("AUTHTOKEN");Stack stack = client.Stack("API_KEY");ContentstackResponse contentstackResponse = stack.ContentType(“CONTENT_TYPE_UID”).Entry().Create(entry);
```

## Upload Assets

Use the following code snippet to upload assets to your stack through the SDK:

```
using Contentstack.Management.Core;using Contentstack.Management.Core.Models;ContentstackClient client = new ContentstackClient("AUTHTOKEN");Stack stack = client.Stack("API_KEY");var path = Path.Combine(Environment.CurrentDirectory, "path/to/file");AssetModel asset = new AssetModel("Asset Title", path, "application/json");ContentstackResponse response = stack.Asset().Create(asset);
```

## ContentstackClient

Contentstack Client for interacting with Contentstack Management API.

## ContentstackClient

Initializes new instance of the Contentstack.Management.Core.ContentstackClient class.

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

var options = new ContentstackClientOptions()
{
      Host = "<API_HOST>",
      Authtoken = "<AUTHTOKEN>"
}
ContentstackClient client = new ContentstackClient(options);
```

Contentstack configuration options.

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

var options = new ContentstackClientOptions()
{
      Host = "<API_HOST>",
      Authtoken = "<AUTHTOKEN>"
}
ContentstackClient client = new ContentstackClient(new OptionsWrapper<ContentstackClientOptions>
(options));
```

Contentstack configuration options.

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

ContentstackClient client = new ContentstackClient("AUTHTOKEN");
```

The optional Authtoken for making CMA call

The optional host name for the API.

The optional port for the API

The optional version for the API

The optional to disable or enable logs.

The optional maximum number of bytes to buffer when reading the response content

The optional timespan to wait before the request times out.

The optional retry condition for retrying on error.

Host to use with a proxy.

Port to use with a proxy.

Credentials to use with a proxy.

Optional array of header strings for early access features.

## GetUser

The Get user call returns comprehensive information of an existing user account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.GetUser();
```

Query parameter collection.

## GetUserAsync

The Get user call returns comprehensive information of an existing user account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.GetUserAsync();
```

Query parameter collection.

## Login

The Log in to your account request is used to sign in to your Contentstack account and obtain the authtoken. Refer to the [TOTP Support for .NET Management SDK](https://www.contentstack.com/docs/developers/sdks/content-management-sdk/dot-net/implement-totp-with-dot-net-management-sdk#login) for more information.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient();

NetworkCredential credentials = new NetworkCredential("<EMAIL>", "<PASSWORD>");

// Login when MFA is not enabled for the user 
ContentstackResponse contentstackResponse = client.Login(credentials);

// Login when MFA is enabled: use a valid TOTP token generated from an authenticator app
string tfa_token = "<my_tfa_token>";
contentstackResponse = client.Login(credentials, token = tfa_token);

// Login using the MFA secret: SDK will generate the TOTP token dynamically
string mfa_secret = "<my_mfa_secret>";
contentstackResponse = client.Login(credentials, mfaSecret = mfa_secret);
```

User credentials used to authenticate the login request.

TOTP token generated from an authenticator app. Required for MFA-enabled users.

Secret key generated when the user enables MFA in Contentstack. Used to dynamically create a TOTP token.

## LoginAsync

The Log in to your account request is used to sign in to your Contentstack account and obtain the authtoken. Refer to the [TOTP Support for .NET Management SDK](https://www.contentstack.com/docs/developers/sdks/content-management-sdk/dot-net/implement-totp-with-dot-net-management-sdk#loginasync) for more information.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient();

NetworkCredential credentials = new NetworkCredential("<EMAIL>", "<PASSWORD>");

// Login when MFA is not enabled for the user
ContentstackResponse contentstackResponse = await client.Login(credentials);

// Login when MFA is enabled: use a valid TOTP token generated from an authenticator app
string tfa_token = "<my_tfa_token>";
contentstackResponse = await client.Login(credentials, token = tfa_token);

// Login using the MFA secret: SDK will generate the TOTP token dynamically
string mfa_secret = "<my_mfa_secret>";
contentstackResponse = await client.Login(credentials, mfaSecret = mfa_secret);
```

User credentials used to authenticate the login request.

TOTP token generated from an authenticator app. Required for MFA-enabled users.

Secret key generated when the user enables MFA in Contentstack. Used to dynamically create a TOTP token.

## Logout

The Log out of your account call is used to sign out the user of Contentstack account

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Logout();
```

The optional auth token in case the user wants to logout.

## LogoutAsync

The Log out of your account call is used to sign out the user of Contentstack account

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.LogoutAsync();
```

The optional authroken in case user want to logout.

## Organization

Organization the top-level entity in the hierarchy of Contentstack, consisting of stacks and stack resources, and users. Organization allows easy management of projects as well as users within the Organization.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Organization organization = client.Organization();
```

Organization uid for specific org.

## Stack

Stack is a space that stores the content of a project (a web or mobile property). Within a stack, you can create content structures, content entries, users, etc. related to the project.

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

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

Stack API Key.

Stack Management token

Branch uid for querying specific branch of stack.

## User

User session consists of calls that will help you to update user of your Contentstack account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
User user = client.User();
```

Get and Set method for de-serialization.

## ContentstackClient | .NET Management SDK | Contentstack

ContentstackClient is the client used for interacting with the Contentstack Management API.

## ContentstackClientOptions

ContentstackClientOptions class is base class for Contentstack Configuration.

## GetUri

Returns a Uri instance configured in the configuration.

## GetWebProxy

Returns a WebProxy instance configured to match the proxy settings in the configuration.

An Authtoken is a read-write token used to make authorized CMA requests.

Gets or sets the DisableLogging. When set to true, the logging of the client is disabled. The default value is false.

The Host used to set host url for the Contentstack Management API.

Gets or sets the maximum number of bytes to buffer when reading the response content.

The Host used to set host url for the Contentstack Management API.

Credentials to use with a proxy.

Host for the Proxy.

Port for the Proxy.

Returns the flag indicating delay in retrying HTTP requests.

Returns the flag indicating how many retry HTTP requests an SDK should make for a single SDK operation invocation before giving up.

When set to true, the client will retry requests. When set to false, the client will not retry request.

The retry policy which specifies when a retry should be performed.

Gets or sets the timespan to wait before the request times out.

The Host used to set host url for the Contentstack Management API.

## ContentstackClientOptions | .NET Management SDK | Contentstack

ContentstackClientOptions is the base class for configuring the Contentstack client.

## ContentstackResponse

Abstract class for Response objects.

## GetHeaderNames

Gets the header names from HTTP response headers.

## GetHeaderValue

Gets the value for the header name from HTTP response headers.

Header name for which value is needed.

## IsHeaderPresent

Return true if header name present in HTTP response headers.

Header name to check if its present.

## OpenJsonObjectResponse

Json Object format response.

## OpenResponse

String format response.

## OpenTResponse

Type response to serialize the response.

Returns the content length of the HTTP response.

Gets the property ContentType.

Gets a value that indicates whether the HTTP response was successful.

The entire response body from the HTTP response.

The HTTP status code from the HTTP response.

## ContentstackResponse | .NET Management SDK | Contentstack

ContentstackResponse is the abstract class for response objects in the .NET Management SDK.

## ContentstackException

A base exception for Contentstack API.

## ContentstackException

Gets the header names from HTTP response headers.

The message for the exception to be created.

Inner exception

## ContentstackException | .NET Management SDK | Contentstack

ContentstackException is the base exception class for handling errors from the Contentstack API.

## ContentstackErrorException

A base exception for Contentstack API.

This is error code.

This is error message.

Set of errors in detail.

This is http response Header of REST request to Contentstack.

This is error message.

This is http response phrase code of REST request to Contentstack.

This is http response status code of REST request to Contentstack.

## ContentstackErrorException | .NET Management SDK | Contentstack

ContentstackErrorException is a base exception class for handling errors returned by the Contentstack API.

## Asset

Assets refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded in your Contentstack repository for future use.

**Note:** Unlike entries, assets are not independently localizable via the .NET Management SDK. There is no dedicated asset-localize or asset-unlocalize method. To retrieve locale-specific asset metadata (title, description, alt text), pass a locale key via ParameterCollection when calling Fetch, FetchAsync, or Query.

## Create

The Upload asset request uploads an asset file to your stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
AssetModel model = new AssetModel("ASSET_NAME", "FILE_PATH", "FILE_CONTENT_TYPE");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset().Create(model);
```

Asset Model with details.

Query parameter collection

## CreateAsync

The Upload asset request uploads an asset file to your stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
AssetModel model = new AssetModel("ASSET_NAME", "FILE_PATH", "FILE_CONTENT_TYPE");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset().CreateAsync(model);
```

Asset Model with details.

Query parameter collection

## Delete

The Delete asset call will delete an existing asset from the stack.

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

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

Query parameter.

## DeleteAsync

The Delete asset call will delete an existing asset from the stack.

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

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

Query parameter.

## Fetch

The Get an asset call returns comprehensive information about a specific version of an asset of a stack.

Assets are not independently localizable like entries. To retrieve locale-specific asset metadata (title, description, alt text), pass a locale key via ParameterCollection.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

// Fetch asset (returns master locale metadata)
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Fetch();

// Fetch asset with a specific locale
ParameterCollection collection = new ParameterCollection();
collection.Add("locale", "en-us");
ContentstackResponse localizedResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Fetch(collection);
```

Query parameter.

Locale code (e.g. en-us, fr-fr) to scope the returned asset metadata to a specific language. Pass this as a key on collection.

When true, includes the \_asset\_scan\_status field in the asset response (pending, clean, quarantined, or not\_scanned). Opt-in, omitted from the request by default.

## FetchAsync

The Get an asset call returns comprehensive information about a specific version of an asset of a stack.

Assets are not independently localizable like entries. To retrieve locale-specific asset metadata (title, description, alt text), pass a locale key via ParameterCollection.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

// Fetch asset (returns master locale metadata)
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").FetchAsync();

// Fetch asset with a specific locale
ParameterCollection collection = new ParameterCollection();
collection.Add("locale", "en-us");
ContentstackResponse localizedResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").FetchAsync(collection);
```

Query parameter.

Locale code (e.g. en-us, fr-fr) to scope the returned asset metadata to a specific language. Pass this as a key on collection.

When true, includes the \_asset\_scan\_status field in the asset response (pending, clean, quarantined, or not\_scanned). Opt-in, omitted from the request by default.

## Folder

The Folder allows to fetch and create folders in assets.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Folder folder = client.Stack("<API_KEY>").Asset().Folder();
```

Optional folder unique id.

## Publish

The Publish an asset call is used to publish a specific version of an asset on the desired environment either immediately or at a later date/time.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Publish(new PublishUnpublishDetails(), apiVersion: "3.2");
```

Publish details for publishing asset.

API version to pass in headers. Pass the value 3.2 to use latest Publish API.

## PublishAsync

The Publish an asset call is used to publish a specific version of an asset on the desired environment either immediately or at a later date/time.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").PublishAsync(new PublishUnpublishDetails(), apiVersion: "3.2");
```

Publish details for publishing asset.

API version to pass in headers. Pass the value 3.2 to use latest publish API.

## Query

The Query on Asset will allow to fetch details of all Assets. Pass a locale key via ParameterCollection to filter results to locale-specific asset metadata.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

// Query all assets
Query query = client.Stack("<API_KEY>").Asset().Query();
ContentstackResponse response = query.Find();

// Query assets with a specific locale
ParameterCollection collection = new ParameterCollection();
collection.Add("locale", "en-us");
ContentstackResponse localizedResponse = query.Find(collection);
```

Locale code (e.g. en-us, fr-fr) to scope the returned asset metadata to a specific language. Pass this as a key on the ParameterCollection given to Find.

## References

The References method retrieves the details of the entries and the content types in which the specified asset is referenced.

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


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");


ContentstackResponse contentstackResponse = client
.Stack("<API_KEY>")
.Asset("<ASSET_UID>")
.References();
```

## ReferencesAsync

The ReferencesAsync method retrieves the details of the entries and the content types in which the specified asset is referenced.

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


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");


ContentstackResponse contentstackResponse = await client
.Stack("<API_KEY>")
.Asset("<ASSET_UID>")
.ReferencesAsync();
```

## Unpublish

The Unpublish an asset call is used to unpublish a specific version of an asset from a desired environment.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Unpublish(new PublishUnpublishDetails(), apiVersion: "3.2");
```

Publish details for un-publishing asset.

API version to pass in headers. Pass the value 3.2 to use latest Unpublish API.

## UnpublishAsync

The Unpublish an asset call is used to unpublish a specific version of an asset from a desired environment.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").UnpublishAsync(new PublishUnpublishDetails(), apiVersion: "3.2");
```

Publish details for un-publishing asset.

API version to pass in headers. Pass the value 3.2 to use latest Unpublish API.

## Update

The Replace asset call will replace an existing asset with another file on the stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
AssetModel model = new AssetModel("ASSET_NAME", "FILE_PATH", "FILE_CONTENT_TYPE");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Update(model);
```

Asset Model with details.

Query parameter collection

## UpdateAsync

The Replace asset call will replace an existing asset with another file on the stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
AssetModel model = new AssetModel("ASSET_NAME", "FILE_PATH", "FILE_CONTENT_TYPE");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").UpdateAsync(model);
```

Asset Model with details.

Query parameter collection

## Version

The Versioning on Asset will allow to fetch all version, delete specific version or naming the asset version.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Version version = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version();
```

Version number for the asset.

## Asset | .NET Management SDK | Contentstack

Asset manages media files like images, videos, PDFs, and audio uploaded to your Contentstack repository via the .NET Management SDK.

## Approvals

List of roles and list of user for the approval.

List of roles for the approval

List of users for the approval.

## Approvals | .NET Management SDK | Contentstack

Approvals defines the list of roles and users responsible for content approval in the Contentstack .NET Management SDK.

## AssignRole

Roles for assigning for the organization/stack

Role name.

Unique id for the role.

## AssignRole | .NET Management SDK | Contentstack

AssignRole defines the roles assigned to a user for an organization or stack in the Contentstack .NET Management SDK.

## AssignUser

User details for assigning for the organization/stack

User email address.

User name.

Unique id for the user.

## AssignUser | .NET Management SDK | Contentstack

AssignUser holds the user details used to assign a user to an organization or stack in the Contentstack .NET Management SDK.

## AuditLog

Audit log displays a record of all the activities performed in a stack and helps you keep a track of all published items, updates, deletes, and current status of the existing content.

## Fetch

The Get audit log item request is used to retrieve a specific item from the audit log of a stack.

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

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

Query parameter collection

## FetchAsync

The Get audit log item request is used to retrieve a specific item from the audit log of a stack.

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

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

Query parameter collection

## FindAll

The Get audit log request is used to retrieve the audit log of a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").AuditLog().FindAll();
```

Query parameter collection

## FindAllAsync

The Get audit log request is used to retrieve the audit log of a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").AuditLog().FindAllAsync();
```

Query parameter collection

## AuditLog | .NET Management SDK | Contentstack

AuditLog records all stack activity, tracking published items, updates, deletes, and current content status in the Contentstack .NET Management SDK.

## ContentModelling

ContentModelling for creating/updating ContentTypes.

```
ContentModelling model = new ContentModelling(){
    Title = " This is title ",
    Uid = "The uid",
    Schema = new List<Field>(){
              new Field();
             };
};
```

UID for the content type.

Title for the content type.

List of field rules for the content type fields.

Option for the content types

Schema is list of the field you want to create within content type

## ContentModelling | .NET Management SDK | Contentstack

ContentModelling provides the model used to create and update content types in Contentstack.

## ContentType

Content type defines the structure or schema of a page or a section of your web or mobile property. To create content for your application, you are required to first create a content type, and then create entries using the content type.

## Create

The Create a content type call creates a new content type in a particular stack of your Contentstack account.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModelling model = new ContentModelling();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType().Create(model);
```

ContentModelling for creating Content Type.

Query parameter collection

## CreateAsync

The Create a content type call creates a new content type in a particular stack of your Contentstack account.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModelling model = new ContentModelling();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType().Create(model);
```

ContentModelling for creating Content Type.

Query parameter collection

## Delete

The Delete Content Type call deletes an existing content type and all the entries within it.

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

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

Query parameter collection

## DeleteAsync

The Delete Content Type call deletes an existing content type and all the entries within it.

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

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

Query parameter collection

## Fetch

The Fetch a single content type call returns information of a specific content type.

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

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

Query parameter collection

## FetchAsync

The Fetch a single content type call returns information of a specific content type.

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

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

Query parameter collection

## Entry

Entry is the actual piece of content created using one of the defined content types.

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

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

Optional entry uid for performing entry specific operation.

## Query

The Query on Content Type will allow to fetch details of all or specific Content Type.

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

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

## Update

The Update Content Type call is used to update the schema of an existing content type.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModelling model = new ContentModelling();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType().Create(model);
```

ContentModelling for updating Content Type.

Query parameter collection

## UpdateAsync

The Update Content Type call is used to update the schema of an existing content type.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModelling model = new ContentModelling();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType().Create(model);
```

ContentModelling for updating Content Type.

Query parameter collection

## ContentType | .NET Management SDK | Contentstack

ContentType defines the schema of a page or section, providing the structure you use to create entries for your application.

## VariantGroups

Variants in Contentstack provides an overview of variant groups and linked content types, which are used for content personalization. Linking content types to variant groups allows you to create entry variants.

## Find

The Find Variant Groups returns a list of all variant groups linked to your stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").VariantGroups().Find();
```

Query parameter collection

## FindAsync

The FindAsync Variant Groups returns a list of all variant groups linked to your stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").VariantGroups().Find();
```

Query parameter collection

## LinkContentTypes

The LinkContentTypes method allows you to link content types to your variant group.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> contentTypeUids = new List<string> { "content_type_uid_1", "content_type_uid_2" };
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").VariantGroups("<VARIANT_GROUP_UID>").LinkContentTypes(contentTypeUids);
```

List of content type UIDs to be linked to the variant group

Query parameter collection

## LinkContentTypesAsync

The LinkContentTypesAsync method allows you to link content types to your variant group.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> contentTypeUids = new List<string> { "content_type_uid_1", "content_type_uid_2" };
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").VariantGroups("<VARIANT_GROUP_UID>").LinkContentTypesAsync(contentTypeUids);
```

List of content type UIDs to be linked to the variant group

Query parameter collection

## UnlinkContentTypes

The UnlinkContentTypes method allows you to unlink content types to your variant group.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> contentTypeUids = new List<string> { "content_type_uid_1", "content_type_uid_2" };
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").VariantGroups("<VARIANT_GROUP_UID>").UnlinkContentTypes(contentTypeUids);
```

List of content type UIDs to be linked to the variant group

Query parameter collection

## UnlinkContentTypesAsync

The UnlinkContentTypesAsync method allows you to unlink content types to your variant group.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> contentTypeUids = new List<string> { "content_type_uid_1", "content_type_uid_2" };
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").VariantGroups("<VARIANT_GROUP_UID>").UnlinkContentTypesAsync(contentTypeUids);
```

List of content type UIDs to be linked to the variant group

Query parameter collection

## VariantGroups | .NET Management SDK | Contentstack

VariantGroups link content types for content personalization, letting you create entry variants in the .NET Management SDK.

## EntryVariant

The EntryVariant class represents content variations for a specific entry. Use it to retrieve, create, update, delete, publish, or unpublish variants assigned to an entry within a content type.

Access variant operations by chaining ContentType(uid).Entry(uid).Variant() on a Stack instance.

**Variant Instance State**

The behavior of each method depends on whether a variant UID is passed to .Variant():

*   Call .Variant() without a UID to operate on the collection of variants (Find, FindAsync).
*   Call .Variant(uid) to operate on a specific variant (Fetch, Create, Update, Delete, Publish, and Unpublish).
*   Optionally pass a branch as the second argument: .Variant(uid, branch).

**IMPORTANT:** The parameters passed to .Variant(string variantHeader, string branch) are positional. The SDK does not validate whether the values are supplied in the correct order.

If the arguments are reversed, the SDK treats the first value as the variant identifier and the second value as the branch name. No SDK validation error is thrown, which can result in an unexpected API error that does not clearly indicate the root cause.

Always pass the variant UID (or alias) as the first argument and the branch name as the second argument.

**Branch Scoping**

All methods support branch scoping through the optional branch parameter passed to .Variant(uid, branch). When provided, the SDK sends the request against the specified branch.

## Find

Retrieves all variants for a specific entry.

```
Validation
Throws InvalidOperationException if a variant UID is set on the EntryVariant instance. Call .Variant() without a UID argument to list all variants.
Behavior
Sends a GET request to /content_types/{contentTypeUid}/entries/{entryUid}/variants. Returns the raw API response wrapped in ContentstackResponse.The Contentstack Management .NET SDK does not paginate automatically. Use collection to control limit and skip.Implementation and examples
The following example retrieves all variants for an entry.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");
ContentstackResponse response = client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant()
    .Find();using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");
ContentstackResponse response = client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant(null, "BRANCH_UID")
    .Find();
```

Defines optional query parameters such as limit and skip to filter or paginate results. When null, API defaults apply.

## FindAsync

Retrieves all variants for a specific entry asynchronously.

```
Validation
Throws InvalidOperationException if a variant UID is set on the EntryVariant instance. Call .Variant() without a UID argument to list all variants.
Behavior
Sends a GET request to /content_types/{contentTypeUid}/entries/{entryUid}/variants asynchronously. Returns the raw API response wrapped in ContentstackResponse.The SDK does not paginate automatically. Use collection to control limit and skip.Implementation and examples
The following example retrieves all variants for an entry asynchronously.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");
ContentstackResponse response = await client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant()
    .FindAsync();using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");
ContentstackResponse response = await client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant(null, "BRANCH_UID")
    .FindAsync();
```

Defines optional query parameters such as limit and skip to filter or paginate results. When null, API defaults apply.

## Fetch

Retrieves the details of a specific entry variant.

```
Validation
Throws InvalidOperationException if no variant UID is set on the EntryVariant instance. Pass a variant UID or alias to .Variant(uid) before calling Fetch(). Fetch() retrieves a single variant and therefore requires a variant identifier.
Behavior
Sends a GET request to /content_types/{contentTypeUid}/entries/{entryUid}/variants/{variantUid}. Returns the raw API response wrapped in ContentstackResponse.Each call maps to a single HTTP request.Implementation and examples
The following example retrieves a specific entry variant.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");
ContentstackResponse response = client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID")
    .Fetch();using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");
ContentstackResponse response = client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID", "BRANCH_UID")
    .Fetch();
```

Defines optional query parameters to filter the response. When null, API defaults apply.

## FetchAsync

Retrieves the details of a specific entry variant asynchronously.

```
Validation
Throws InvalidOperationException if no variant UID is set on the EntryVariant instance. Pass a variant UID or alias to .Variant(uid) before calling FetchAsync.
Behavior
Sends a GET request to /content_types/{contentTypeUid}/entries/{entryUid}/variants/{variantUid} asynchronously. Returns the raw API response wrapped in ContentstackResponse.Each call maps to a single HTTP request.Implementation and examples
The following example retrieves a specific entry variant asynchronously.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");
ContentstackResponse response = await client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID")
    .FetchAsync();using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");
ContentstackResponse response = await client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID", "BRANCH_UID")
    .FetchAsync();
```

Defines optional query parameters to filter the response. When null, API defaults apply.

## Create

Creates or replaces the content of a specific entry variant.

```
Validation
Throws InvalidOperationException if no variant UID is set on the EntryVariant instance. Pass the target variant UID to .Variant(uid) before calling Create.
Behavior
Sends a PUT request to /content_types/{contentTypeUid}/entries/{entryUid}/variants/{variantUid}. Returns the raw API response wrapped in ContentstackResponse.
Implementation and examples
The following example creates content for a specific entry variant, specifying the changed fields in _change_set.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");

var variantData = new
{
    entry = new
    {
        title = "ENTRY_TITLE",
        description = "ENTRY_DESCRIPTION"
    },
    _variant = new
    {
        _change_set = new[] { "title", "description" },
        _order = new string[] { }
    }
};

ContentstackResponse response = client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID")
    .Create(variantData);The following example creates variant content scoped to a specific branch.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");

var variantData = new
{
    entry = new
    {
        title = "ENTRY_TITLE",
        description = "ENTRY_DESCRIPTION"
    },
    _variant = new
    {
        _change_set = new[] { "title", "description" },
        _order = new string[] { }
    }
};

ContentstackResponse response = client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID", "BRANCH_UID")
    .Create(variantData);
```

Defines the variant entry data, including entry fields and \_variant metadata. The \_variant object must include \_change\_set (list of field names to write) and \_order (field ordering).

Defines optional query parameters. When null, API defaults apply.

## CreateAsync

Creates or replaces the content of a specific entry variant asynchronously.

```
Validation
The following validation applies to the parameters above:
Throws InvalidOperationException if no variant UID is set on the EntryVariant instance. Pass the target variant UID to .Variant(uid) before calling CreateAsync.Throws InvalidOperationException if the client is not authenticated.Behavior
Sends a PUT request to /content_types/{contentTypeUid}/entries/{entryUid}/variants/{variantUid} asynchronously. Returns the raw API response wrapped in ContentstackResponse.
Implementation and examples
The following example creates content for a specific entry variant asynchronously.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");

var variantData = new
{
    entry = new
    {
        title = "ENTRY_TITLE",
        description = "ENTRY_DESCRIPTION"
    },
    _variant = new
    {
        _change_set = new[] { "title", "description" },
        _order = new string[] { }
    }
};

ContentstackResponse response = await client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID")
    .CreateAsync(variantData);The following example creates variant content asynchronously, scoped to a specific branch.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");

var variantData = new
{
    entry = new
    {
        title = "ENTRY_TITLE",
        description = "ENTRY_DESCRIPTION"
    },
    _variant = new
    {
        _change_set = new[] { "title", "description" },
        _order = new string[] { }
    }
};

ContentstackResponse response = await client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID", "BRANCH_UID")
    .CreateAsync(variantData);
```

Defines the variant entry data, including entry fields and \_variant metadata. The \_variant object must include \_change\_set (list of field names to write) and \_order (field ordering).

Defines optional query parameters. When null, API defaults apply.

## Update

Updates the content of a specific entry variant.

```
Validation
Throws InvalidOperationException if no variant UID is set on the EntryVariant instance. Pass the target variant UID to .Variant(uid) before calling Update.
Behavior
Delegates to Create internally and sends a PUT request to /content_types/{contentTypeUid}/entries/{entryUid}/variants/{variantUid}. Returns the raw API response wrapped in ContentstackResponse.Both Create and Update send the same PUT request and produce identical behavior. Update() exists as a semantic alias for developers who prefer update-oriented workflows.Implementation and examples
The following example updates specific fields of an entry variant using _change_set.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");

var variantData = new
{
    entry = new
    {
        title = "UPDATED_TITLE",
        url = "UPDATED_URL"
    },
    _variant = new
    {
        _change_set = new[] { "title", "url" },
        _order = new string[] { }
    }
};

ContentstackResponse response = client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID")
    .Update(variantData);The following example updates variant content scoped to a specific branch.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");

var variantData = new
{
    entry = new
    {
        title = "UPDATED_TITLE",
        url = "UPDATED_URL"
    },
    _variant = new
    {
        _change_set = new[] { "title", "url" },
        _order = new string[] { }
    }
};

ContentstackResponse response = client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID", "BRANCH_UID")
    .Update(variantData);
```

Defines the updated variant entry data, including entry fields and \_variant metadata. Use \_change\_set to list the fields to overwrite.

Defines optional query parameters. When null, API defaults apply.

## UpdateAsync

Updates the content of a specific entry variant asynchronously.

```
Validation
Throws InvalidOperationException if no variant UID is set on the EntryVariant instance. Pass the target variant UID to .Variant(uid) before calling UpdateAsync.
Behavior
Delegates to CreateAsync internally and sends a PUT request to /content_types/{contentTypeUid}/entries/{entryUid}/variants/{variantUid} asynchronously. Returns the raw API response wrapped in ContentstackResponse.Both CreateAsync and UpdateAsync are functionally identical. UpdateAsync is a semantic alias for update workflows.Implementation and examples
The following example updates specific fields of an entry variant asynchronously.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");

var variantData = new
{
    entry = new
    {
        title = "UPDATED_TITLE",
        url = "UPDATED_URL"
    },
    _variant = new
    {
        _change_set = new[] { "title", "url" },
        _order = new string[] { }
    }
};

ContentstackResponse response = await client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID")
    .UpdateAsync(variantData);The following example updates variant content asynchronously, scoped to a specific branch.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("AUTH_TOKEN");

var variantData = new
{
    entry = new
    {
        title = "UPDATED_TITLE",
        url = "UPDATED_URL"
    },
    _variant = new
    {
        _change_set = new[] { "title", "url" },
        _order = new string[] { }
    }
};

ContentstackResponse response = await client
    .Stack("API_KEY")
    .ContentType("CONTENT_TYPE_UID")
    .Entry("ENTRY_UID")
    .Variant("VARIANT_UID", "BRANCH_UID")
    .UpdateAsync(variantData);
```

Defines the updated variant entry data, including entry fields and \_variant metadata. Use \_change\_set to list the fields to overwrite.

Defines optional query parameters. When null, API defaults apply.

## DeployModel

Assets/Entries deploy model

Deploy action the the entry.

Environment on which deploy assets/entries.

List of locales for deployment.

Set date for future deployment.

## DeployModel | .NET Management SDK | Contentstack

DeployModel defines the structure used to deploy assets and entries in Contentstack.

## Entry

An entry is an actual piece of content that you want to publish. You can create entries only for content types that have already been created.

## Create

The Create an entry call creates a new entry for the selected content type.

```
To create an entry, you need to prepare a custom model class that represents the entry's request body. To do so, create a separate EntryModel.cs file and add your custom EntryModel class, implementing IEntry interface, as follows:
using Contentstack.Management.Core.Abstractions;
using System.Text.Json.Serialization;
namespace TestModels
{
	public class EntryModel : IEntry
    {
		public EntryModel()
		{
		}

        [JsonPropertyName("title")]
        public string Title { get; set; } = "";

        [JsonPropertyName("url")]
        public string URL { get; set; } = "";

        [JsonPropertyName("uid")]
        public string Uid { get; set; } = "";

    }
}
Next, you need to set the data to the model. Here’s how you can do that:
EntryModel entryModel = new EntryModel()
{
    Title = "Your Entry Title",
    URL = "path/yoururl.com/example",
};
The code below illustrates how to create an entry:
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry().Create(model);
```

IEntry for creating entry.

Query parameter collection

## CreateAsync

The Create an entry call creates a new entry for the selected content type.

```
To create an entry, you need to prepare a custom model class that represents the entry's request body. To do so, create a separate EntryModel.cs file and add your custom EntryModel class, implementing IEntry interface, as follows:
using Contentstack.Management.Core.Abstractions;
using System.Text.Json.Serialization;
namespace TestModels
{
	public class EntryModel : IEntry
    {
		public EntryModel()
		{
		}

        [JsonPropertyName("title")]
        public string Title { get; set; } = "";

        [JsonPropertyName("url")]
        public string URL { get; set; } = "";

        [JsonPropertyName("uid")]
        public string Uid { get; set; } = "";

    }
}Next, you need to set the data to the model. Here’s how you can do that:
EntryModel entryModel = new EntryModel()
{
    Title = "Your Entry Title",
    URL = "path/yoururl.com/example",
};The code below illustrates how to update an entry
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry().CreateAsync(model);
```

IEntry for creating entry.

Query parameter collection

## Delete

The Delete Entry call deletes an existing entry and all the entries within it.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Delete();
```

Query parameter.

## DeleteAsync

The Delete Entry call deletes an existing entry and all the entries within it.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").DeleteAsync();
```

Query parameter.

## DeleteMultipleLocal

The Delete Locale will delete specific localized entries by passing the locale codes.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> locales = new List<string>(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").DeleteMultipleLocal(locales);
```

Enter the code of the language to unlocalize the entry of that particular language.

## DeleteMultipleLocalAsync

The Delete Locale will delete specific localized entries by passing the locale codes.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> locales = new List<string>(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").DeleteMultipleLocalAsync(locales);
```

Enter the code of the language to unlocalize the entry of that particular language.

## Export

The Export an entry call is used to export an entry. The exported entry data is saved in a downloadable JSON file.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Export("PATH/TO/FILE");
```

Path to file you want to export entry.

Query parameter.

## Fetch

The Fetch a single entry call returns information of a specific content type.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Fetch();
```

Query parameter.

## FetchAsync

The Fetch a single entry call returns information of a specific content type.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").FetchAsync();
```

Query parameter.

## Import

The Import an entry call is used to import an entry. To import an entry, you need to upload a JSON file that has entry data in the format that fits the schema of the content type it is being imported to.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Import("PATH/TO/FILE");
```

Path to file you want to import.

Query parameter.

## ImportAsync

The Import an entry call is used to import an entry. To import an entry, you need to upload a JSON file that has entry data in the format that fits the schema of the content type it is being imported to.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").ImportAsync("PATH/TO/FILE");
```

Path to file you want to import.

Query parameter.

## Locales

The Get languages of an entry call returns the details of all the languages that an entry exists in.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Locales();
```

## LocalesAsync

The Get languages of an entry call returns the details of all the languages that an entry exists in.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").LocalesAsync();
```

## Localize

The Localize an entry request allows you to localize an entry i.e., the entry will cease to fetch data from its fallback language and possess independent content specific to the selected locale.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Localize(model, "hi-in");
```

Localized IEntry model.

Enter the code of the language to unlocalize the entry of that particular language.

## LocalizeAsync

The Localize an entry request allows you to localize an entry i.e., the entry will cease to fetch data from its fallback language and possess independent content specific to the selected locale.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").LocalizeAsync(model, "hi-in");
```

Localized IEntry model.

Enter the code of the language to unlocalize the entry of that particular language.

## Publish

The Publish an entry request lets you publish an entry either immediately or schedule it for a later date/time.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Publish(details, "en-us", apiVersion: "3.2");
```

Publish details for publishing entry.

Locale for which entry to be published.

API version to pass in headers. Pass the value 3.2 to use latest Publish API.

## PublishAsync

The Publish an entry request lets you publish an entry either immediately or schedule it for a later date/time.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").PublishAsync(details, "en-us", apiVersion: "3.2");
```

Publish details for publishing entry.

Locale for which entry to be published.

API version to pass in headers. Pass the value 3.2 to use latest Publish API.

## PublishRequest

This multipurpose request allows you to either send a publish request or accept/reject a received publish request.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryPublishAction model = new EntryPublishAction();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").PublishRequest(model);
```

EntryPublishAction for setting entry to publish request.

Query parameter.

## PublishRequestAsync

This multipurpose request allows you to either send a publish request or accept/reject a received publish request.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryPublishAction model = new EntryPublishAction();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").PublishRequestAsync(model);
```

EntryPublishAction for setting entry to publish request.

Query parameter.

## Query

The Query on Entry will allow to fetch details of all or specific Content Type.

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

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

## References

The Get references of an entry call returns all the entries of content types that are referenced by a particular entry.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").References();
```

## ReferencesAsync

The Get references of an entry call returns all the entries of content types that are referenced by a particular entry.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").ReferencesAsync();
```

## SetWorkflow

The Set Entry Workflow Stage request allows you to either set a particular workflow stage of an entry or update the workflow stage details of an entry.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryWorkflowStage model = new EntryWorkflowStage();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").SetWorkflow(model);
```

EntryWorkflowStage object for setting entry to workflow stage.

Query parameter.

## SetWorkflowAsync

The Set Entry Workflow Stage request allows you to either set a particular workflow stage of an entry or update the workflow stage details of an entry.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryWorkflowStage model = new EntryWorkflowStage();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").SetWorkflowAsync(model);
```

EntryWorkflowStage object for setting entry to workflow stage.

Query parameter.

## Unlocalize

The Unlocalize an entry request is used to unlocalize an existing entry.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Unlocalize("hi-in");
```

Enter the code of the language to unlocalize the entry of that particular language.

## UnlocalizeAsync

The Unlocalize an entry request is used to unlocalize an existing entry.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").UnlocalizeAsync("hi-in");
```

Enter the code of the language to unlocalize the entry of that particular language.

## Unpublish

The Unpublish an entry call will unpublish an entry at once, and also, gives you the provision to unpublish an entry automatically at a later date/time.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Unpublish(details, "en-us", apiVersion: "3.2");
```

Publish details for un-publishing entry.

Locale for which entry to be un-published.

API version to pass in headers. Pass the value 3.2 to use latest Unpublish API.

## UnpublishAsync

The Unpublish an entry call will unpublish an entry at once, and also, gives you the provision to unpublish an entry automatically at a later date/time.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishUnpublishDetails details = new PublishUnpublishDetails();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").UnpublishAsync(details, "en-us", apiVersion: "3.2");
```

Publish details for un-publishing entry.

Locale for which entry to be un-published.

API version to pass in headers. Pass the value 3.2 to use latest Unpublish API.

## Update

The Update Entry call is used to update the content of an existing entry.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("ENTRY_UID").Update(model);
```

IEntry for updating entry.

Query parameter collection

## UpdateAsync

The Update Entry call is used to update the content of an existing entry.

```
To update an entry, you need to prepare a custom model class that represents the entry's request body. To do so, create a separate EntryModel.cs file and add your custom EntryModel class, implementing IEntry interface, as follows:
using Contentstack.Management.Core.Abstractions;
using System.Text.Json.Serialization;
namespace TestModels
{
	public class EntryModel : IEntry
    {
		public EntryModel()
		{
		}

        [JsonPropertyName("title")]
        public string Title { get; set; } = "";

        [JsonPropertyName("url")]
        public string URL { get; set; } = "";

        [JsonPropertyName("uid")]
        public string Uid { get; set; } = "";

    }
}Next, you need to set the data to the model. Here’s how you can do that:
EntryModel entryModel = new EntryModel()
{
    Title = "Your Entry Title",
    URL = "path/yoururl.com/example",
};The code below illustrates how to update an entry
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
EntryModel model = new EntryModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("ENTRY_UID").UpdateAsync(model);
```

IEntry for updating entry.

Query parameter collection

## Version

The Version on Entry will allow to fetch all version, delete specific version or naming the asset version.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Version version = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry().Version();
```

Version number for the entry.

## Entry | .NET Management SDK | Contentstack

Entry represents an actual piece of content you publish, created from a content type that already exists in your stack.

## EntryPublishAction

Publish action for the entry release.

Publish action the the entry.

Comment for the publish action.

Status for the publish action.

Set true to notify the action details.

Publish action uid.

## EntryPublishAction | .NET Management SDK | Contentstack

EntryPublishAction defines the publish action applied to an entry within a release.

## EntryWorkflowStage

A workflow lets you manage the stages through which your content will move in the content creation process.

List of assigned roles for the workflow stage.

List of users assigned to the workflow stage.

Comment for the workflow stage.

Due date for the workflow stage.

Set true to notify the workflow users.

Workflow stage uid.

## EntryWorkflowStage | .NET Management SDK | Contentstack

EntryWorkflowStage represents a workflow stage that manages how content moves through the content creation process.

## 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.

## EnvironmentModel

Environment model for creating or updating the environment.

Set true to deploying the content for the environment.

Name for the environment.

List of servers for the Environment.

List of locale urls for the environment.

## EnvironmentModel | .NET Management SDK | Contentstack

EnvironmentModel provides the structure used to create or update an environment in Contentstack.

## Extension

Extensions let you create custom fields and custom widgets that lets you customize Contentstack default UI and behavior.

## Create

The Create is used to create a custom field, custom-widget, dashboard widget to the Stack.

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

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

Extension model for creating the Extension.

## CreateAsync

The Create is used to create a custom field, custom-widget, dashboard widget to the Stack.

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

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

Extension model for creating the Extension.

## Delete

The Delete extension call will delete an existing extension from the stack.

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

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

## DeleteAsync

The Delete extension call will delete an existing extension from the stack.

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

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

## Fetch

The Get an extension call returns comprehensive information about a specific extension of a stack.

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

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

Query parameter collection.

## FetchAsync

The Get an extension call returns comprehensive information about a specific extension of a stack.

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

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

Query parameter collection.

## Query

The Query on Extension will allow to fetch details of all Extensions.

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

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

## Update

The Update extension call will update an existing extension on the stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ExtensionModel model = new ExtensionModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Extension("<EXTENSION_UID>").Update(model);
```

Extension model for updating the Extension.

Query parameter collection

## UpdateAsync

The Update extension call will update an existing extension on the stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ExtensionModel model = new ExtensionModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Extension("<EXTENSION_UID>").UpdateAsync(model);
```

Extension model for updating the Extension.

Query parameter collection

## Upload

The Upload request is used to upload a new custom-field, custom-widget, dashboard widget to the Stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
CustomFieldModel model = new CustomFieldModel("FILE_PATH", "FILE_CONTENT_TYPE", "TITLE", "DATA_TYPE");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Extension().Upload(model);
```

IExtensionInterface with details for uploading the extension.

## UploadAsync

The Upload request is used to upload a new custom-field, custom-widget, dashboard widget to the Stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
CustomFieldModel model = new CustomFieldModel("FILE_PATH", "FILE_CONTENT_TYPE", "TITLE", "DATA_TYPE");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Extension().UploadAsync(model);
```

IExtensionInterface with details for uploading the extension.

## Extension | .NET Management SDK | Contentstack

Extension lets you create custom fields and widgets to tailor Contentstack's default UI and behavior to your needs.

## ExtensionModel

Extension model for creating or updating extensions.

Config for the extension.

DataType for the extension.

Set true for multiple extension.

Scope for the extension.

Source code for the extension.

Doc for the extension.

List of tags to be added to extension.

Extension title for giving name to extension.

Extension type like custom field, widget, or dashboard.

## ExtensionModel | .NET Management SDK | Contentstack

ExtensionModel provides the structure used to create or update extensions in Contentstack.

## ExtensionScope

Scope model for adding scope to the extensions.

List of content type for extension scope

## ExtensionScope | .NET Management SDK | Contentstack

ExtensionScope defines the scope model used to assign scope to extensions in Contentstack.

## Folder

Model to create or update label.

## Create

The Create a folder call is used to create an asset folder and/or add a parent folder to it.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset().Folder().Create("<FOLDER_NAME>");
```

Name for folder to be updated to.

Parent uid for the folder to be moved.

## CreateAsync

The Create a folder call is used to create an asset folder and/or add a parent folder to it.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset().Folder().CreateAsync("<FOLDER_NAME>");
```

Name for folder to be updated to.

Parent uid for the folder to be moved.

## Delete

The Delete a folder call is used to delete an asset folder along with all the assets within that folder.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset().Folder("<ASSET_UID>").Delete(model);
```

Query parameter collection.

## DeleteAsync

The Delete a folder call is used to delete an asset folder along with all the assets within that folder.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset().Folder("<ASSET_UID>").DeleteAsync(model);
```

Query parameter collection.

## Fetch

The Get a single folder call gets the comprehensive details of a specific asset folder by means of folder UID.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset().Folder("<ASSET_UID>").Fetch(model);
```

Query parameter collection.

## FetchAsync

The Get a single folder call gets the comprehensive details of a specific asset folder by means of folder UID.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset().Folder("<ASSET_UID>").FetchAsync(model);
```

Query parameter collection.

## Update

The Update or move folder request can be used either to update the details of a folder or set the parent folder if you want to move a folder under another folder.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset().Folder("<ASSET_UID>").Update("<FOLDER_NAME>");
```

Name for folder to be updated to.

Parent uid for the folder to be moved.

## UpdateAsync

The Update or move folder request can be used either to update the details of a folder or set the parent folder if you want to move a folder under another folder.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset().Folder("<ASSET_UID>").UpdateAsync("<FOLDER_NAME>");
```

Name for folder to be updated to.

Parent uid for the folder to be moved.

## Folder | .NET Management SDK | Contentstack

Folder provides the model used to create or update a folder for organizing content in Contentstack.

## GlobalField

You can define a Global Field as a reusable field (or a group of fields) that you define once and use in any content type within your stack.

**Note:** To enable nested global fields, pass api\_version: 3.2 when initializing the Global Field object.

## Create

The Create global field with JSON RTE request shows you how to add a JSON RTE field while creating a global field.

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

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

Content Model for updating GlobalField.

Query parameter collection.

## CreateAsync

The Create global field with JSON RTE request shows you how to add a JSON RTE field while creating a global field.

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

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

Content Model for updating GlobalField.

Query parameter collection.

## Delete

The Delete Content Type call deletes an existing global field and all the entries within it.

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

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

Query parameter collection.

## DeleteAsync

The Delete Content Type call deletes an existing global field and all the entries within it.

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

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

Query parameter collection.

## Fetch

The Fetch a single global fieldcall returns information of a specific global field.

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

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

Query parameter collection.

## FetchAsync

The Fetch a single global fieldcall returns information of a specific global field.

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

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

Query parameter collection.

## Query

The Query on Global Field will allow to fetch details of all or specific Content Type.

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

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

## Update

The Update Content Type call is used to update the schema of an existing global field.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModeling model = new ContentModeling();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").GlobalField("<GLOBAL_FIELD_UID>").Update(model);
```

Content Model for updating GlobalField.

Query parameter collection.

## UpdateAsync

The Update Content Type call is used to update the schema of an existing global field.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentModeling model = new ContentModeling();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").GlobalField("<GLOBAL_FIELD_UID>").UpdateAsync(model);
```

Content Model for updating GlobalField.

Query parameter collection.

## GlobalField | .NET Management SDK | Contentstack

GlobalField defines a reusable field or group of fields you create once and use across any content type in your stack.

## Label

Labels are similar to folders that allow increased flexibility over your Content Types. Labels allow you to categorize and organize the existing content types of your stack.

## Create

The Create used to create a label.

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

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

Label Model for updating label.

Query parameter collection.

## CreateAsync

The Create used to create a label.

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

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

Label Model for updating label.

Query parameter collection.

## Delete

The Delete label call is used to delete a specific label.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Label("<LABEL_UID>").Delete();
```

Query parameter collection.

## DeleteAsync

The Delete label call is used to delete a specific label.

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

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

Query parameter collection.

## Fetch

The Fetch a single label call returns information about a particular label of a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Label("<LABEL_UID>").Fetch();
```

Query parameter collection.

## FetchAsync

The Fetch a single label call returns information about a particular label of a stack.

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

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

Query parameter collection.

## Query

The Query on Label This call fetches all the existing labels of the stack.

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

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

## Update

The Update label call is used to update an existing label.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
LabelMode model = new LabelMode();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Label("<LABEL_UID>").Update(model);
```

Label Model for updating label.

Query parameter collection.

## UpdateAsync

The Update label call is used to update an existing label.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
LabelMode model = new LabelMode();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Label("<LABEL_UID>").UpdateAsync(model);
```

Label Model for updating label.

Query parameter collection.

## Label | .NET Management SDK | Contentstack

Label works like a folder, letting you categorize and organize the existing content types within your stack for greater flexibility.

## LabelModel

Model to create or update label.

List of content type to be added in label.

Name for the Label to be created/updated.

## LabelModel | .NET Management SDK | Contentstack

LabelModel provides the structure used to create or update a label in Contentstack.

## Locale

## CreateAsync

This call lets you add a new language to your stack. You can either add a supported language or a custom language of your choice.

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

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

Locale Model for creating locale.

Query parameter collection.

## Delete

The Delete language call deletes an existing language from your stack.

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

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

Query parameter collection.

## DeleteAsync

The Delete language call deletes an existing language from your stack.

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

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

Query parameter collection.

## Fetch

The Get a language call returns information about a specific language available on the stack.

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

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

Query parameter collection.

## FetchAsync

The Get a language call returns information about a specific language available on the stack.

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

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

Query parameter collection.

## Query

The Query on locale allow to get the list of all languages (along with the language codes) available for a stack.

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

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

## Update

The Update language call will let you update the details (such as display name) and the fallback language of an existing language of your stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
LocaleModel model = new LocaleModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Locale("LOCALE_CODE>").Update(model);
```

Locale Model for creating locale.

Query parameter collection.

## UpdateAsync

The Update language call will let you update the details (such as display name) and the fallback language of an existing language of your stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
LocaleModel model = new LocaleModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Locale("LOCALE_CODE>").UpdateAsync(model);
```

Locale Model for creating locale.

Query parameter collection.

## LocaleModel

Locale Name

Locale code for creating or updating the locale

Fallback locale to fallback when entry is not present in current locale

## LocalesUrl

## Option

## Organization

Organization is the top-most entity in the hierarchy of entities in Contentstack. Users, stacks—and consequently, the resources within the stacks—are part of an Organization. As a result, an Organization lets you manage users and stacks from one administrative panel.

## AddUser

The Add users to organization call allows you to send invitations to add users to your organization. Only the owner or the admin of the organization can add users.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Email = "<EMAIL>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>")
.AddUser(
new System.Collections.Generic.List<UserInvitation>()
    {
        invitation
    },
 new Dictionary<string, List<UserInvitation>> ()
    {
          "<STACK_UID>"= invitation
    }
 );
```

List of User invitation.

Stack Uid with user invitation details.

## AddUserAsync

The Add users to organization call allows you to send invitations to add users to your organization. Only the owner or the admin of the organization can add users.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Email = "<EMAIL>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>")
.AddUserAsync(
new System.Collections.Generic.List<UserInvitation>()
    {
        invitation
    },
 new Dictionary<string, List<UserInvitation>> ()
    {
          "<STACK_UID>"= invitation
    }
 );
```

List of User invitation.

Stack Uid with user invitation details.

## GetInvitations

The Get all organization invitations call gives you a list of all the Organization invitations.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").GetInvitations();
```

Query Parameter collection

## GetInvitationsAsync

The Get all organization invitations call gives you a list of all the Organization invitations.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").GetInvitationsAsync();
```

Query Parameter collection

## GetOrganizations

The Get all/single organizations call lists all organizations related to the system user in the order that they were created.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization().GetOrganizations();
```

Query Parameter collection

## GetOrganizationsAsync

The Get all/single organizations call lists all organizations related to the system user in the order that they were created.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization().GetOrganizationsAsync();
```

Query Parameter collection

## GetStacks

The get Stacks call gets all the Stack within the Organization.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").GetStacks();
```

Query Parameter collection

## GetStacksAsync

The get Stacks call gets all the Stack within the Organization.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").GetStacksAsync();
```

Query Parameter collection

## RemoveUser

The Remove users from organization request allows you to remove existing users from your organization.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").RemoveUser(new List() { "<EMAIL>" });
```

List of emails to be remove from the Organization.

## RemoveUserAsync

The Remove users from organization request allows you to remove existing users from your organization.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").RemoveUserAsync(new List() { "<EMAIL>" });
```

List of emails to be remove from the Organization.

## ResendInvitation

The Resend pending organization invitation call allows you to resend Organization invitations to users who have not yet accepted the earlier invitation. Only the owner or the admin of the Organization can resend the invitation to add users to an Organization.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").ResendInvitation("<SHARE_UID>");
```

Uid for share invitation send to user.

## ResendInvitationAsync

The Resend pending organization invitation call allows you to resend Organization invitations to users who have not yet accepted the earlier invitation. Only the owner or the admin of the Organization can resend the invitation to add users to an Organization.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").ResendInvitationAsync("<SHARE_UID>");
```

Uid for share invitation send to user.

## Roles

The Get all roles in an organization call gives the details of all the roles that are set to users in an Organization.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").Roles();
```

Query Parameter collection

## RolesAsync

The Get all roles in an organization call gives the details of all the roles that are set to users in an Organization.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").RolesAsync();
```

Query Parameter collection

## TransferOwnership

The Transfer organization ownership call transfers the ownership of an Organization to another user.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").TransferOwnership("<EMAIL>");
```

The email id of user for transfer.

## TransferOwnershipAsync

The Transfer organization ownership call transfers the ownership of an Organization to another user.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").TransferOwnershipAsync("<EMAIL>");
```

The email id of user for transfer.

## Organization | .NET Management SDK | Contentstack

Organization is the top-most entity in Contentstack, letting you manage users and stacks together from a single administrative panel.

## PublishQueue

When the Content Manager publishes an entry and/or asset, the system puts the action into a publish queue. Publish/unpublish activities in this queue are performed one at a time, almost at a high speed.

## Cancel

The Cancel Scheduled Action request will allow you to cancel any scheduled publishing or unpublishing activity of entries and/or assets and also cancel the deployment of releases.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").PublishQueue("<PUBLISH_QUEUE_UID>").Cancel();
```

Query parameter collection

## CancelAsync

The Cancel Scheduled Action request will allow you to cancel any scheduled publishing or unpublishing activity of entries and/or assets and also cancel the deployment of releases.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").PublishQueue("<PUBLISH_QUEUE_UID>").CancelAsync();
```

Query parameter collection

## Fetch

The Get publish queue activity request returns comprehensive information on a specific publish, unpublish, or delete action that was performed on an entry and/or asset. You can also retrieve details of a specific release deployment.

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

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

Query parameter collection

## FetchAsync

The Get publish queue activity request returns comprehensive information on a specific publish, unpublish, or delete action that was performed on an entry and/or asset. You can also retrieve details of a specific release deployment.

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

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

Query parameter collection

## FindAll

The Get publish queue request returns comprehensive information on activities such as publish, unpublish, and delete that have performed on entries and/or assets. This request also includes the details of the release deployments in the response body.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").PublishQueue().FindAll();
```

Query parameter collection

## FindAllAsync

The Get publish queue request returns comprehensive information on activities such as publish, unpublish, and delete that have performed on entries and/or assets. This request also includes the details of the release deployments in the response body.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").PublishQueue().FindAllAsync();
```

Query parameter collection

## PublishQueue | .NET Management SDK | Contentstack

PublishQueue tracks publish and unpublish actions, processing each queued entry or asset one at a time at high speed.

## PublishRule

Publish Rules are conditions that you define for your content publishing. It allows you to govern whether entries can be published with or without someone’s approval or only when the content is at a particular stage.

## Create

The Create Publish Rules request allows you to create publish rules for the workflow of a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishRuleModel model = new PublishRuleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule().CreateAsync(model);
```

PublishRule Model for creating rule.

Query parameter collection.

## CreateAsync

The Create Publish Rules request allows you to create publish rules for the workflow of a stack.

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

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

PublishRule Model for creating rule.

Query parameter collection.

## Delete

The Delete Publish Rules request allows you to delete an existing publish rule.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").Delete();
```

Query parameter collection

## DeleteAsync

The Delete Publish Rules request allows you to delete an existing publish rule.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").DeleteAsync();
```

Query parameter collection

## Fetch

The fetch Publish Rule request retrieves the comprehensive details of a specific publish rule of a Workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").Fetch();
```

Query parameter collection

## FetchAsync

The fetch Publish Rule request retrieves the comprehensive details of a specific publish rule of a Workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").FetchAsync();
```

Query parameter collection

## FindAll

The Get all Publish Rules request retrieves the details of all the Publish rules of a workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule().FindAll();
```

Query parameter collection

## FindAllAsync

The Get all Publish Rules request retrieves the details of all the Publish rules of a workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().PublishRule().FindAllAsync();
```

Query parameter collection

## Update

The Update Publish Rules request allows you to add a publish rule or update the details of the existing publish rules of a workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishRuleModel model = new PublishRuleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").Update(model);
```

PublishRule Model for updating Content Type.

Query parameter collection.

## UpdateAsync

The Update Publish Rules request allows you to add a publish rule or update the details of the existing publish rules of a workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishRuleModel model = new PublishRuleModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").UpdateAsync(model);
```

PublishRule Model for updating Content Type.

Query parameter collection.

## PublishRule | .NET Management SDK | Contentstack

PublishRule defines conditions governing content publishing, controlling whether entries require approval or a specific workflow stage.

## PublishRuleModel

Set rules for publishing entry/asset.

Set list action for publishing rules.

Approval details for publish rule

List of branches for the publish rule to be applied.

List of content types the publish rule to be applied.

Set true to disable approvals.

Set environment for the publish rule

Set locale for the publish rules.

Set workflow stage uid for the publish rules.

Set workflow uid for the publish rules.

## PublishRuleModel | .NET Management SDK | Contentstack

PublishRuleModel defines the structure used to set rules for publishing an entry or asset.

## PublishUnpublishDetails

Publish rule details for publish or un-publish entry or asset

List of environment for publishing/un-publishing entry/asset.

List of locales for the publish details.

Set date time for scheduling the publish/un-publish.

Set specific version for publish/un-publish.

## PublishUnpublishDetails | .NET Management SDK | Contentstack

PublishUnpublishDetails holds the publish rule details used when publishing or unpublishing an entry or asset.

## Release

You can define a “Release” as a set of entries and assets that needs to be deployed (published or unpublished) all at once to a particular environment.

## Clone

The Clone request allows you to clone (make a copy of) a specific Release in a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Clone("<NAME>", "<DESCRIPTION>");
```

Name for the release to be cloned.

Description for the release to be cloned.

## CloneAsync

The Clone request allows you to clone (make a copy of) a specific Release in a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").CloneAsync("<NAME>", "<DESCRIPTION>");
```

Name for the release to be cloned.

Description for the release to be cloned.

## Create

The Create request allows you to create a new Release in your stack. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

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

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

Release Model for creating ReleaseModel.

Query parameter collection.

## CreateAsync

The Create request allows you to create a new Release in your stack. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

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

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

Release Model for creating ReleaseModel.

Query parameter collection.

## Delete

The Delete request allows you to delete a specific Release from a stack.

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

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

Query parameter collection.

## DeleteAsync

The Delete request allows you to delete a specific Release from a stack.

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

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

Query parameter collection.

## Deploy

The Fetch request gets the details of a specific Release in a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
DeployModel model = new DeployModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Deploy(model);;
```

DeployModel details to deploy the release.

## DeployAsync

The Fetch request gets the details of a specific Release in a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
DeployModel model = new DeployModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").DeployAsync(model);;
```

DeployModel details to deploy the release.

## Fetch

The Fetch request gets the details of a specific Release in a stack.

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

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

Query parameter collection.

## FetchAsync

The Fetch request gets the details of a specific Release in a stack.

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

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

Query parameter collection.

## Item

The list of all items (entries and assets) that are part of a specific Release.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItem item = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item();
```

## Query

The Query on ReleaseModel request retrieves a list of all Releases of a stack along with details of each Release.

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

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

## Update

The Update call allows you to update the details of a Release, i.e., the ‘name’ and ‘description’.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseModel model = new ReleaseModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Update(model);
```

Release Model for creating ReleaseModel.

Query parameter collection.

## UpdateAsync

The Update call allows you to update the details of a Release, i.e., the ‘name’ and ‘description’.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseModel model = new ReleaseModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").UpdateAsync(model);
```

Release Model for creating ReleaseModel.

Query parameter collection.

## Release | .NET Management SDK | Contentstack

Release groups a set of entries and assets that you publish or unpublish together to a specific environment in a single deployment.

## ReleaseItem

ReleaseItem for create or update release items.

## Create

The Create request allows you to add an item (entry or asset) to a Release. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().Create(model);
```

ReleaseItem Model for creating ReleaseItem.

Query parameter collection

## CreateAsync

The Create request allows you to add an item (entry or asset) to a Release. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().CreateAsync(model);
```

ReleaseItem Model for creating ReleaseItem.

Query parameter collection

## CreateMultiple

The Create request allows you to add multiple items (entries and/or assets) to a Release. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
List<ReleaseItemModel> models = new List<ReleaseItemModel>()
{
    model,
};
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().CreateMultiple(models);
```

List of ReleaseItem Model for creating ReleaseItem.

Query parameter collection

## CreateMultipleAsync

The Create request allows you to add multiple items (entries and/or assets) to a Release. To add entries/assets to a Release, you need to provide the UIDs of the entries/assets in ‘items’ in the request body.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
List<ReleaseItemModel> models = new List<ReleaseItemModel>()
{
    model,
};
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().CreateMultipleAsync(models);
```

List of ReleaseItem Model for creating ReleaseItem.

Query parameter collection

## Delete

The Delete request deletes one or more items (entries and/or assets) from a specific Release.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
List<ReleaseItemModel> models = new List<ReleaseItemModel>()
{
    model,
};
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item("<RELEASE_ITEM_UID>").Delete(models);
```

List of ReleaseItemModel to be deleted.

Query parameter collection

## DeleteAsync

The Delete request deletes one or more items (entries and/or assets) from a specific Release.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ReleaseItemModel model = new ReleaseItemModel();
List<ReleaseItemModel> models = new List<ReleaseItemModel>()
{
    model,
};
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item("<RELEASE_ITEM_UID>").DeleteAsync(models);
```

List of ReleaseItemModel to be deleted.

Query parameter collection

## GetAll

The Get all request retrieves a list of all items (entries and assets) that are part of a specific Release.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().GetAll();
```

Query parameter collection

## GetAllAsync

The Get all request retrieves a list of all items (entries and assets) that are part of a specific Release.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().GetAllAsync();
```

Query parameter collection

## UpdateReleaseItem

The Update Release items to their latest versions request let you update all the release items (entries and assets) to their latest versions before deployment.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> items = new List<string>(){
  "<$all>"
}
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().UpdateReleaseItem(model);
```

Release items to update or "$all" for updating all release items.

## UpdateReleaseItemAsync

The Update Release items to their latest versions request let you update all the release items (entries and assets) to their latest versions before deployment.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
List<string> items = new List<string>(){
  "<$all>"
}
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Release("<RELEASE_UID>").Item().UpdateReleaseItemAsync(items);
```

Release items to update or "$all" for updating all release items.

## ReleaseItem | .NET Management SDK | Contentstack

ReleaseItem lets you create or update the items included in a release in the .NET Management SDK.

## ReleaseItemModel

ReleaseItemModel for create or update release.

Entry or asset uid.

Release item action.

Entry content type uid

Entry locale

Entry version to be release.

## ReleaseItemModel | .NET Management SDK | Contentstack

ReleaseItemModel defines the structure of an item used when creating or updating a release.

## ReleaseModel

ReleaseModel for create or update release.

Release name to be set.

Release description to be set.

Set true to archive release

Set true to lock the release content.

## ReleaseModel | .NET Management SDK | Contentstack

ReleaseModel provides the structure used to create or update a release in Contentstack.

## Role

A Role is a collection of permissions that applies to all the users who are assigned to it. Using Roles, you can assign permissions to a group of users rather than assigning permissions individually.

## Create

The Create request creates a new role in a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Role("<ROLE_UID>").Create(model);
```

Role Model for creating Role.

Query parameter collection.

## CreateAsync

The Create request creates a new role in a stack.

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

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

Role Model for creating Role.

Query parameter collection.

## Delete

The Delete call deletes an existing role from your stack

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").Delete();
```

Query parameter collection.

## DeleteAsync

The Delete call deletes an existing role from your stack

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

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

Query parameter collection.

## Fetch

The Fetch request returns comprehensive information on a specific role.

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

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

Query parameter collection.

## FetchAsync

The Fetch request returns comprehensive information on a specific role.

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

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

Query parameter collection.

## Query

The Query on Role request returns comprehensive information about all roles created in a stack.

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

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

## Update

The Update request creates a new role in a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Role("<ROLE_UID>").UpdateAsync(model);
```

Role Model for creating Role.

Query parameter collection.

## UpdateAsync

The Update request creates a new role in a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").UpdateAsync(model);
```

Role Model for creating Role.

Query parameter collection.

## Rules

Base class for all rules in stack.

ACL for the rule

Set true to restrict rule.

## AssetRules

Rules for setting on Assets.

List of asset for adding into rule.

Modules for the rules to be applied.

## BranchAliasRules

Rules for setting on branch alias.

List of branch alias for adding into rule.

Modules for the rules to be applied.

## BranchRules

Rules for setting on branch.

List of branch for adding into rule.

Modules for the rules to be applied.

## ContentTypeRules

Rules for setting on content type.

List of content types for adding into rule.

Modules for the rules to be applied.

## EnvironmentRules

Rules for setting on environment.

List of environments for adding into rule.

Modules for the rules to be applied.

## FolderRules

Rules for setting on folders.

List of folders for adding into rule.

Modules for the rules to be applied.

## FieldRules

Rule for the field in content type.

List of action for the field rules.

List of conditions for the field rules.

Match type for the field.

## TaxonomyRules

Rule for the field in taxonomy.

List of Taxonomies for adding into rule

List of Terms for adding into rule.

List of TaxonomyContentType for adding into this rule

## Role | .NET Management SDK | Contentstack

Role is a collection of permissions assigned to users, letting you grant access to a group rather than configuring each user individually.

## RoleModel

RoleModel for create or update roles.

Role name to be set.

Role description to be set.

List of rules added to the role.

Set true to deploy the rule content.

## RoleModel | .NET Management SDK | Contentstack

RoleModel provides the structure used to create or update roles in Contentstack.

## Server

Server for the webhook

Server name.

## Server | .NET Management SDK | Contentstack

Server represents the server configuration used when defining a webhook in Contentstack.

## Stack

A stack is a repository or a container that holds all the content/assets of your site. It allows multiple users to create, edit, approve, and publish their content within a single space.

## AddSettings

The Add stack settings request lets you add additional settings for your existing stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>")
.AddSettings(settings);
```

Stack settings details.

## AddSettingsAsync

The Add stack settings request lets you add additional settings for your existing stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>")
.AddSettingsAsync(settings);
```

Stack settings details.

## Asset

Asset refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded in your Contentstack repository for future use.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Asset asset = client.stack("<API_KEY>").Asset("<UID>");
```

Optional, asset uid.

## AuditLog

A AuditLog displays a record of all the activities performed in a stack and helps you keep a track of all published items, updates, deletes, and current status of the existing content.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
AuditLog auditLog = client.stack("<API_KEY>").AuditLog("<UID>");
```

Optional, content type uid.

## ContentType

ContentType defines the structure or schema of a page or a section of your web or mobile property. To create content for your application, you are required to first create a content type, and then create entries using the content type.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentType contentType = client.stack("<API_KEY>").ContentType("<UID>");
```

Optional, content type uid.

## Create

The Create stack call creates a new stack in your Contentstack account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.Create("<STACK_NAME>", "<LOCALE>", "<ORG_UID>", "<DESCRIPTION>");
```

The name for Stack.

The Master Locale for Stack

The Organization Uid in which you want to create Stack.

The description for the Stack.

## CreateAsync

The Create stack call creates a new stack in your Contentstack account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.CreateAsync("<STACK_NAME>", "<LOCALE>", "<ORG_UID>", "<DESCRIPTION>");
```

The name for Stack.

The Master Locale for Stack

The Organization Uid in which you want to create Stack.

The description for the Stack.

## DeliveryToken

You can use DeliveryToken to authenticate Content Delivery API (CDA) requests and retrieve the published content of an environment.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
DeliveryToken deliveryToken = client.stack("<API_KEY>").DeliveryToken("<UID>");
```

Optional, delivery token uid.

## Environment

A publishing Environment corresponds to one or more deployment servers or a content delivery destination where the entries need to be published.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Environment environment = client.stack("<API_KEY>").Environment("<UID>");
```

Optional, extension uid.

## Extension

Extension let you create custom fields and custom widgets that lets you customize Contentstack's default UI and behavior.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Extension extension = client.stack("<API_KEY>").Extension("<UID>");
```

Optional, extension uid.

## Fetch

The Get a single stack call fetches comprehensive details of a specific stack.

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

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

Query parameter collection

## FetchAsync

The Get a single stack call fetches comprehensive details of a specific stack.

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

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

Query parameter collection

## GetAll

The Get all stacks call fetches the list of all stacks owned by and shared with a particular user account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack().GetAll();
```

Query parameter collection

## GetAllAsync

The Get all stacks call fetches the list of all stacks owned by and shared with a particular user account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack().GetAllAsync();
```

Query parameter collection

## GlobalField

A GlobalField is a reusable field (or group of fields) that you can define once and reuse in any content type within your stack. This eliminates the need (and thereby time and efforts) to create the same set of fields repeatedly in multiple content types.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
GlobalField globalField = client.stack("<API_KEY>").GlobalField("<UID>");
```

Optional, global field uid.

## Label

Label allow you to group a collection of content within a stack. Using labels you can group content types that need to work together.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Label label = client.stack("<API_KEY>").Label("<UID>");
```

Optional, label uid.

## Locale

Contentstack has a sophisticated multilingual capability. It allows you to create and publish entries in any language.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Locale locale = client.stack("<API_KEY>").Locale("<CODE>");
```

Optional, locale code.

## ManagementTokens

You can use ManagementToken to authenticate Content Management API (CMA) requests over your stack content.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ManagementToken managementTokens = client.stack("<API_KEY>").ManagementTokens("<UID>");
```

Optional, management uid.

## PublishQueue

A PublishQueue displays the historical and current details of activities such as publish, unpublish, or delete that can be performed on entries and/or assets. It also shows details of Release deployments. These details include time, entry, content type, version, language, user, environment, and status.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishQueue PublishQueue = client.stack("<API_KEY>").PublishQueue("<UID>");
```

Optional, publish queue uid.

## Release

A Release is a set of entries and assets that needs to be deployed (published or unpublished) all at once to a particular environment.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Release release = client.stack("<API_KEY>").Release("<UID>");
```

Optional, release uid.

## ResetSettings

The Reset stack settings call resets your stack to default settings, and additionally, lets you add parameters to or modify the settings of an existing stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.ResetSettings();
```

## ResetSettingsAsync

The Reset stack settings call resets your stack to default settings, and additionally, lets you add parameters to or modify the settings of an existing stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.ResetSettingsAsync();
```

## Role

A Role collection of permissions that will be applicable to all the users who are assigned this role.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Role role = client.stack("<API_KEY>").Role("<WORKFLOW_UID>");
```

Optional, role uid.

## Settings

The Get stack settings call retrieves the configuration settings of an existing stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.Settings();
```

## SettingsAsync

The Get stack settings call retrieves the configuration settings of an existing stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.SettingsAsync();
```

## Share

The Share a stack call shares a stack with the specified user to collaborate on the stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Email = "<EMAIL>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.Share(
  new List() {
      invitation
  }
);
```

User email to be shared stack access.

## ShareAsync

The Share a stack call shares a stack with the specified user to collaborate on the stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Email = "<EMAIL>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.ShareAsync(
  new List() {
      invitation
  }
);
```

List of user email with roles to be assign from Stack.

## TransferOwnership

The Transfer stack ownership to other users call sends the specified user an email invitation for accepting the ownership of a particular stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.TransferOwnership("<EMAIL>");
```

User email to transfer the stack ownership.

## TransferOwnershipAsync

The Transfer stack ownership to other users call sends the specified user an email invitation for accepting the ownership of a particular stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.TransferOwnershipAsync("<EMAIL>");
```

User email to transfer the stack ownership.

## UnShare

The Unshare a stack call unshares a stack with a user and removes the user account from the list of collaborators.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.UnShare("<EMAIL>");
```

User email to be removed from stack.

## UnShareAsync

The Unshare a stack call unshares a stack with a user and removes the user account from the list of collaborators.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.UnShareAsync("<EMAIL>");
```

User email to be removed from stack.

## Update

The Update stack call lets you update the name and description of an existing stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.Update("<STACK_NAME>", "<DESCRIPTION>");
```

The name for Stack.

The description for the Stack.

## UpdateAsync

The Update stack call lets you update the name and description of an existing stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.UpdateAsync("<STACK_NAME>", "<DESCRIPTION>");
```

The name for Stack.

The description for the Stack.

## UpdateUserRole

The Update User Role API Request updates the roles of an existing user account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Uid = "<USER_ID>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = client.stack("<API_KEY>")
.UpdateUserRole(
  new List<UserInvitation>() {
     invitation
  }
);
```

List of user and roles to be assigned in Stack.

## UpdateUserRoleAsync

The Update User Role API Request updates the roles of an existing user account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
UserInvitation invitation = new UserInvitation()
{
        Uid = "<USER_ID>",
        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }
};
ContentstackResponse contentstackResponse = await client.stack("<API_KEY>")
.UpdateUserRoleAsync(
  new List<UserInvitation>() {
     invitation
  }
);
```

List of user and roles to be assigned in Stack.

## Webhook

A Webhook a mechanism that sends real-time information to any third-party app or service to keep your application in sync with your Contentstack account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Webhook webhook = client.stack("<API_KEY>").Webhook("<UID>");
```

Optional, webhook uid.

## Workflow

A Workflow is a tool that allows you to streamline the process of content creation and publishing, and lets you manage the content lifecycle of your project smoothly.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Workflow workflow = client.stack("<API_KEY>").Workflow("<WORKFLOW_UID>");
```

Optional, workflow uid.

Stack API key.

Stack branch if present.

Stack management token.

## Stack | .NET Management SDK | Contentstack

Stack is the container holding all your site's content and assets, enabling multiple users to create, edit, approve, and publish within one space.

## StackSettings

Stack settings for adding custom settings.

DiscreteVariables to add in stack settings

Stack variables for adding into stack

## StackSettings | .NET Management SDK | Contentstack

StackSettings lets you define and manage custom configuration settings for a Contentstack stack.

## User

User session consists of calls that will help you to sign in and sign out of your Contentstack account.

## ForgotPassword

The Forgot password call sends a request for a temporary password to log in to an account in case a user has forgotten the login password.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.ForgotPassword("<EMAIL>");
```

The email for the account that user has forgotten the login password

## ForgotPasswordAsync

The Forgot password call sends a request for a temporary password to log in to an account in case a user has forgotten the login password.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.ForgotPasswordAsync("<EMAIL>");
```

The email for the account that user has forgotten the login password

## ResetPassword

The Reset password call sends a request for resetting the password of your Contentstack account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.ResetPassword("<RESET_TOKEN>", "<PASSWORD>", "<CONFIRM_PASSWORD>");
```

The reset password token send to email.

The password for the account.

The confirm password for the account.

## ResetPasswordAsync

The Reset password call sends a request for resetting the password of your Contentstack account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.ResetPasswordAsync("<RESET_TOKEN>", "<PASSWORD>", "<CONFIRM_PASSWORD>");
```

The reset password token send to email.

The password for the account.

The confirm password for the account.

## User | .NET Management SDK | Contentstack

User handles session calls that let you sign in and sign out of your Contentstack account in the .NET Management SDK.

## UserInvitation

User invitation model to invite user to stacks or organisations.

User email for invitation to be sent.

Roles from stack/organization to be assigned to user.

## UserInvitation | .NET Management SDK | Contentstack

UserInvitation is the model used to invite users to stacks or organizations in the .NET Management SDK.

## Version

Version naming allows you to assign a name to a version of an entry/asset for easy identification.

## Delete

The Delete Version Name of Entry/Asset request allows you to delete the name assigned to a specific version of an entry/asset. This request resets the name of the entry/asset version to the version number.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").Delete();
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").Delete();
```

Locale for the entry version to be deleted

## DeleteAsync

The Delete Version Name of Entry/Asset request allows you to delete the name assigned to a specific version of an entry/asset. This request resets the name of the entry/asset version to the version number.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").DeleteAsync();
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").DeleteAsync();
```

Locale for the entry version to be deleted

## GetAll

The Get Details of All Versions of an Entry request allows you to retrieve the details of all the versions of an entry.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").GetAll();
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").GetAll();
```

Query parameter collection

## GetAllAsync

The Get Details of All Versions of an Entry request allows you to retrieve the details of all the versions of an entry.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").GetAllAsync();
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").GetAllAsync();
```

Query parameter collection

## SetName

The Set Version Name for Entry/Asset request allows you to assign a name to a specific version of an entry/asset.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").SetName("<VERSION_NAME>");
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").SetName("<VERSION_NAME>");
```

Version name to be assigned to entry/asset.

Locale for the version.

Set true to force update the version name of the master entry.

## SetNameAsync

The Set Version Name for Entry/Asset request allows you to assign a name to a specific version of an entry/asset.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ContentType("<CONTENT_TYPE_UID>").Entry("<ENTRY_UID>").Version("<VERSION>").SetNameAsync("<VERSION_NAME>");
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Asset("<ASSET_UID>").Version("<VERSION>").SetNameAsync("<VERSION_NAME>");
```

Version name to be assigned to entry/asset.

Locale for the version.

Set true to force update the version name of the master entry.

## Version | .NET Management SDK | Contentstack

Version lets you assign a name to a version of an entry or asset for easy identification in the .NET Management SDK.

## Webhook

A webhook is a user-defined HTTP callback. It is a mechanism that sends real-time information to any third-party app or service.

## Create

The Create a webhook request allows you to create a new webhook in a specific stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WebhookModel model = new WebhookModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Create(model);
```

Webhook Model for creating Webhook.

Query parameter collection.

## CreateAsync

The Create a webhook request allows you to create a new webhook in a specific stack.

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

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

Webhook Model for creating Webhook.

Query parameter collection.

## Delete

The Delete webhook call deletes an existing webhook from a stack.

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

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

Query parameter collection.

## DeleteAsync

The Delete webhook call deletes an existing webhook from a stack.

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

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

Query parameter collection.

## Executions

The Get executions of a webhook request allows you to fetch the execution details of a specific webhook, which includes the execution UID.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Executions();
```

Query parameter collection.

## ExecutionsAsync

The Get executions of a webhook request allows you to fetch the execution details of a specific webhook, which includes the execution UID.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").ExecutionsAsync();
```

Query parameter collection.

## Fetch

The Fetch webhook request returns comprehensive information on a specific webhook.

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

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

Query parameter collection.

## FetchAsync

The Fetch webhook request returns comprehensive information on a specific webhook.

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

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

Query parameter collection.

## Logs

This call will return a comprehensive detail of all the webhooks that were executed at a particular execution cycle.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Logs("<EXECUTION_UID>");
```

Execution UID that you receive when you execute the 'Get executions of webhooks' call.

## LogsAsync

This call will return a comprehensive detail of all the webhooks that were executed at a particular execution cycle.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").LogsAsync("<EXECUTION_UID>");
```

Execution UID that you receive when you execute the 'Get executions of webhooks' call.

## Query

The Query Webhooks request returns comprehensive information on all the available webhooks in the specified stack.

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

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

## Retry

This call makes a manual attempt to execute a webhook after the webhook has finished executing its automatic attempts.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Retry("<EXECUTION_UID>");
```

Execution UID that you receive when you execute the 'Get executions of webhooks' call.

## RetryAsync

This call makes a manual attempt to execute a webhook after the webhook has finished executing its automatic attempts.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").RetryAsync("<EXECUTION_UID>");
```

Execution UID that you receive when you execute the 'Get executions of webhooks' call.

## Update

The Update webhook request allows you to update the details of an existing webhook in the stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WebhookModel model = new WebhookModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Update(model);
```

Webhook Model for creating Webhook.

Query parameter collection.

## UpdateAsync

The Update webhook request allows you to update the details of an existing webhook in the stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WebhookModel model = new WebhookModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").UpdateAsync(model);
```

Webhook Model for creating Webhook.

Query parameter collection.

## Webhook | .NET Management SDK | Contentstack

Webhook is a user-defined HTTP callback that sends real-time information to third-party apps or services in the .NET Management SDK.

## WebhookModel

WebhookModel for creating or updating webhook.

Name for the webhook.

List of branches to be added for the webhook.

List of channels on which webhook to be triggerd.

Set true if required concise payload.

List of webhook target to be triggerd.

Set true for disabling the webhook.

Set retry policy to perform retry on when webhook is failed.

## WebhookModel | .NET Management SDK | Contentstack

WebhookModel is the model used to create or update a webhook in the .NET Management SDK.

## WebhookTarget

WebhookTarget for creating or updating webhook.

List of custom header to be added in webhook.

Basic auth for the http request.

Http Password if required to authorize target.

Target url for the request to be triggered.

## WebhookTarget | .NET Management SDK | Contentstack

WebhookTarget is the model used to create or update a webhook in the .NET Management SDK.

## Workflow

A workflow is an order of steps to define the roadmap for a process. This enables users to maintain a systematic approach for reviewing and approving content.

## Create

The Create Workflow request allows you to create a Workflow.

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

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

Workflow Model for updating Content Type.

Query parameter collection.

## CreateAsync

The Create Workflow request allows you to create a Workflow.

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

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

Workflow Model for updating Content Type.

Query parameter collection.

## Delete

The Delete Workflow request allows you to delete a workflow.

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

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

Query parameter collection.

## DeleteAsync

The Delete Workflow request allows you to delete a workflow.

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

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

Query parameter collection.

## Disable

The Disable Workflow request allows you to disable a workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").Disable();
```

## DisableAsync

The Disable Workflow request allows you to disable a workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").DisableAsync();
```

## Enable

The Enable Workflow request allows you to enable a workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").Enable();
```

## EnableAsync

The Enable Workflow request allows you to enable a workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").EnableAsync();
```

## Fetch

The fetch Workflow request retrieves the comprehensive details of a specific Workflow of a stack.

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

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

Query parameter collection.

## FetchAsync

The fetch Workflow request retrieves the comprehensive details of a specific Workflow of a stack.

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

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

Query parameter collection.

## FindAll

The Get all Workflows request retrieves the details of all the Workflows of a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().FindAll();
```

Query parameter collection.

## FindAllAsync

The Get all Workflows request retrieves the details of all the Workflows of a stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().FindAllAsync();
```

Query parameter collection.

## GetPublishRule

The Get Publish Rules by Content Types request allows you to retrieve details of a Publish Rule applied to a specific content type of your stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().GetPublishRule("CONTENT_TYPE_UID")
```

ContentType for getting publish rules.

Query parameter collection.

## GetPublishRuleAsync

The Get Publish Rules by Content Types request allows you to retrieve details of a Publish Rule applied to a specific content type of your stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().GetPublishRuleAsync("CONTENT_TYPE_UID")
```

ContentType for getting publish rules.

Query parameter collection.

## PublishRule

PublishRule is a tool that allows you to streamline the process of content creation and publishing, and lets you manage the content lifecycle of your project smoothly.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule("<ENTRY_UID>")
```

Optional Publish rule uid for performing rule specific operation

## Update

The Update Workflow request allows you to add a workflow stage or update the details of the existing stages of a workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WorkflowModel model = new WorkflowModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").Update(model);
```

Workflow Model for updating Content Type.

Query parameter collection.

## UpdateAsync

The Update Workflow request allows you to add a workflow stage or update the details of the existing stages of a workflow.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WorkflowModel model = new WorkflowModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow("<WORKFLOW_UID>").UpdateAsync(model);
```

Workflow Model for updating Content Type.

Query parameter collection.

## Workflow | .NET Management SDK | Contentstack

Workflow defines an ordered set of steps for reviewing and approving content systematically in the .NET Management SDK.

## WorkflowModel

WorkflowModel for creating or updating workflow.

Name for the workflow.

Admin user for the workflow.

List of branches for the workflow accessible.

List of content types for the workflow.

Set true to enable workflow.

List of workflow stage for the workflow.

## WorkflowModel | .NET Management SDK | Contentstack

WorkflowModel is the model used to create or update a workflow in the .NET Management SDK.

## WorkflowStage

WorkflowStage model for creating or updating workflow stages.

Uid for workflow stage.

Name for the workflow stage.

Color for the workflow stage.

List of next workflow stages.

Set true if required all stages

Set true for all users.

## WorkflowStage | .NET Management SDK | Contentstack

WorkflowStage is the model used to create or update workflow stages in the .NET Management SDK.

## CustomFieldModel

CustomFieldModel class for custom field.

## CustomFieldModel

CustomFieldModel constructor

File path to upload custom field.

Content type for the file to be uploaded.

Title for the custom field.

Tags for the custom field.

File stream for the custom field to be upload.

Content type for the file stream.

Title for the custom field.

Tags for the custom field.

Bytes for the file to be uploaded.

Content type for the file bytes.

Title for the custom field.

Tags for the custom field.

Byte array content of file to be uploaded.

Content type for the file byte content

Title for the custom field.

Tags for the custom field

## GetHttpContent

Get http content returns the request body content.

Title for the custom field.

File content type.

Tags for the custom field.

## CustomFieldModel | .NET Management SDK | Contentstack

CustomFieldModel defines the structure used to configure a custom field in Contentstack.

## CustomWidgetModel

CustomWidgetModel class for custom widget.

## CustomWidgetModel

CustomWidgetModel constructor

File path to upload custom widget.

Content type for the file to be uploaded.

Title for the custom widget.

Tags for the widget

File stream for the custom widget to be upload.

Content type for the file stream.

Title for the custom widget.

Tags for the custom widget.

Bytes for the file to be uploaded.

Content type for the file bytes.

Title for the custom widget.

Tags for the custom widget.

Byte array content of file to be uploaded.

Content type for the file byte content

Title for the custom widget.

Tags for the custom widget

## GetHttpContent

Get http content returns the request body content.

Title for the custom widget.

File content type.

Tags for the custom widget.

## CustomWidgetModel | .NET Management SDK | Contentstack

CustomWidgetModel defines the structure used to configure a custom widget in Contentstack.

## DashboardWidgetModel

DashboardWidgetModel class for dashboard widget.

## DashboardWidgetModel

DashboardWidgetModel constructor

File path to upload dashboard widget.

Content type for the file to be uploaded.

Title for the dashboard widget.

Tags for the widget

File stream for the dashboard widget to be upload.

Content type for the file stream.

Title for the dashboard widget.

Tags for the dashboard widget.

Bytes for the file to be uploaded.

Content type for the file bytes.

Title for the dashboard widget.

Tags for the dashboard widget.

Byte array content of file to be uploaded.

Content type for the file byte content

Title for the dashboard widget.

Tags for the dashboard widget

## GetHttpContent

Get http content returns the request body content.

Title for the dashboard widget.

File content type.

Tags for the dashboard widget.

## DashboardWidgetModel | .NET Management SDK | Contentstack

DashboardWidgetModel defines the structure used to configure a dashboard widget in Contentstack.

## DateField

DateField class for date field.

Start date for the date field.

End date for date field

## DateField | .NET Management SDK | Contentstack

DateField represents the field class used for adding a date field to a content type.

## ExtensionField

Extension class for extension field.

Configuration for the extension field.

Extension field unique id.

## ExtensionField | .NET Management SDK | Contentstack

ExtensionField represents the extension class used for an extension field.

## Field

Action class for setting action for the field.

Determines what value can be provided to the Title field.

Determines the display name of a field. It is a mandatory field.

Allows you to enter additional data about a field. Also, you can add additional values under ‘field\_metadata’.

Set true if field is mandatory.

Set true if field value to be multiple.

Represents the unique ID of each field. It is a mandatory field.

Set true if field value to be unique

## Field | .NET Management SDK | Contentstack

Field provides the action class used to define behavior for a field in a content type.

## FieldMetadata

Metadata details for the field.

Determines whether the editor will support rich text, and is set to ‘true’ by default for Rich Text Editors.

Allows you to set default fields for content types.

Allows you to set a default value for a field.

Allows you to provide the content for the Rich text editor field.

Allows you to add instructions for the content managers while entering values for a field. The instructional text appears below the field.

Lets you assign a field to be a markdown by setting its value to ‘true’.

Provides multi-line capabilities to the Rich text editor.

If you choose the Custom editor, then the options key lets you specify the formatting options you prefer for your RTE toolbar, e.g., "options": \["h3", "blockquote", "sup"\]

Allows you to provide a hint text about the values that need to be entered in an input field, e.g., Single Line Textbox. This text can be seen inside the field until you enter a value.

Allows you to set single or multiple reference to Reference field.

Lets you enable either the basic, custom, or advanced editor to enter your content.

This key determines whether you are using the older version of the Rich Text Editor or the latest version. The value of 1 denotes that it is an older version of the editor, while 3 denotes that it is the latest version of the editor.

## FieldMetadata | .NET Management SDK | Contentstack

FieldMetadata holds the metadata details associated with a field in a content type.

## Action

Action class for setting action for the field.

Action state for the field.

Target field for the action.

## Action | .NET Management SDK | Contentstack

Action lets you define and set the action applied to a field in the Contentstack .NET Management SDK.

## FileField

File field class for adding file field in content type.

List of extension allowed in file field.

## FileField | .NET Management SDK | Contentstack

FileField lets you add a file field to a content type for storing file-based content.

## GroupField

Group field class for adding group field in content type.

Format for the group field.

Max instance for the group filed to be allowed.

Schema details for the group field.

## GroupField | .NET Management SDK | Contentstack

GroupField lets you add a group field to a content type, bundling related fields together.

## Block

Block class for adding blocks in modular block field.

UID for the block field.

Title for the block field

Enable auto edit for the block.

Set true if block type.

Schema details for the block field.

## Block | .NET Management SDK | Contentstack

Block lets you add and configure blocks within a modular blocks field using the Contentstack .NET Management SDK.

## ModularBlockField

ModularBlock field class for adding modular block field to content type.

List of blocks in modular block field.

## ModularBlockField | .NET Management SDK | Contentstack

ModularBlockField lets you add a modular block field to a content type for flexible, reusable content structures.

## ReferenceField

Reference field class for adding reference field to content type.

List of plugins to be added in reference field.

Set of content type to be added as reference in this field.

## ReferenceField | .NET Management SDK | Contentstack

ReferenceField lets you add a reference field to a content type, linking entries to other related content.

## SelectEnum

Select field enum types.

Set true to select input type of advance.

List of choice to be added in selection of select field.

## SelectEnum | .NET Management SDK | Contentstack

SelectEnum defines the available enum types for a select field in a content type.

## SelectField

Select field class for select input field

Select enum for field type.

## SelectField | .NET Management SDK | Contentstack

SelectField is the field class used to define a select input field in the .NET Management SDK.

## TextboxField

Text box field class for text input field

Error messages for the field

Text field format.

## TextboxField | .NET Management SDK | Contentstack

TextboxField is the field class used to define a text input field in the .NET Management SDK.

## DeliveryToken

Delivery Tokens are tokens that provide you with read-only access to the associated environments. It is a credential—used along with the stack API key—to make authorized Content Delivery API requests for retrieving the published content of an environment.

## Create

The Create request is used to create a delivery token in the stack.

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

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

Delivery Token Model for creating delivery token.

Query parameter collection.

## CreateAsync

The Create request is used to create a delivery token in the stack.

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

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

Delivery Token Model for creating delivery token.

Query parameter collection.

## Delete

The Delete request deletes a specific delivery token.

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

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

Query parameter collection.

## DeleteAsync

The Delete request deletes a specific delivery token.

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

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

Query parameter collection.

## Fetch

The Fetch function returns the details of all the delivery tokens created in a stack.

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

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

Query parameter collection.

## FetchAsync

The Fetch function returns the details of all the delivery tokens created in a stack.

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

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

Query parameter collection.

## Query

The Query on DeliveryToken returns the details of all the delivery tokens created in a stack.

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

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

## Update

The Update request lets you update the details of a delivery token.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
DeliveryTokenModel model = new DeliveryTokenModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").DeliveryToken("<DELIVERY_TOKEN_UID>").Update(model);
```

Delivery Token Model for creating delivery token.

Query parameter collection.

## UpdateAsync

The Update request lets you update the details of a delivery token.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
DeliveryTokenModel model = new DeliveryTokenModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").DeliveryToken("<DELIVERY_TOKEN_UID>").UpdateAsync(model);
```

Delivery Token Model for creating delivery token.

Query parameter collection.

## DeliveryToken | .NET Management SDK | Contentstack

DeliveryToken provides read-only access to associated environments, used with the API key for authorized Content Delivery API requests.

## ManagementToken

Management Tokens are tokens that provide you with read-write access to the content of your stack. It is a credential—used along with the stack API key—to make authorized Content Management API (CMA) requests for managing content of your stack.

## Create

The Create request is used to create a management token in a stack. This token provides you with read-write access to the content of your stack.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ManagementTokenModel model = new ManagementTokenModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ManagementToken("<MANAGEMENT_TOKEN_UID>").Create(model);
```

ManagementToken Model for creating ManagementToken.

Query parameter collection.

## CreateAsync

The Create request is used to create a management token in a stack. This token provides you with read-write access to the content of your stack.

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

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

ManagementToken Model for creating ManagementToken.

Query parameter collection.

## Delete

The Delete request deletes a specific management token.

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

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

Query parameter collection.

## DeleteAsync

The Delete request deletes a specific management token.

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

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

Query parameter collection.

## Fetch

The Fetch request returns the details of a specific management token generated in a stack.

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

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

Query parameter collection.

## FetchAsync

The Fetch request returns the details of a specific management token generated in a stack.

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

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

Query parameter collection.

## Query

The Query on ManagementToken request returns the details of all the management tokens generated in a stack.

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

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

## Update

The Update request lets you update the details of a management token. You can change the name and description of the token, update the stack-level permissions assigned to the token, and change the expiry date of the token (if set).

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ManagementTokenModel model = new ManagementTokenModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").ManagementToken("<MANAGEMENT_TOKEN_UID>").Update(model);
```

ManagementToken Model for creating ManagementToken.

Query parameter collection.

## UpdateAsync

The Update request lets you update the details of a management token. You can change the name and description of the token, update the stack-level permissions assigned to the token, and change the expiry date of the token (if set).

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ManagementTokenModel model = new ManagementTokenModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").ManagementToken("<MANAGEMENT_TOKEN_UID>").UpdateAsync(model);
```

ManagementToken Model for creating ManagementToken.

Query parameter collection.

## ManagementToken | .NET Management SDK | Contentstack

ManagementToken provides read-write access to your stack's content, used with the API key for authorized Content Management API requests.

## DeliveryTokenModel

Delivery token scope for the token to be accessible.

Name for the delivery token to be created or updated.

Description for the delivery token to be created or updated.

List of token scope for stack-level permissions you need to assign to the token.

## DeliveryTokenModel | .NET Management SDK | Contentstack

DeliveryTokenModel defines the delivery token scope, setting which environments the token can access.

## DeliveryTokenScope

Delivery token scope for setting the environment for the token to be accessible.

List of environment for the token to be accessible.

## DeliveryTokenScope | .NET Management SDK | Contentstack

DeliveryTokenScope sets the environment scope that a delivery token can access.

## ManagementTokenModel

Management token details for creating or updating token.

Name for the management token.

Description for the management token.

Expiration date of the token in UTC time

Enable notification for the token expiration before seven days.

List of token scope for stack-level permissions you need to assign to the token.

## ManagementTokenModel | .NET Management SDK | Contentstack

ManagementTokenModel defines the structure used to create or update a management token.

## TokenScope

ACL permissions determine what actions the user or group can perform on a token, such as reading, writing, or executing a file.

Branches on which token scope should be defined.

Module scope for the token.

## BoolParameterValue

Bool parameter value.

## BoolParameterValue

Constructs ParameterValue for a boolean.

Value for the query parameter.

Boolean value of the parameter.

## BoolParameterValue | .NET Management SDK | Contentstack

BoolParameterValue represents a boolean parameter value in Contentstack.

## DoubleListParameterValue

Double list parameter value.

## DoubleListParameterValue

Constructs ParameterValue for a list of double.

Value for the query parameter.

Double value of the parameter.

## DoubleListParameterValue | .NET Management SDK | Contentstack

DoubleListParameterValue represents a list of double-precision numeric parameter values in Contentstack.

## DoubleParameterValue

Double parameter value.

## DoubleParameterValue

Constructs ParameterValue for a double.

Value for the query parameter.

Double value of the parameter.

## DoubleParameterValue | .NET Management SDK | Contentstack

DoubleParameterValue represents a double-precision numeric parameter value in Contentstack.

## ParameterCollection

## Add

Adds a parameter with a boolean value.

Parameter key to be added.

Parameter value to be added

## Add

Adds a parameter with a list-of-doubles value.

Parameter key to be added.

Parameter value to be added

## Add

Adds a parameter with a list-of-strings value.

Parameter key to be added.

Parameter value to be added

## Add

Adds a parameter with a double value.

Parameter key to be added.

Parameter value to be added

## Add

Adds a parameter with a string value.

Parameter key to be added.

Parameter value to be added

## GetSortedParametersList

Converts the current parameters into a list of key-value pairs.

## Query

## Find

The Find all object call fetches the list of all objects owned by a particular user account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack().Query().Limit(5).Find();
```

## FindAsync

The Find all object call fetches the list of all objects owned by a particular user account.

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

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack().Query().Limit(5).FindAsync();
```

## IncludeCount

The ‘include\_count’ parameter returns the total number of object related to the user.

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

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

## Limit

The ‘limit’ parameter will return a specific number of Objects in the output.

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

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

Number of object in limit.

## Skip

The ‘skip’ parameter will skip a specific number of Object in the output.

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

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

Number of object to skip

## StringListParameterValue

String list parameter value.

## StringListParameterValue

Constructs ParameterValue for a list of strings.

List of string value for the query parameter.

List of strings value of the parameter.

## StringListParameterValue | .NET Management SDK | Contentstack

StringListParameterValue represents a string list parameter value in the .NET Management SDK.

## StringParameterValue

String parameter value.

## StringParameterValue

Constructs ParameterValue for a single string.

Value for the query parameter.

String value of the parameter.

## StringParameterValue | .NET Management SDK | Contentstack

StringParameterValue represents a string parameter value in the .NET Management SDK.

## Bulk Operations

The Contentstack Management .NET SDK provides bulk operation capabilities to perform actions on multiple entries and assets simultaneously, enabling efficient large-scale content management.

## BulkPublish

The BulkPublish method publishes multiple entries and assets simultaneously across specified locales and environments.

```
Example:

var bulkOperation = stack.BulkOperation();
var publishDetails = new BulkPublishDetails
{
   Entries = new List<BulkPublishEntry>
   {
       new BulkPublishEntry
       {
           Uid = "entry_uid_1",
           ContentType = "content_type_uid",
           Version = 1,
           Locale = "en-us"
       },
       new BulkPublishEntry
       {
           Uid = "entry_uid_2",
           ContentType = "content_type_uid",
           Version = 2,
           Locale = "en-us"
       }
   },
   Assets = new List<BulkPublishAsset>
   {
       new BulkPublishAsset { Uid = "asset_uid_1" },
       new BulkPublishAsset { Uid = "asset_uid_2" }
   },
   Locales = new List<string> { "en-us", "en-gb" },
   Environments = new List<string> { "environment_uid" }
};
ContentstackResponse response = bulkOperation.Publish(publishDetails);
```

Specify entry or asset UIDs along with the target locales and publishing environments. If omitted, the system defaults to the primary locale.

Set to true to publish entries that are in workflow stages eligible under the applied publish rules.

Set to true to publish entries that do not require an approval to be published.

Specify the API Version in Headers

## BulkPublishAsync

The BulkPublish method publishes multiple entries and assets simultaneously across specified locales and environments.

```
Example:
var bulkOperation = stack.BulkOperation();
var publishDetails = new BulkPublishDetails
{
   Entries = new List<BulkPublishEntry>
   {
       new BulkPublishEntry
       {
           Uid = "entry_uid_1",
           ContentType = "content_type_uid",
           Version = 1,
           Locale = "en-us"
       },
       new BulkPublishEntry
       {
           Uid = "entry_uid_2",
           ContentType = "content_type_uid",
           Version = 2,
           Locale = "en-us"
       }
   },
   Assets = new List<BulkPublishAsset>
   {
       new BulkPublishAsset { Uid = "asset_uid_1" },
       new BulkPublishAsset { Uid = "asset_uid_2" }
   },
   Locales = new List<string> { "en-us", "en-gb" },
   Environments = new List<string> { "environment_uid" }
};
ContentstackResponse response = await bulkOperation.PublishAsync(publishDetails);
```

Specify entry or asset UIDs along with the target locales and publishing environments. If omitted, the system defaults to the primary locale.

Set to true to publish entries that are in workflow stages eligible under the applied publish rules.

Set to true to publish entries that do not require an approval to be published.

Specify the API Version in Headers

## BulkUnpublish

The BulkUnpublish method allows you to unpublish multiple entries and assets simultaneously across selected locales and environments.

```
Example:

var bulkOperation = stack.BulkOperation();

var unpublishDetails = new BulkPublishDetails
{
    Entries = new List<BulkPublishEntry>
    {
        new BulkPublishEntry
        {
            Uid = "entry_uid_1",
            ContentType = "content_type_uid",
            Locale = "en-us"
        },
        new BulkPublishEntry
        {
            Uid = "entry_uid_2",
            ContentType = "content_type_uid",
            Locale = "en-us"
        }
    },
    Assets = new List<BulkPublishAsset>
    {
        new BulkPublishAsset { Uid = "asset_uid_1" }
    },
    Locales = new List<string> { "en-us" },
    Environments = new List<string> { "environment_uid" }
};

ContentstackResponse response = bulkOperation.Unpublish(unpublishDetails);
```

Specify entry or asset UIDs along with the target locales and unpublishing environments. If omitted, the system defaults to the primary locale.

Set to true to unpublish entries that are in workflow stages eligible under the applied publish rules.

Set to true to publish entries that do not require an approval to be published.

Specify the API Version in Headers

## BulkUnpublishAsync

The BulkUnpublishAsync method allows you to unpublish multiple entries and assets simultaneously across selected locales and environments.

```
Example:

var bulkOperation = stack.BulkOperation();

var unpublishDetails = new BulkPublishDetails
{
    Entries = new List<BulkPublishEntry>
    {
        new BulkPublishEntry
        {
            Uid = "entry_uid_1",
            ContentType = "content_type_uid",
            Locale = "en-us"
        },
        new BulkPublishEntry
        {
            Uid = "entry_uid_2",
            ContentType = "content_type_uid",
            Locale = "en-us"
        }
    },
    Assets = new List<BulkPublishAsset>
    {
        new BulkPublishAsset { Uid = "asset_uid_1" }
    },
    Locales = new List<string> { "en-us" },
    Environments = new List<string> { "environment_uid" }
};

ContentstackResponse response = await bulkOperation.UnpublishAsync(unpublishDetails);
```

Specify entry or asset UIDs along with the target locales and unpublishing environments. If omitted, the system defaults to the primary locale.

Set to true to unpublish entries that are in workflow stages eligible under the applied publish rules.

Set to true to publish entries that do not require an approval to be published.

Specify the API Version in Headers

## BulkDelete

The BulkDelete method allows you to delete multiple entries and assets simultaneously across specified locales and environments.

```
Example:

var deleteDetails = new BulkDeleteDetails
{
    Entries = new List<BulkDeleteEntry>
    {
        new BulkDeleteEntry
        {
            Uid = "entry_uid_1",
            ContentType = "content_type_uid",
            Locale = "en-us"
        },
        new BulkDeleteEntry
        {
            Uid = "entry_uid_2",
            ContentType = "content_type_uid",
            Locale = "en-us"
        }
    },
    Assets = new List<BulkDeleteAsset>
    {
        new BulkDeleteAsset { Uid = "asset_uid_1" },
        new BulkDeleteAsset { Uid = "asset_uid_2" }
    }
};

ContentstackResponse response = bulkOperation.Delete(deleteDetails);
```

Data containing the entries and assets to be deleted.

## Bulk Workflow Update

The update method updates an existing workflow with the specified configuration details

```
Example:

var updateBody = new BulkWorkflowUpdateBody
{
    Entries = new List<BulkWorkflowEntry>
    {
        new BulkWorkflowEntry
        {
            Uid = "entry_uid",
            ContentType = "content_type_uid",
            Locale = "en-us"
        }
    },
    Workflow = new BulkWorkflowStage
    {
        Uid = "workflow_stage_uid",
        Comment = "Please review this content",
        DueDate = "2023-12-15",
        Notify = true,
        AssignedTo = new List<BulkWorkflowUser>
        {
            new BulkWorkflowUser
            {
                Uid = "user_uid",
                Name = "John Doe",
                Email = "john.doe@example.com"
            }
        },
        AssignedByRoles = new List<BulkWorkflowRole>
        {
            new BulkWorkflowRole
            {
                Uid = "role_uid",
                Name = "Content Editor"
            }
        }
    }
};

ContentstackResponse response = bulkOperation.Update(updateBody);
```

Data containing the entries and assets to be added.

## Bulk Workflow UpdateAsync

The updateAsync method updates an existing workflow with the specified configuration details

```
Example:

var updateBody = new BulkWorkflowUpdateBody
{
    Entries = new List<BulkWorkflowEntry>
    {
        new BulkWorkflowEntry
        {
            Uid = "entry_uid",
            ContentType = "content_type_uid",
            Locale = "en-us"
        }
    },
    Workflow = new BulkWorkflowStage
    {
        Uid = "workflow_stage_uid",
        Comment = "Please review this content",
        DueDate = "2023-12-15",
        Notify = true,
        AssignedTo = new List<BulkWorkflowUser>
        {
            new BulkWorkflowUser
            {
                Uid = "user_uid",
                Name = "John Doe",
                Email = "john.doe@example.com"
            }
        },
        AssignedByRoles = new List<BulkWorkflowRole>
        {
            new BulkWorkflowRole
            {
                Uid = "role_uid",
                Name = "Content Editor"
            }
        }
    }
};

ContentstackResponse response = bulkOperation.Update(updateBody);
```

Data containing the entries and assets to be added.

## BulkDeleteAsync

The BulkDeleteAsync method allows you to delete multiple entries and assets simultaneously across specified locales and environments.

```
Example:

var deleteDetails = new BulkDeleteDetails
{
    Entries = new List<BulkDeleteEntry>
    {
        new BulkDeleteEntry
        {
            Uid = "entry_uid_1",
            ContentType = "content_type_uid",
            Locale = "en-us"
        },
        new BulkDeleteEntry
        {
            Uid = "entry_uid_2",
            ContentType = "content_type_uid",
            Locale = "en-us"
        }
    },
    Assets = new List<BulkDeleteAsset>
    {
        new BulkDeleteAsset { Uid = "asset_uid_1" },
        new BulkDeleteAsset { Uid = "asset_uid_2" }
    }
};

// Execute bulk delete
ContentstackResponse response = await bulkOperation.DeleteAsync(deleteDetails);
```

Data containing the entries and assets to be deleted.

## Bulk AddItemsAsync

The AddItemsAsync method adds multiple entries and assets to a release in a single operation.

```
Example:

var releaseData = new BulkAddItemsData
{
    Release = "release_uid",
    Action = "publish",
    Locale = new List<string> { "en-us", "en-gb" },
    Reference = true,
    Items = new List<BulkReleaseItem>
    {
        new BulkReleaseItem
        {
            ContentTypeUid = "content_type_uid",
            Uid = "entry_uid",
            Version = 1,
            Locale = "en-us",
            Title = "Sample Entry"
        },
        new BulkReleaseItem
        {
            ContentTypeUid = "content_type_uid",
            Uid = "entry_uid_2",
            Version = 2,
            Locale = "en-gb",
            Title = "Sample Entry 2"
        }
    }
};

ContentstackResponse response = await bulkOperation.AddItemsAsync(releaseData, "2.0");
```

Data containing the entries and assets to be deleted.

The bulk operation version.

## Bulk UpdateItems

The UpdateItems method updates multiple entries and assets to a release in a single operation.

```
Example:

var itemsData = new BulkAddItemsData
{
    Items = new List<BulkAddItem>
    {
        new BulkAddItem
        {
            Uid = "entry_uid_1",
            ContentType = "blog_post"
        },
        new BulkAddItem
        {
            Uid = "entry_uid_2",
            ContentType = "product"
        },
        new BulkAddItem
        {
            Uid = "entry_uid_3",
            ContentType = "article"
        }
    }
};

// Update items in release with specific bulk version
ContentstackResponse response = bulkOperation.UpdateItems(itemsData, "2.0");
```

Data containing the entries and assets to be deleted.

The bulk operation version.

## Bulk AddItems

The AddItems method adds multiple entries and assets to a release in a single operation.

```
Example:

var releaseData = new BulkAddItemsData
{
    Release = "release_uid",
    Action = "publish",
    Locale = new List<string> { "en-us", "en-gb" },
    Reference = true,
    Items = new List<BulkReleaseItem>
    {
        new BulkReleaseItem
        {
            ContentTypeUid = "content_type_uid",
            Uid = "entry_uid",
            Version = 1,
            Locale = "en-us",
            Title = "Sample Entry"
        },
        new BulkReleaseItem
        {
            ContentTypeUid = "content_type_uid",
            Uid = "entry_uid_2",
            Version = 2,
            Locale = "en-gb",
            Title = "Sample Entry 2"
        }
    }
};

ContentstackResponse response = bulkOperation.AddItems(releaseData, "2.0");
```

Data containing the entries and assets to be deleted.

The bulk operation version.

## Bulk UpdateItemsAsync

The UpdateItemsAsync method updates multiple entries and assets to a release in a single operation.

```
Example:

var itemsData = new BulkAddItemsData
{
    Items = new List<BulkAddItem>
    {
        new BulkAddItem
        {
            Uid = "entry_uid_1",
            ContentType = "blog_post"
        },
        new BulkAddItem
        {
            Uid = "entry_uid_2",
            ContentType = "product"
        },
        new BulkAddItem
        {
            Uid = "entry_uid_3",
            ContentType = "article"
        }
    }
};

ContentstackResponse response = await bulkOperation.UpdateItemsAsync(itemsData, "2.0");
```

Data containing the entries and assets to be deleted.

The bulk operation version.

## JobStatusAsync

The JobStatusAsync method retrieves the status of a bulk operation using its job UID.

```
Example:
string jobId = "job_id_from_bulk_operation";
ContentstackResponse response = bulkOperation.JobStatus(jobId);
ContentstackResponse responseWithVersion = await bulkOperation.JobStatusAsync(jobId, "2.0");
```

The UID of the bulk job

The bulk operation version.

## JobStatus

The JobStatus method retrieves the status of a bulk operation using its job UID.

```
Example:
string jobId = "job_id_from_bulk_operation";
ContentstackResponse response = bulkOperation.JobStatus(jobId);
ContentstackResponse responseWithVersion = bulkOperation.JobStatus(jobId, "2.0");
```

The UID of the bulk job

The bulk operation version.

## Bulk Operations | .NET Management SDK | Contentstack

Bulk Operations lets the Management SDK act on multiple entries and assets at once for efficient large-scale content management.

## Taxonomy

The Taxonomy class allows you to organize and categorize content using a hierarchical structure of terms. It serves as the central manager for taxonomy-level operations such as create, manage, export, or retrieve taxonomies, within a specific Stack.

**Initialization**

To interact with taxonomies, initialize the class through your stack instance.

*   **Syntax:**
    
    ```
    stack.Taxonomy(string uid = null)
    ```
    
*   **Returns:**
    *   **Type**: Taxonomy
    *   **Description**: Returns a Taxonomy instance.

**UID and Request Scope**

*   The uid determines the request scope. The SDK uses it to bind the Taxonomy instance either to the collection (/taxonomies) or to a single taxonomy (/taxonomies/{uid}), and validates this before sending the request. Using the wrong scope throws InvalidOperationException.
*   Use collection scope by calling stack.Taxonomy() (omit or pass null for uid). This maps to /taxonomies and supports:
    *   Create / CreateAsync
    *   Query().Find() / Query().FindAsync()
    *   Import / ImportAsync
*   Use single-taxonomy scope by calling stack.Taxonomy("<TAXONOMY\_UID>") with a non-empty UID. This maps to /taxonomies/{uid}.

**Method Index**

**Method Name**

**Description**

Find() / FindAsync()

Queries and retrieves a list of taxonomies with optional filters.

Create() / CreateAsync()

Creates a new taxonomy within the stack.

Update() / UpdateAsync()

Updates the details of an existing taxonomy.

Fetch() / FetchAsync()

Retrieves the complete details of a single taxonomy.

Delete() / DeleteAsync()

Permanently removes a taxonomy from the stack.

Export() / ExportAsync()

Exports taxonomy data as a payload.

Locales() / LocalesAsync()

Retrieves the localized versions for the targeted taxonomy.

Localize() / LocalizeAsync()

Creates or updates a localized version of the taxonomy.

Import() / ImportAsync()

Imports a taxonomy from a file stream.

Terms()

Returns a Term instance scoped to this taxonomy.

**Synchronous vs Asynchronous Methods**

**Synchronous**

*   Blocks the executing thread until the API responds.
*   Use for simple console scripts or background workers where blocking is acceptable.

**Asynchronous (****Async****)**

*   Releases the thread while waiting for the network response.
*   Recommended for modern .NET apps (e.g., ASP.NET Core) and UI apps.
*   Ensures better scalability and responsiveness.

**Common Usage Example**

Shows an end-to-end async workflow to initialize Taxonomy, authenticate the client, target a Stack, and create a "Categories" taxonomy with basic error handling.

```
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Services.Models;
using Contentstack.Management.Core.Exceptions;

namespace ContentstackExample
{
    class Program
    {
        static async Task Main(string[] args)
        {
            try 
            {
                // Initialize the Contentstack client with the authentication token
                ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");


                // Target the specific stack using its API key
                Stack stack = client.Stack("<API_KEY>");


                // Define the payload for the new taxonomy
                TaxonomyModel model = new TaxonomyModel
                {
                    Uid = "<TAXONOMY_UID>",
                    Name = "Categories",
                    Description = "Global categories taxonomy"
                };


                // Optional query parameters (merged as query string when non-empty); pass null if none
                ContentstackResponse response = await stack.Taxonomy().CreateAsync(model, collection: null);


                if (response.IsSuccessStatusCode)
                {
                    Console.WriteLine("Taxonomy created successfully.");
                }
                else
                {
                    Console.WriteLine($"Taxonomy create failed: HTTP {(int)response.StatusCode}");
                }
            } 
            catch (ContentstackException ex) 
            {
                Console.WriteLine($"Contentstack Error: {ex.ErrorMessage}");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"System Error: {ex.Message}");
            }
        }
    }
}
```

## Find / FindAsync

The Find and FindAsync methods retrieve all taxonomies available in the stack.

**Note:** Results are paginated, so a single Find() / FindAsync() may not return every taxonomy. Refer to the [Content Management API](/docs/developers/apis/content-management-api) documentation for page size and maximum limit.

```
Use the Query fluent helpers or pass a ParameterCollection into Find / FindAsync to page results (for example limit, skip, and include_count).
Example:
The following example shows how to asynchronously query the stack for taxonomies, page with Limit / Skip, and read the taxonomies array from the response.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Queryable;
using Contentstack.Management.Core.Exceptions;
using Newtonsoft.Json;

namespace ContentstackExample
{
    // GET /taxonomies → { "taxonomies": [ ... ] }
    class TaxonomiesResponseModel
    {
        [JsonProperty("taxonomies")]
        public List<TaxonomyModel> Taxonomies { get; set; }
    }

    class Program
    {
        static async Task Main(string[] args)
        {
            try
            {
                ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
                Stack stack = client.Stack("<API_KEY>");

                // Merge extra query params: .FindAsync(new ParameterCollection { ... })
                ContentstackResponse response = await stack.Taxonomy().Query()
                    .Limit(20)
                    .Skip(0)
                    .FindAsync();

                if (!response.IsSuccessStatusCode)
                {
                    Console.WriteLine($"Request failed: HTTP {(int)response.StatusCode}");
                    return;
                }

                var wrapper = response.OpenTResponse<TaxonomiesResponseModel>();
                if (wrapper?.Taxonomies != null)
                {
                    foreach (var taxonomy in wrapper.Taxonomies)
                    {
                        Console.WriteLine($"{taxonomy.Uid}: {taxonomy.Name}");
                    }
                }
            }
            catch (ContentstackException ex)
            {
                Console.WriteLine($"Error: {ex.ErrorMessage}");
            }
        }
    }
}
```

Query modifiers for Query().Find() provide values to refine retrieval results using applied filters.

## Create / CreateAsync

The Create and CreateAsync actions add a new taxonomy to the stack.

```
The following example shows how to asynchronously create a new taxonomy with a specific UID and Name.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Construct the payload with required taxonomy properties
    TaxonomyModel model = new TaxonomyModel
    {
        Uid = "<TAXONOMY_UID>",
        Name = "Product Taxonomy"
    };


    // Execute the creation request (second argument: optional ParameterCollection, or null)
    ContentstackResponse response = await stack.Taxonomy().CreateAsync(model, collection: null);

    if (response.IsSuccessStatusCode)
    {
        Console.WriteLine("Taxonomy created successfully.");
    }
    else
    {
        Console.WriteLine($"Taxonomy create failed: HTTP {(int)response.StatusCode}");
    }
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
```

The taxonomy payload for Create(). Provide UID, name, and optionally description to create a new taxonomy entity.

Defines optional query parameters for the creation request. Provide values to modify the default API response.

## Update / UpdateAsync

The Update and UpdateAsync actions modify the details of an existing taxonomy.

**Update Behavior and UID Requirement**

*   The taxonomy is identified only by the UID passed to stack.Taxonomy("<TAXONOMY\_UID>"), which is used in the request path PUT /taxonomies/{uid}. The SDK does not infer the target from TaxonomyModel.
*   You must call Update or UpdateAsync with a non-empty UID. Calling stack.Taxonomy() without a UID throws InvalidOperationException before any request is sent.
*   You can set TaxonomyModel.Uid in the request body for consistency, but it does not determine which taxonomy is updated.

**Deserializing the Response**

*   ContentstackResponse does not include a Result property.
*   Use OpenTResponse<T>() to deserialize the response, or OpenJObjectResponse() / OpenResponse() for raw access.
*   The API wraps the response inside a taxonomy field, so define a DTO with \[JsonProperty("taxonomy")\] to match the structure.

```
The following example shows how to update the name and description of an explicitly targeted taxonomy and verify the persisted values from the response body. It assumes a top-level statements entry file. If you use a classic Main method instead, define TaxonomyResponseEnvelope in another source file (or above Main in the same file) and invoke the same logic from Main.
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Define the properties to be updated
    TaxonomyModel model = new TaxonomyModel 
    { 
        Name = "<UPDATED_NAME>", 
        Description = "<UPDATED_DESCRIPTION>" 
    };


    // Target the taxonomy by UID and apply the updates (optional ParameterCollection as second arg)
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").UpdateAsync(model, collection: null);

    if (response.IsSuccessStatusCode)
    {
        TaxonomyResponseEnvelope body = response.OpenTResponse<TaxonomyResponseEnvelope>();
        TaxonomyModel updated = body?.Taxonomy;

        if (updated != null
            && updated.Name == "<UPDATED_NAME>"
            && updated.Description == "<UPDATED_DESCRIPTION>")
        {
            Console.WriteLine($"Taxonomy updated successfully (uid: {updated.Uid}, updated_at: {updated.UpdatedAt}).");
        }
        else
        {
            Console.WriteLine("Update reported success but response body did not match expected fields.");
        }
    }
    else
    {
        Console.WriteLine($"Taxonomy update failed: HTTP {(int)response.StatusCode}");
    }
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
catch (InvalidOperationException ex)
{
    Console.WriteLine($"Invalid operation: {ex.Message}");
}

// Matches the API envelope: { "taxonomy": { ... } }. In top-level programs, declare helper types after statements.
public class TaxonomyResponseEnvelope
{
    [JsonProperty("taxonomy")]
    public TaxonomyModel Taxonomy { get; set; }
}
```

Defines fields (Name, Description) for Update(). Provide values to update the taxonomy.

Defines optional query parameters for the update request. Provide values to modify the API response.

## Fetch / FetchAsync

The Fetch and FetchAsync actions retrieve the details of a single, specific taxonomy.

**Fetching a Taxonomy (UID Requirement)**

*   The taxonomy returned is determined only by the UID passed to stack.Taxonomy("<TAXONOMY\_UID>"), which maps to GET /taxonomies/{uid}.
*   Calling Fetch or FetchAsync on stack.Taxonomy() without a UID throws InvalidOperationException before any request is sent.
*   The same entry point without a UID is used for collection operations such as create or query, not for fetching a single taxonomy.

**Handling the Response**

*   ContentstackResponse does not include a Result property.
*   Use OpenTResponse<T>() to deserialize the response, or OpenJObjectResponse() / OpenResponse() for raw access.
*   The response is wrapped in a taxonomy field, so define a DTO with \[JsonProperty("taxonomy")\] to match the payload.

```
The following example fetches a taxonomy by UID and reads the returned TaxonomyModel from the body. It assumes top-level statements. If you use a classic Main method, define TaxonomyResponseEnvelope in another source file (or above Main) and call the same logic from Main.
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").FetchAsync(collection: null);

    if (response.IsSuccessStatusCode)
    {
        TaxonomyResponseEnvelope body = response.OpenTResponse<TaxonomyResponseEnvelope>();
        TaxonomyModel taxonomy = body?.Taxonomy;

        if (taxonomy != null && taxonomy.Uid == "<TAXONOMY_UID>")
        {
            Console.WriteLine($"Fetched taxonomy: {taxonomy.Name} (updated_at: {taxonomy.UpdatedAt}).");
        }
        else
        {
            Console.WriteLine("Fetch reported success but response body was missing or did not match the requested UID.");
        }
    }
    else
    {
        Console.WriteLine($"Taxonomy fetch failed: HTTP {(int)response.StatusCode}");
    }
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
catch (InvalidOperationException ex)
{
    Console.WriteLine($"Invalid operation: {ex.Message}");
}

// Matches the API envelope: { "taxonomy": { ... } }. In top-level programs, declare helper types after statements.
public class TaxonomyResponseEnvelope
{
    [JsonProperty("taxonomy")]
    public TaxonomyModel Taxonomy { get; set; }
}
```

Defines optional query parameters for Fetch(). Provide values to modify the retrieved payload.

## Delete / DeleteAsync

The Delete and DeleteAsync actions remove a taxonomy from the stack.

**Warning:** Deleting a taxonomy is permanent and cannot be undone. This action removes all associated terms and breaks their links with entries. Use only when you intend to remove this structure from the stack.

**Validation**

*   You must call Delete or DeleteAsync on stack.Taxonomy("<TAXONOMY\_UID>"). Calling stack.Taxonomy() without a UID throws InvalidOperationException before the request is sent.
*   If the API rejects the request (for example, due to permissions, dependencies, or a missing resource), the client throws ContentstackErrorException.
*   Errors are not returned as a failed ContentstackResponse. Inspect StatusCode, ErrorMessage, and ErrorCode on the exception.

**Behavior**

*   Optional flags are sent as query parameters using ParameterCollection.
*   Boolean values are serialized as lowercase (true / false) in the URL.
*   For example, to force delete (if supported):
    
    ```
    ParameterCollection collection = new ParameterCollection();
    collection.Add("force", true);   // becomes ?force=true
    ContentstackResponse response = await stack
     .Taxonomy("<TAXONOMY_UID>")
     .DeleteAsync(collection);
    ```
    
*   Use of parameters not supported by the Management API for taxonomies may be ignored or throw errors.

```
The following example removes a taxonomy by UID. It omits collection for a plain delete and adds a ParameterCollection with force only when your API contract requires it.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Execute the deletion request for a targeted taxonomy asynchronously
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").DeleteAsync(collection: null);


    Console.WriteLine("Taxonomy deleted successfully.");
} 
catch (ContentstackErrorException ex) 
{
    Console.WriteLine($"API error ({(int)ex.StatusCode}): {ex.ErrorMessage}");
}
catch (InvalidOperationException ex)
{
    Console.WriteLine($"Invalid operation: {ex.Message}");
}
```

Defines optional query parameters for Delete(). Provide values to control deletion behavior.

## Export / ExportAsync

The Export and ExportAsync actions retrieve a full export of a single taxonomy for backup, migration, or external processing.

The response body is the raw export payload (JSON document or CSV text). The SDK does not provide a typed model. Use OpenResponse(), OpenJObjectResponse(), or OpenTResponse<T>() with your own DTOs. Inspect ContentType and ContentLength to distinguish JSON vs CSV.

**Validation**

*   Calling stack.Taxonomy() without a UID and then Export / ExportAsync throws InvalidOperationException before the request.
*   If the client is not authorized, ThrowIfNotLoggedIn() is thrown before the request.
*   Unsupported ParameterCollection value types can throw ContentstackException.
*   Passing null for collection is valid and only fails at the API or during response parsing.

**Behavior**

*   The taxonomy is selected only by the UID passed to stack.Taxonomy("<TAXONOMY\_UID>").
*   Each call maps to a single GET /taxonomies/{uid}/export request.
*   Optional flags are sent via ParameterCollection as query parameters. Supported keys and behavior are defined by the Management API.
*   The response shape depends on the API.
*   The response is not written to disk automatically. Persist the output from OpenResponse() if needed.
*   Use Import / ImportAsync to re-upload exports, and Fetch / FetchAsync for live taxonomy data without export.

```
The following example requests a JSON export using an optional format query parameter, reads the body as JSON, and handles API and client-side errors.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;
using Contentstack.Management.Core.Queryable;
using Newtonsoft.Json.Linq;

try 
{
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");

    ParameterCollection collection = new ParameterCollection();
    collection.Add("format", "json");

    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").ExportAsync(collection);

    JObject json = response.OpenJObjectResponse();

    Console.WriteLine($"Export succeeded. Content-Type: {response.ContentType}, length: {response.ContentLength}");
    Console.WriteLine(json.ToString(Newtonsoft.Json.Formatting.None));
}
catch (ContentstackErrorException ex)
{
    Console.WriteLine($"API error ({(int)ex.StatusCode}): {ex.ErrorMessage}");
}
catch (InvalidOperationException ex)
{
    Console.WriteLine($"Invalid operation: {ex.Message}");
}
```

Defines optional query parameters for the Export() method. Provide values to control exported data.

## Locales / LocalesAsync

The Locales and LocalesAsync actions return the localized versions available for the targeted taxonomy.

The response body is raw JSON from the API. The SDK does not provide a dedicated typed model for this response.

**Validation**

*   Unsupported ParameterCollection value types can throw ContentstackException.
*   Passing null for collection is valid. Some query keys or values may be ignored by the API or only fail after the server response.

**Behavior**

*   Each call maps to a single HTTP GET request.
*   The response shape depends on the Management API. Do not assume a fixed schema unless using your own DTOs.
*   Use Localize / LocalizeAsync to create or update localized content.
*   Use stack.Locale().Query() to list stack-level locale definitions (separate from taxonomy or term locale payloads).

```
The following example builds a client and stack, calls LocalesAsync for one taxonomy UID, reads JSON with OpenJObjectResponse(), and handles API failures and invalid SDK targeting.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;
using Newtonsoft.Json.Linq;

try
{
    ContentstackClient client = new ContentstackClient("AUTHTOKEN");
    Stack stack = client.Stack("APIKEY");

    ContentstackResponse response = await stack.Taxonomy("TAXONOMYUID").LocalesAsync();
    JObject json = response.OpenJObjectResponse();

    Console.WriteLine($"HTTP {(int)response.StatusCode}; taxonomies node present: {json["taxonomies"] != null}");
}
catch (ContentstackErrorException ex)
{
    Console.WriteLine($"API error ({(int)ex.StatusCode}): {ex.ErrorMessage}");
}
catch (InvalidOperationException ex)
{
    Console.WriteLine($"Invalid operation: {ex.Message}");
}
```

Defines optional query parameters for Locales(). Provide values to control the returned locale list.

## Localize / LocalizeAsync

The Localize and LocalizeAsync actions create or update the localized fields for an existing taxonomy, using optional query parameters (typically locale) to select the target locale.

**Validation**

*   A non-empty taxonomy UID must be provided; otherwise, stack.Taxonomy() throws InvalidOperationException.
*   Passing null for model throws ArgumentNullException when the internal CreateUpdateService is constructed.
*   You can pass null for collection. The SDK does not validate query parameters and defers validation to the API.

**Behavior**

*   Add entries to ParameterCollection to send query parameters (for example, locale). The SDK forwards these values without validation.
*   The SDK sends one HTTP POST request to /taxonomies/{taxonomy\_uid} with the body { "taxonomy": … }. Query parameters are included only when collection is non-empty.
*   The API returns a JSON response. Deserialize it using OpenTResponse<T>() or similar if needed.
*   Call Locales / LocalesAsync to read locale data, and call stack.Locale().Query() to list available locale codes.

```
The following example shows how to create a localized version for the taxonomy targeting the fr-fr locale.
Note: The targeted locale must exist on the stack.

using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Queryable;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Define the translated properties for the taxonomy
    TaxonomyModel model = new TaxonomyModel
    {
        Uid = "<TAXONOMY_UID>",
        Name = "Catégories",
        Description = "Catégories globales"
    };


    // Initialize query parameters to target the specific locale (e.g., 'fr-fr')
    ParameterCollection collection = new ParameterCollection();
    collection.Add("locale", "fr-fr");


    // Execute the localization request asynchronously passing both model and params
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").LocalizeAsync(model, collection);


    // Output success message
    Console.WriteLine("Taxonomy localized.");
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
```

Defines the localized taxonomy data for Localize(). Provide values to send the localized payload to the server.

Defines query parameters for Localize() that specify the target locale. Provide values to ensure the payload is assigned to the correct locale code.

## Import / ImportAsync

The Import and ImportAsync actions upload a taxonomy configuration file into the stack via multipart form data.

**Validation**

*   Use stack.Taxonomy() (no UID) for import. Calling stack.Taxonomy("TAXONOMYUID").Import(...) throws InvalidOperationException before the request.
*   Passing null for the model parameter throws ArgumentNullException when constructing the upload service.
*   Provide valid inputs to TaxonomyImportModel:
    *   filePath must be non-null and accessible. Invalid paths or permissions throw IOException (or related System.IO exceptions).
    *   A null stream throws ArgumentNullException.
*   Passing a null or empty collection does not throw. The API validates any query parameters after the request.

```
The following example shows how to read a taxonomy JSON file from the local disk and import it into the stack.
using System;
using System.IO;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Open the local JSON file containing the taxonomy data as a stream
    using Stream stream = File.OpenRead("path/to/taxonomy.json");


    // Assign the file stream and expected file name to the import model
    TaxonomyImportModel model = new TaxonomyImportModel(stream, "taxonomy.json");


    // Execute the import process asynchronously
    ContentstackResponse response = await stack.Taxonomy().ImportAsync(model);


    // Output success message
    Console.WriteLine("Taxonomy imported successfully.");
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
catch (IOException ex)
{
    Console.WriteLine($"File Error: {ex.Message}");
}
```

Defines the file stream and filename for Import(). Provide values to upload the taxonomy configuration file to the stack.

Defines optional query parameters for Import(). Provide values to control import processing rules.

## Terms

The Terms() method returns a Term instance scoped to the parent taxonomy. It does not make an API call.

The SDK constructs the resourcePath based on scope:

*   **Collection scope:** /taxonomies/{taxonomy\_uid}/terms
*   **Single-term scope:** /taxonomies/{taxonomy\_uid}/terms/{term\_uid}

Use this method to navigate to term-level APIs within a taxonomy.

**Note:** The Terms() method acts as a navigation layer and does not execute an API request. It returns a Term instance scoped to the parent taxonomy, which is used to perform term-level operations such as Create(), Fetch(), Move(), Delete(), and Descendants().

**Validation**

*   Calling Terms() on stack.Taxonomy("TAXONOMYUID") with an empty taxonomy UID throws InvalidOperationException before any HTTP request.
*   Pass null or omit termUid to use collection scope. Terms() does not throw in this case.
*   Pass a non-empty termUid only when you need single-term scope. Methods that require a term UID (for example Descendants) throw InvalidOperationException if called on a collection-scoped instance.
*   The SDK does not validate whether termUid exists. Invalid or unknown UIDs produce ContentstackErrorException only when a terminal API call is executed.
*   Passing an empty string for termUid behaves like null (collection scope) for path construction. Methods requiring a term UID still fail client-side.

**Behavior**

*   Each terminal method you call on the returned Term maps to one HTTP request.
*   The SDK does not fetch data automatically; use Query().Find() / FindAsync() for listing and handle pagination explicitly if supported.

```
The following example shows how to obtain a general term collection scope versus a single specific term scope.
using System;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

// Initialize the Contentstack client with the authentication token
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

// Target the specific stack using its API key
Stack stack = client.Stack("<API_KEY>");

// Collection Context (returns a Terms instance for creation or multi-item queries)
Term termsCollection = stack.Taxonomy("<TAXONOMY_UID>").Terms();

// Single Term Context (returns a specific Term instance for fetch, update, delete)
Term singleTerm = stack.Taxonomy("<TAXONOMY_UID>").Terms("<TERM_UID>");
```

Defines the term UID for Terms(termUid). Provide a value to target a specific term, or use null to operate on a collection.

## Taxonomy | .NET Management SDK | Contentstack

Taxonomy organizes content into a hierarchy of terms and manages create, export, and retrieval operations per stack in the .NET Management SDK.

## Term

The Term class represents a taxonomy term (a node in a hierarchy) in the .NET Management SDK. It operates on API paths rooted at /taxonomies/{taxonomy\_uid}/terms and /taxonomies/{taxonomy\_uid}/terms/{term\_uid} when scoped to a single term.

**Initialization**

Access a Term instance through stack.Taxonomy("TAXONOMYUID").Terms(...) rather than constructing it directly. Once obtained, use the instance to perform create, read, update, delete, hierarchy, move, locale, or search operations.

**Syntax:** stack.Taxonomy("<TAXONOMY\_UID>").Terms(string termUid = null)

**Method Index**

Method Name

Description

Find() / FindAsync()

Queries and retrieves terms within the specific taxonomy.

Create() / CreateAsync()

Creates a new term in the taxonomy.

Update() / UpdateAsync()

Updates an existing term's details.

Fetch() / FetchAsync()

Fetches details of a single term.

Delete() / DeleteAsync()

Deletes a term from the taxonomy.

Ancestors() / AncestorsAsync()

Retrieves the ancestor terms of a specific term.

Descendants() / DescendantsAsync()

Retrieves the descendant terms of a specific term.

Move() / MoveAsync()

Moves a term to a new parent and/or changes its sibling order.

Locales() / LocalesAsync()

Gets locales information for the term.

Localize() / LocalizeAsync()

Creates or updates a localized version of the term.

Search() / SearchAsync()

Performs a typeahead search across terms in all taxonomies.

**Synchronous vs Asynchronous Methods**

**Synchronous**

*   Blocks the executing thread until the API responds.
*   Use for simple console scripts or background workers where blocking is acceptable.

**Asynchronous (****Async****)**

*   Releases the thread while waiting for the network response.
*   Recommended for modern .NET apps (e.g., ASP.NET Core) and UI apps.
*   Ensures better scalability and responsiveness.

**Common Usage Example**

The following example demonstrates a complete asynchronous workflow to create a new term under a specific taxonomy.

```
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Exceptions;

namespace ContentstackExample
{
    class Program
    {
        static async Task Main(string[] args)
        {
            try 
            {
                // Initialize the Contentstack client with the authentication token
                ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

                // Target the specific stack using its API key
                Stack stack = client.Stack("<API_KEY>");

                // Define the payload for the new term, indicating its relationship
                TermModel model = new TermModel
                {
                    Uid = "<TERM_UID>",
                    Name = "Electronics",
                    ParentUid = null // Set to null for a root term
                };

                // Target the taxonomy and execute the term creation request asynchronously
                ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").Terms().CreateAsync(model);

                // Output success message
                Console.WriteLine("Term Created Successfully");
            } 
            catch (ContentstackException ex) 
            {
                Console.WriteLine($"Contentstack Error: {ex.ErrorMessage}");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"System Error: {ex.Message}");
            }
        }
    }
}
```

## Find/FindAsync

The Find and FindAsync actions retrieve all terms within a taxonomy.

**Note:** Results are paginated, so a single Find() may not return all items. Use limit and skip to retrieve additional pages.

**Validation**

*   If you omit collection or pass null, the SDK sends only the parameters defined by fluent Query methods (for example Limit, Skip, IncludeCount).
*   The SDK forwards all entries in ParameterCollection as query parameters without validation. The API validates parameter names and values and returns errors for invalid or unsupported inputs.

**Behavior**

*   The API returns a JSON response based on the Management API for listing terms. The structure depends on the query parameters you send. Responses typically include a terms array, and may include a total count when you use IncludeCount.
*   Each Find or FindAsync call sends one HTTP GET request to /taxonomies/{taxonomy\_uid}/terms with query parameters.
*   The SDK returns one page per call. It does not automatically retrieve all results. Control pagination using Query.Limit, Query.Skip, and optionally Query.IncludeCount, or pass equivalent parameters through collection. The SDK merges collection with the fluent query before sending the request.
*   Use Terms(termUid).Ancestors() or Terms(termUid).Descendants() to retrieve hierarchy data for a specific term instead of Query().Find().
*   The SDK does not provide a fluent Depth() method on Query. When the API includes hierarchy data, deserialize it using TermModel, which exposes optional Depth, Ancestors, and Descendants properties.

```
The following example lists taxonomy terms with optional pagination and count. It uses OpenTResponse<TermsQueryResponse> with a matching DTO, and demonstrates handling HTTP failures, API errors, and SDK preconditions.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Exceptions;
using Newtonsoft.Json;

// Matches a common list-terms shape: { "terms": [ ... ], "count": ... } when include_count is used.
public sealed class TermsQueryResponse
{
    [JsonProperty("terms")]
    public List<TermModel> Terms { get; set; }

    [JsonProperty("count")]
    public int? Count { get; set; }
}

public static class TermsFindExample
{
    public static async Task RunAsync()
    {
        try
        {
            ContentstackClient client = new ContentstackClient("AUTHTOKEN");
            Stack stack = client.Stack("APIKEY");

            ContentstackResponse response = await stack
                .Taxonomy("TAXONOMYUID")
                .Terms()
                .Query()
                .Limit(50)
                .Skip(0)
                .IncludeCount()
                .FindAsync(collection: null);

            if (!response.IsSuccessStatusCode)
            {
                Console.WriteLine($"Terms query failed: HTTP {(int)response.StatusCode}");
                return;
            }

            var data = response.OpenTResponse<TermsQueryResponse>();
            if (data?.Terms != null)
            {
                foreach (var term in data.Terms)
                {
                    Console.WriteLine(term.Name);
                }
            }

            if (data?.Count is int total)
            {
                Console.WriteLine($"Total terms (per API): {total}");
            }

            Console.WriteLine("Terms retrieved.");
        }
        catch (ContentstackErrorException ex)
        {
            Console.WriteLine($"API error ({(int)ex.StatusCode}): {ex.ErrorMessage}");
        }
        catch (ContentstackException ex)
        {
            Console.WriteLine($"Contentstack error: {ex.Message}");
        }
        catch (InvalidOperationException ex)
        {
            Console.WriteLine($"Invalid operation: {ex.Message}");
        }
    }
}
```

Defines optional query parameters for Query().Find(). Provide explicit values to control retrieval results using filters.

## Create / CreateAsync

The Create and CreateAsync actions add a new term node under the designated taxonomy hierarchy.

**Validation**

*   Passing a null model throws ArgumentNullException before the request.
*   Call Create / CreateAsync on Terms() (collection scope). Calling it on Terms(termUid) throws InvalidOperationException.
*   You can set ParentUid = null to create a root term. The SDK omits null properties from the request body.

**Behavior**

*   Each call sends one HTTP POST to /taxonomies/{taxonomy\_uid}/terms with the body { "term": … }.
*   The SDK serializes TermModel under the term key and does not derive uid from Name.
*   The API returns a JSON response, commonly wrapping the created term under a term field. Define a matching DTO when using OpenTResponse<T>().
*   Pass collection to include query parameters. The SDK forwards them without validation and the API defines supported keys.

```
The following example:
Creates a root term (ParentUid = null) and a child term using the root’s Uid as ParentUid.Calls CreateAsync on collection-scoped Terms().Uses unique term UIDs to avoid collisions, and requires valid AUTHTOKEN, APIKEY, and an existing TAXONOMYUID.using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Exceptions;
using Newtonsoft.Json;

// Matches a common create-term response body: { "term": { ... } }.
public sealed class TermCreateResponse
{
    [JsonProperty("term")]
    public TermModel Term { get; set; }
}

public static class TermCreateExample
{
    public static async Task RunAsync()
    {
        try
        {
            ContentstackClient client = new ContentstackClient("AUTHTOKEN");
            Stack stack = client.Stack("APIKEY");
            string taxonomyUid = "TAXONOMYUID";

            // Root term — ParentUid null (same pattern as SDK integration tests).
            string rootUid = "term_root_" + Guid.NewGuid().ToString("N").Substring(0, 8);
            var rootModel = new TermModel
            {
                Uid = rootUid,
                Name = "Electronics",
                ParentUid = null
            };

            ContentstackResponse rootResponse = await stack.Taxonomy(taxonomyUid).Terms()
                .CreateAsync(rootModel, collection: null);

            if (!rootResponse.IsSuccessStatusCode)
            {
                Console.WriteLine($"Root term create failed: HTTP {(int)rootResponse.StatusCode}");
                return;
            }

            // Child term — ParentUid must reference an existing term in this taxonomy.
            string childUid = "term_child_" + Guid.NewGuid().ToString("N").Substring(0, 8);
            var childModel = new TermModel
            {
                Uid = childUid,
                Name = "Smartphones",
                ParentUid = rootUid
            };

            ContentstackResponse childResponse = await stack.Taxonomy(taxonomyUid).Terms()
                .CreateAsync(childModel, collection: null);

            if (!childResponse.IsSuccessStatusCode)
            {
                Console.WriteLine($"Child term create failed: HTTP {(int)childResponse.StatusCode}");
                return;
            }

            TermCreateResponse created = childResponse.OpenTResponse<TermCreateResponse>();
            if (created?.Term != null)
            {
                Console.WriteLine($"Created child term '{created.Term.Name}' (uid: {created.Term.Uid}).");
            }
            else
            {
                Console.WriteLine("Child term create succeeded; response did not deserialize with the sample DTO.");
            }
        }
        catch (ContentstackErrorException ex)
        {
            Console.WriteLine($"API error ({(int)ex.StatusCode}): {ex.ErrorMessage}");
        }
        catch (ContentstackException ex)
        {
            Console.WriteLine($"Contentstack error: {ex.Message}");
        }
        catch (InvalidOperationException ex)
        {
            Console.WriteLine($"Invalid operation: {ex.Message}");
        }
    }
}
```

Defines the term payload (Name, ParentUid, etc.) for Create(). Provide values to create a term node.

Defines query parameters for the creation request. Provide values to control the default API behavior.

## Update / UpdateAsync

The Update and UpdateAsync actions modify the metadata of an existing term.

```
The following example shows how to target a specific term and update its display name.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Set the updated term values
    TermModel model = new TermModel { Name = "<UPDATED_NAME>" };


    // Apply updates asynchronously to the targeted term within the specific taxonomy
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").Terms("<TERM_UID>").UpdateAsync(model);


    // Output success message
    Console.WriteLine("Term updated.");
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
```

Defines the fields to update (e.g., Name) for Update(). Provide values to overwrite existing term data.

Defines optional query parameters for the update request. Provide values to control the API response.

## Fetch / FetchAsync

The Fetch and FetchAsync actions retrieve the properties and configuration of a single targeted term.

```
The following example shows how to fetch the precise details of a specific term node.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Asynchronously retrieve the payload of a specific term node
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").Terms("<TERM_UID>").FetchAsync();


    // Output success message
    Console.WriteLine("Term fetched.");
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
```

Defines optional query parameters for Fetch(). Provide values to customize the returned payload.

## Delete / DeleteAsync

The Delete and DeleteAsync actions remove a specific term from the taxonomy hierarchy.

```
The following example shows how to force-delete a term node even if dependencies exist.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Queryable;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Setup a query parameter collection with the "force" delete setting enabled
    ParameterCollection collection = new ParameterCollection();
    collection.Add("force", true);


    // Asynchronously delete the specified term, enforcing the deletion operation
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").Terms("<TERM_UID>").DeleteAsync(collection);


    // Output success message
    Console.WriteLine("Term deleted.");
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
```

Defines optional query parameters (e.g., force) for Delete(). Provide values to control deletion behavior.

## Ancestors / AncestorsAsync

The Ancestors and AncestorsAsync actions return all parent nodes upward in the taxonomy hierarchy for the given term.

```
The following example shows how to query all parent hierarchy structures above the specified term.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Query for all hierarchical parent terms connected to the specific term node
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").Terms("<TERM_UID>").AncestorsAsync();


    // Output success message
    Console.WriteLine("Ancestors fetched.");
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
```

Defines optional query parameters for Ancestors(). Provide explicit values to customize the retrieved ancestor payload.

## Descendants / DescendantsAsync

The Descendants and DescendantsAsync actions return all child nodes downward in the taxonomy hierarchy for the given term.

```
The following example shows how to query all underlying child nodes beneath the specified term.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Asynchronously retrieve all child term hierarchies attached to the specific term node
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").Terms("<TERM_UID>").DescendantsAsync();


    // Output success message
    Console.WriteLine("Descendants fetched.");
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
```

Defines query parameters for Descendants(). Provide values to customize the retrieved descendant payload.

## Move / MoveAsync

The Move and MoveAsync actions change the parent and/or sibling order of a specific term within the taxonomy hierarchy.

**Note:** The SDK uses a TermMoveModel (not separate parameters) for move operations. Set ParentUid to the target parent term and optionally Order for sibling position. The SDK serializes this model under the term key in the request body. You can pass optional query parameters (for example, force) using a ParameterCollection as the second argument to Move / MoveAsync.

```
The following example shows how to move a specific term to a new parent ID at order rank 1.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Queryable;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Configure the restructuring behavior, outlining the target parent and sibling order
    TermMoveModel moveModel = new TermMoveModel 
    { 
        ParentUid = "<NEW_PARENT_TERM_UID>", 
        Order = 1 
    };


    // Add 'force' condition to safely allow move bypassing certain dependency constraints
    ParameterCollection collection = new ParameterCollection();
    collection.Add("force", true);


    // Execute the asynchronous term move update applying the configuration
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").Terms("<TERM_UID>").MoveAsync(moveModel, collection);


    // Output success message
    Console.WriteLine("Term moved successfully.");
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
```

Defines the target parent UID and optional sibling order for Move(). Provide values to restructure the term hierarchy.

Defines optional query parameters (for example, force) for Move(). Provide values to control move behavior.

## Locales / LocalesAsync

The Locales and LocalesAsync actions return locale information strictly for the specified term.

```
The following example shows how to retrieve all locales under which this exact term has been localized.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Request a fetch array representing the localized variants for a specific term
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").Terms("<TERM_UID>").LocalesAsync();


    // Output success message
    Console.WriteLine("Term Locales fetched.");
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
```

Query parameters for Locales(). Provide values to customize the returned locale list.

## Localize / LocalizeAsync

The Localize and LocalizeAsync actions create or update a localized version of a term node.

```
The following example shows how to create a localized entry for the specific term targeting the "fr-fr" locale.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Queryable;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Set up the localized name or properties for the specific term node
    TermModel model = new TermModel { Name = "Électronique" };


    // Configure the localization target (in this case, french mapping via 'fr-fr')
    ParameterCollection collection = new ParameterCollection();
    collection.Add("locale", "fr-fr");


    // Push the updated translation payload specific to the targeted term
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").Terms("<TERM_UID>").LocalizeAsync(model, collection);


    // Output success message
    Console.WriteLine("Term localized.");
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
```

Localized term data for Localize(). Provide values to submit the localized payload.

Query parameters for Localize() to designate the target locale. Provide values to assign the term to the correct locale code.

## Search / SearchAsync

The Search and SearchAsync actions perform a typeahead search across terms in _all_ taxonomies globally within the stack.

```
The following example shows how to execute a typeahead search to find terms matching a designated string across the stack's taxonomies.
using System;
using System.Threading.Tasks;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;

try 
{
    // Initialize the Contentstack client and target the stack
    ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
    Stack stack = client.Stack("<API_KEY>");


    // Note: Called on the collection context without a specific term UID.
    // Conducts an asynchronous typeahead search through all term collections globally
    ContentstackResponse response = await stack.Taxonomy("<TAXONOMY_UID>").Terms().SearchAsync("<TYPEAHEAD_STRING>");


    // Output success message
    Console.WriteLine("Search completed.");
} 
catch (ContentstackException ex) 
{
    Console.WriteLine($"Error: {ex.ErrorMessage}");
}
```

The typeahead search string for Search(). Provide values to locate matching terms globally.

Query parameters for Search(). Provide values to refine search results.

## Term | .NET Management SDK | Contentstack

Term represents a taxonomy term in a hierarchy, supporting create, read, update, delete, move, and search operations in the .NET Management SDK.

## PreviewToken

The PreviewToken class creates and deletes preview tokens scoped to a specific delivery token.

**When to Use This Class:** Use this class when you need to programmatically create or revoke preview tokens for a specific delivery token without navigating the Contentstack UI.

**Conceptual Role:** Acts as a scoped token manager for a single delivery token. Call client.Stack(apiKey).PreviewToken(deliveryTokenUid) to target it and enable Create, CreateAsync, Delete, and DeleteAsync.

**Warning:** deliveryTokenUid is a positional string parameter. The SDK does not validate it client-side. Passing an incorrect or empty value will cause a runtime API error (typically 422 or 404) with no indication that the constructor argument is the source. Always verify the delivery token UID before calling any method on this class.

## Class-Level Notes

**Endpoint Compatibility:** All methods in this class target the rest-preview.contentstack.com endpoint exclusively. They are not compatible with the standard cdn.contentstack.io delivery endpoint. Ensure your ContentstackClient is initialized with the preview endpoint when using this class.

**Authentication:** All methods require a valid auth token passed to ContentstackClient. For 401 (missing or invalid auth token) and 403 (insufficient permissions) errors, see [Management API Errors](https://www.contentstack.com/docs/developers/apis/content-management-api#errors).

**Rate Limiting & Retry:** This SDK automatically retries requests that return 429 (Too Many Requests) and 5xx errors. By default, RetryLimit is 5 attempts and RetryDelay is 300 ms, with the delay increasing between each retry attempt. See [Retry Mechanism](https://www.contentstack.com/docs/developers/sdks/content-management-sdk/dot-net/retry-mechanism) to configure retry limits and delay.

**Query Parameters:** All methods accept an optional collection parameter of type ParameterCollection, used to append query parameters to the request. The default value is null.

**Async Methods:** Always use await at the call site. If an async method is not awaited directly, exceptions are thrown as AggregateException instead of surfacing directly.

### Method Index

Method Name

Returns

Description

Create

ContentstackResponse

Creates a preview token.

CreateAsync

Task<ContentstackResponse>

Creates a preview token asynchronously.

Delete

ContentstackResponse

Deletes a preview token.

DeleteAsync

Task<ContentstackResponse>

Deletes a preview token asynchronously.

### Create a Preview Token

Creates a preview token for a delivery token and handles errors. Demonstrates the workflow from client initialization to API response.

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

// Initialize the client with your auth token
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

// Build the model describing the preview token
PreviewTokenModel model = new PreviewTokenModel()
{
    Name = "Sample Preview Token",
    Description = "This is a sample preview token."
};

try
{
    // Create the preview token scoped to a specific delivery token
    ContentstackResponse response = client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .Create(model);
}
catch (Exception ex)
{
    // A 404 or 422 error usually indicates an invalid or missing deliveryTokenUid.
    Console.WriteLine($"Error creating preview token: {ex.Message}");
}
```

## Create

Creates a preview token for the specified delivery token in the stack.

#### Validation

Throws `InvalidOperationException` with message "Operation not allowed on this model. Update your request and try again." if the `PreviewToken` object already has a UID assigned. `Create()` only supports creating new preview tokens.

For authentication and rate-limit errors (401, 403, 429), see Class-Level Notes.

HTTP Status

Cause

Fix

404

The `deliveryTokenUid` passed to the constructor does not exist in this stack.

Verify the delivery token UID in the Contentstack UI before calling.

422

The request payload is invalid, malformed, or missing required fields.

Ensure `PreviewTokenModel` has all required fields set before calling `Create()`.

#### Behavior

Sends a single HTTP POST request to the Management API and returns the created preview token in the response.

```
Basic usage — create a preview token for a delivery token
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;

// Initialize the client
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

// Build the preview token model
PreviewTokenModel model = new PreviewTokenModel()
{
    Name = "Sample Preview Token",
    Description = "This is a sample preview token."
};

try
{
    // Create the preview token for the specified delivery token
    ContentstackResponse contentstackResponse = client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .Create(model);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}All parameters — with a ParameterCollection
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;
using Contentstack.Management.Core.Queryable;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

PreviewTokenModel model = new PreviewTokenModel()
{
    Name = "Sample Preview Token",
    Description = "This is a sample preview token."
};

ParameterCollection collection = new ParameterCollection();
collection.Add("include_branch", true);

try
{
    ContentstackResponse contentstackResponse = client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .Create(model, collection);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}Error handling — catching a failed token creation
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

PreviewTokenModel model = new PreviewTokenModel()
{
    Name = "Sample Preview Token",
    Description = "This is a sample preview token."
};

try
{
    ContentstackResponse contentstackResponse = client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .Create(model);
}
catch (ContentstackErrorException ex)
{
    Console.WriteLine($"API error {ex.StatusCode}: {ex.ErrorMessage}");
}
catch (InvalidOperationException ex)
{
    Console.WriteLine($"State error: {ex.Message}");
}
catch (Exception ex)
{
    Console.WriteLine($"Unexpected error: {ex.Message}");
}
```

The request payload containing preview token details.

Optional query parameters appended to the request. See Class-Level Notes.

## CreateAsync

Asynchronously creates a preview token for the specified delivery token in the stack.

#### Validation

Throws `InvalidOperationException` with message:

*   "You are not logged in. Log in and try again." if the client has no active auth session.
*   "Operation not allowed on this model. Update your request and try again." if the `PreviewToken` object already has a UID assigned. `CreateAsync()` only supports creating new preview tokens.

For authentication and rate-limit errors (401, 403, 429), see Class-Level Notes.

HTTP Status

Cause

Fix

404

The `deliveryTokenUid` passed to the constructor does not exist in this stack.

Verify the delivery token UID in the Contentstack UI before calling.

422

The request payload is invalid, malformed, or missing required fields.

Ensure `PreviewTokenModel` has all required fields set before calling `CreateAsync()`.

#### Behavior

Executes the HTTP POST asynchronously and does not block the calling thread. Retry behavior applies. See Class-Level Notes, Rate Limiting & Retry.

```
Basic usage — asynchronously create a preview token
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;

// Initialize the client
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

// Build the preview token model
PreviewTokenModel model = new PreviewTokenModel()
{
    Name = "Sample Preview Token",
    Description = "This is a sample preview token."
};

try
{
    // Await the async create call
    ContentstackResponse contentstackResponse = await client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .CreateAsync(model);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}All parameters — async with a ParameterCollection
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;
using Contentstack.Management.Core.Queryable;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

PreviewTokenModel model = new PreviewTokenModel()
{
    Name = "Sample Preview Token",
    Description = "This is a sample preview token."
};

ParameterCollection collection = new ParameterCollection();
collection.Add("include_branch", true);

try
{
    ContentstackResponse contentstackResponse = await client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .CreateAsync(model);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}Error handling — catching async exceptions
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

PreviewTokenModel model = new PreviewTokenModel()
{
    Name = "Sample Preview Token",
    Description = "This is a sample preview token."
};

try
{
    // Always await directly to surface exceptions correctly
    ContentstackResponse contentstackResponse = await client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .CreateAsync(model);
}
catch (ContentstackErrorException ex)
{
    Console.WriteLine($"API error {ex.StatusCode}: {ex.ErrorMessage}");
}
catch (InvalidOperationException ex)
{
    Console.WriteLine($"State error: {ex.Message}");
}
catch (Exception ex)
{
    Console.WriteLine($"Unexpected error: {ex.Message}");
}
```

The request payload containing preview token details.

Optional query parameters appended to the request. See Class-Level Notes.

## Delete

Deletes the preview token associated with the specified delivery token.

This method does not require a separate preview token UID. It deletes the preview token associated with the `deliveryTokenUid` passed to the class constructor.

**Warning:** This operation is irreversible. Deleted preview tokens cannot be recovered. Verify the delivery token UID before calling this method.

#### Validation

Throws `InvalidOperationException` with message "You are not logged in. Log in and try again." if the client has no active auth session.

For authentication and rate-limit errors (401, 403, 429), see Class-Level Notes.

HTTP Status

Cause

Fix

404

The `deliveryTokenUid` does not exist or has no associated preview token.

Verify the delivery token UID before calling `Delete()`.

#### Behavior

Sends a single HTTP DELETE request to the Management API. This operation is irreversible and cannot be undone via the SDK.

```
Basic usage — delete the preview token for a delivery token
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;

// Initialize the client
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

try
{
    // Delete the preview token scoped to the specified delivery token
    ContentstackResponse contentstackResponse = client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .Delete();
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}All parameters — with a ParameterCollection
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;
using Contentstack.Management.Core.Queryable;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ParameterCollection collection = new ParameterCollection();
collection.Add("include_branch", true);

try
{
    ContentstackResponse contentstackResponse = client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .Delete(collection);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}Error handling — catching a 404 when the preview token does not exist
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

try
{
    ContentstackResponse contentstackResponse = client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .Delete();
}
catch (ContentstackErrorException ex)
{
    Console.WriteLine($"API error {ex.StatusCode}: {ex.ErrorMessage}");
}
catch (InvalidOperationException ex)
{
    Console.WriteLine($"State error: {ex.Message}");
}
catch (Exception ex)
{
    Console.WriteLine($"Unexpected error: {ex.Message}");
}
```

Optional query parameters appended to the request. See Class-Level Notes.

## DeleteAsync

Asynchronously deletes the preview token associated with the specified delivery token.

This method does not require a separate preview token UID. It deletes the preview token associated with the `deliveryTokenUid` passed to the class constructor.

**Warning:** This operation is irreversible. Deleted preview tokens cannot be recovered. Verify the delivery token UID before calling this method.

#### Validation

Throws `InvalidOperationException` with message "You are not logged in. Log in and try again." if the client has no active auth session.

For authentication and rate-limit errors (401, 403, 429), see Class-Level Notes.

HTTP Status

Cause

Fix

404

The `deliveryTokenUid` does not exist or has no associated preview token.

Verify the delivery token UID before calling `DeleteAsync()`.

#### Behavior

Executes the HTTP DELETE asynchronously and does not block the calling thread. This operation is irreversible. See Class-Level Notes, Async Methods for await and exception behavior.

```
Basic usage — asynchronously delete the preview token for a delivery token
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;

// Initialize the client
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

try
{
    // Await the async delete call
    ContentstackResponse contentstackResponse = await client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .DeleteAsync();
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}All parameters — async with a ParameterCollection
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;
using Contentstack.Management.Core.Queryable;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ParameterCollection collection = new ParameterCollection();
collection.Add("include_branch", true);

try
{
    ContentstackResponse contentstackResponse = await client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .DeleteAsync(collection);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}Error handling — catching async exceptions on a missing preview token
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;
using Contentstack.Management.Core.Models;
using Contentstack.Management.Core.Models.Token;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

try
{
    // Always await directly to surface exceptions correctly
    ContentstackResponse contentstackResponse = await client
        .Stack("<API_KEY>")
        .PreviewToken("<DELIVERY_TOKEN_UID>")
        .DeleteAsync();
}
catch (ContentstackErrorException ex)
{
    Console.WriteLine($"API error {ex.StatusCode}: {ex.ErrorMessage}");
}
catch (InvalidOperationException ex)
{
    Console.WriteLine($"State error: {ex.Message}");
}
catch (Exception ex)
{
    Console.WriteLine($"Unexpected error: {ex.Message}");
}
```

Optional query parameters appended to the request. See Class-Level Notes.