Kontent.ai Management SDK for .NET

September 18, 2026 · View on GitHub

Stable Latest Downloads

The official .NET SDK for the Kontent.ai Management API — programmatic read/write access to your environments: content items, language variants, content models, assets, taxonomies, workflows and administration.

Use this SDK to author and manage content. To serve published content to an application, use the Delivery SDK instead.

Guides

GuideWhat it answers
ConfigurationRegister a client, bind options, name several, tune retries and timeouts
Requests and resultsHandle failures, choose an identifier, page through large listings
Content items and variantsWrite and publish language variants, move them through a workflow
Models and rich textUse generated content-type records, author rich text and inline components
AssetsUpload files, create assets, organize them
Content modelChange content types, snippets and taxonomies
AdministrationLanguages, workflows, spaces, webhooks, subscription-scoped endpoints
Upgrade guidesOne per major: 8 → 9

Installation

dotnet add package Kontent.Ai.Management

Targets net10.0. See the changelog for what each release changed.

Coming from 8.x, read 8 → 9 first — the API changed shape throughout.

Prerequisites

  • The Management API must be activated for your environment.
  • A Management API key, and your environment ID — both from Environment settings → API keys in Kontent.ai. See Making requests.
  • Subscription-scoped endpoints need a different key — see subscription-scoped operations.

Quick Start

A standalone client, which suits a script or a simple app. Replace on_roasts with a content item codename that exists in your environment.

using Kontent.Ai.Management;
using Kontent.Ai.Management.Configuration;
using Kontent.Ai.Management.Models.Shared;

await using var client = new ManagementClient(new ManagementOptions
{
    EnvironmentId = "<YOUR_ENVIRONMENT_ID>",
    ApiKey = "<YOUR_API_KEY>"
});

var result = await client.GetContentItemAsync(Reference.ByCodename("on_roasts"));

if (result.IsSuccess)
{
    Console.WriteLine(result.Value.Name);
}
else
{
    Console.WriteLine($"{result.StatusCode}: {result.Error?.Message}");
}

That returns the item's metadata. Element values live in its language variants — see content items and variants.

Use in an application

Register the client and inject IManagementClient:

using Kontent.Ai.Management.Extensions;

services.AddManagementClient(management => management.Options.Configure(options =>
{
    options.EnvironmentId = "<YOUR_ENVIRONMENT_ID>";
    options.ApiKey = "<YOUR_API_KEY>";
}));

Binding from configuration, several named clients, and transport customization are in configuration.

Essential behavior

  • Failures come back as results, not exceptions. IsSuccess is the check; a try/catch will not fire. Cancellation and usage errors do throw — details.
  • The container owns a registered client. Dispose only one you built yourself — details.
  • ListXAsync fetches and buffers every page before returning, and is all-or-nothing. Use the ListXPageAsync overload for large sets — details.
  • Retries depend on the HTTP method. Every method retries on 429; other transient failures retry only GET, HEAD, OPTIONS, PUT and DELETE, so a POST or PATCH that fails mid-flight is never replayed — details.
  • A multi-call helper is not a transaction. CreateContentItemWithVariantAsync can leave an item with no variant — details.

Contributing

See the contributing page for where to file issues, start discussions, and begin contributing.

License

Distributed under the MIT License — see LICENSE.md for details.