Kontent.ai Management SDK for .NET
September 18, 2026 · View on GitHub
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
| Guide | What it answers |
|---|---|
| Configuration | Register a client, bind options, name several, tune retries and timeouts |
| Requests and results | Handle failures, choose an identifier, page through large listings |
| Content items and variants | Write and publish language variants, move them through a workflow |
| Models and rich text | Use generated content-type records, author rich text and inline components |
| Assets | Upload files, create assets, organize them |
| Content model | Change content types, snippets and taxonomies |
| Administration | Languages, workflows, spaces, webhooks, subscription-scoped endpoints |
| Upgrade guides | One 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.
IsSuccessis the check; atry/catchwill not fire. Cancellation and usage errors do throw — details. - The container owns a registered client. Dispose only one you built yourself — details.
ListXAsyncfetches and buffers every page before returning, and is all-or-nothing. Use theListXPageAsyncoverload for large sets — details.- Retries depend on the HTTP method. Every method retries on
429; other transient failures retry onlyGET,HEAD,OPTIONS,PUTandDELETE, so aPOSTorPATCHthat fails mid-flight is never replayed — details. - A multi-call helper is not a transaction.
CreateContentItemWithVariantAsynccan 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.