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

# TermModel

## TermModel

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

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

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

**Returns:** TermModel. The details of a taxonomy term.

## Properties

Name

Type

Required

Default

Description

Uid

string?

No

null

Term UID. Set it to create a term. Serialized as uid.

Name

string?

No

null

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

TaxonomyUid

string?

No

null

UID of the taxonomy that holds the term. The API sets it. Serialized as taxonomy\_uid.

ParentUid

string?

No

null

UID of the parent term. null places the term at the root level. Serialized as parent\_uid.

Depth

int?

No

null

Level of the term in the hierarchy. The API sets it. Serialized as depth.

ChildrenCount

int?

No

null

Number of child terms. The API sets it. Serialized as children\_count.

ReferencedEntriesCount

int?

No

null

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

Ancestors

List<TermAncestorDescendant>?

No

null

Terms above this term. The API sets it. Serialized as ancestors.

Descendants

List<TermAncestorDescendant>?

No

null

Terms below this term. The API sets it. Serialized as descendants.

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.

The Ancestors and Descendants lists hold [TermAncestorDescendant](/docs/developers/sdks/content-management-sdk/dot-net/reference/termancestordescendant) objects.

## 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 and Name set produces a body with only uid and name, which creates a root-level term.
*   Leave TaxonomyUid, the counts, Depth, Ancestors, Descendants, and the dates unset in a request. The API sets them, and the API reference documents no effect for them in a request.

**Position is not part of the model.**

*   TermModel has no order property, so Create cannot set the position of a term among its siblings. Call [Move](/docs/developers/sdks/content-management-sdk/dot-net/reference/term#term-move) with a [TermMoveModel](/docs/developers/sdks/content-management-sdk/dot-net/reference/termmovemodel) after you create the term.

**Counts appear only on request.**

*   The API returns ChildrenCount and ReferencedEntriesCount only when you pass include\_children\_count or include\_referenced\_entries\_count. 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

TermModel 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/term#term-create), [Update](/docs/developers/sdks/content-management-sdk/dot-net/reference/term#term-update), or [Localize](/docs/developers/sdks/content-management-sdk/dot-net/reference/term#term-localize) method.

## Class-Level Snippet

The snippet below creates a child term, then reads it 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>");
Taxonomy taxonomy = client.Stack("<API_KEY>").Taxonomy("<TAXONOMY_UID>");

try
{
    TermModel model = new TermModel
    {
        Uid = "running_shoes",
        Name = "Running Shoes",
        ParentUid = "footwear"
    };
    taxonomy.Terms().Create(model);

    ContentstackResponse response = taxonomy.Terms("running_shoes").Fetch();
    TermModel? term = response.OpenJsonObjectResponse()["term"]?.Deserialize<TermModel>();
    Console.WriteLine($"{term?.Name} sits at depth {term?.Depth} in {term?.TaxonomyUid}");
}
catch (ContentstackErrorException e)
{
    // Thrown when the API rejects a request, for example an unknown parent term
    Console.WriteLine($"Request failed: {(int)e.StatusCode} {e.ErrorCode} {e.ErrorMessage}");
}
```

## TermModel | .NET Management SDK | Contentstack

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