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

# TaxonomyModel

## TaxonomyModel

TaxonomyModel holds the details of a taxonomy. To create a taxonomy with the [Create](/docs/developers/sdks/content-management-sdk/dot-net/reference/taxonomy#taxonomy-create) method, set Uid, Name, and optionally Description. The API fills the count and date fields when it returns a taxonomy.

**When to Use This Class:** Use this class to build the request body for a new, updated, or localized taxonomy. Use it to read a fetched taxonomy as a typed object.

**Conceptual Role:** Acts as the data model that the [Taxonomy](/docs/developers/sdks/content-management-sdk/dot-net/reference/taxonomy) class serializes under the taxonomy key of a request.

**Returns:** TaxonomyModel. The details of a taxonomy.

## Properties

Name

Type

Required

Default

Description

Uid

string?

No

null

Taxonomy UID, unique in the stack. Set it to create a taxonomy. Serialized as uid.

Name

string?

No

null

Display name of the taxonomy. Set it to create a taxonomy. Serialized as name.

Description

string?

No

null

Description of the taxonomy. Serialized as description.

Locale

string?

No

null

Locale code of this version of the taxonomy. Serialized as locale.

TermsCount

int?

No

null

Number of terms in the taxonomy. The API sets it. Serialized as terms\_count.

ReferencedTermsCount

int?

No

null

Number of terms that entries use. The API sets it. Serialized as referenced\_terms\_count.

ReferencedEntriesCount

int?

No

null

Number of entries that use the terms. The API sets it. Serialized as referenced\_entries\_count.

ReferencedContentTypeCount

int?

No

null

Number of content types that use the taxonomy. The API sets it. Serialized as referenced\_content\_type\_count.

CreatedAt

string?

No

null

Creation time as an ISO 8601 string. The API sets it. Serialized as created\_at.

UpdatedAt

string?

No

null

Last update time as an ISO 8601 string. The API sets it. Serialized as updated\_at.

Uuid

string?

No

null

Internal identifier the API returns with the taxonomy. Serialized as uuid.

## Class-Level Notes

**Fields you send and fields the API sets.**

*   The SDK serializes every property that is not null and leaves out the null ones. A model with only Uid, Name, and Description set produces a body with only uid, name, and description.
*   Leave the count, date, and Uuid properties unset when you create or update a taxonomy. The API sets them, and the API reference documents no effect for them in a request.
*   To localize a taxonomy, pass the target locale as the locale query parameter in the collection of [Localize](/docs/developers/sdks/content-management-sdk/dot-net/reference/taxonomy#taxonomy-localize). The API reference documents that parameter as the locale the API writes, and documents no effect for the Locale property in a request.

**Counts appear only on request.**

*   The API returns TermsCount, ReferencedTermsCount, and ReferencedEntriesCount only when you pass the matching include\_\* query parameter to [Fetch](/docs/developers/sdks/content-management-sdk/dot-net/reference/taxonomy#taxonomy-fetch) or to the taxonomy query. The properties stay null otherwise.

**Dates are strings.**

*   CreatedAt and UpdatedAt hold the timestamp string the API returns. Parse them with DateTimeOffset.Parse when you need a date value.

## Method Index

TaxonomyModel has no methods. Set and read its properties directly, and pass the model to the [Create](/docs/developers/sdks/content-management-sdk/dot-net/reference/taxonomy#taxonomy-create), [Update](/docs/developers/sdks/content-management-sdk/dot-net/reference/taxonomy#taxonomy-update), or [Localize](/docs/developers/sdks/content-management-sdk/dot-net/reference/taxonomy#taxonomy-localize) method.

## Class-Level Snippet

The snippet below builds a model to create a taxonomy, then reads the created taxonomy back into a second model.

```
using System;
using System.Text.Json;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;
using Contentstack.Management.Core.Models;

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

try
{
    TaxonomyModel model = new TaxonomyModel
    {
        Uid = "product_category",
        Name = "Product Category",
        Description = "Categories for the product catalog"
    };
    ContentstackResponse response = stack.Taxonomy().Create(model);

    TaxonomyModel? created = response.OpenJsonObjectResponse()["taxonomy"]?.Deserialize<TaxonomyModel>();
    Console.WriteLine($"Created {created?.Uid} at {created?.CreatedAt}");
}
catch (ContentstackErrorException e)
{
    // Thrown when the API rejects the request, for example a duplicate UID
    Console.WriteLine($"Request failed: {(int)e.StatusCode} {e.ErrorCode} {e.ErrorMessage}");
}
```

## TaxonomyModel | .NET Management SDK | Contentstack

TaxonomyModel in the .NET Management SDK holds the details of a taxonomy: the fields you send to create, update, or localize it, and the fields the API returns.