C# SDK

Install and start using the C# SDK.

Intro

The Mist API SDK provides access to the Mist API REST APIs.

Version: 2610.1.0

Date: October 1, 2026

NOTE:
Some important API changes will be introduced. Please make sure to read the announcements

Additional Documentation

Helpful Resources

Mist Web Browser Extension:


Installation

Add the SDK as a project reference into your solution:

Terminal
dotnet add reference <path-to-sdk>/src/MistApi/MistApi.csproj

The project takes its build settings from the files around it, so reference it in place.

Quick Start

Dependency Injection

Register the client with IServiceCollection and resolve it from the container. The HttpClient is managed by IHttpClientFactory. Configure the client's behavior through MistApiClientOptions.

C#
services.AddMistApiClient(options =>
{
    options.ApiToken = "YOUR_API_KEY";
    options.CsrfToken = "YOUR_API_KEY";
    options.Environment = ServerEnvironment.MistGlobal01;
    // TODO: configure more client options here
});

Direct Instantiation

Create the client by passing an HttpClient you manage yourself. Configure the client's behavior through MistApiClientOptions.

C#
var httpClient = new HttpClient();
// TODO: configure more client options here
var options = new MistApiClientOptions
{
    ApiToken = "YOUR_API_KEY",
    CsrfToken = "YOUR_API_KEY",
    Environment = ServerEnvironment.MistGlobal01,
};
var client = new MistApiClient(httpClient, options);

On this page