.NET SDK quickstart

Configure an issuer and issue a credential.

using DiligenceID;
using DiligenceID.Management.Models;
using DiligenceID.Product.Models;

const string ApiVersion = "2026-08-30";

var credential = new DiligenceApiKeyCredential(apiKey);
var endpoint = new Uri("https://api.example.diligence.id");

var management = DiligenceClients.CreateManagement(endpoint, credential);
var product = DiligenceClients.CreateProduct(endpoint, credential);

Create an organisation

var organisation = await management.Management.Organisations.PostAsync(
    new CreateOrganisationRequest
    {
        ExternalReference = "quickstart-org",
        DisplayName = "Quickstart Organisation",
        LegalName = "Quickstart Organisation Limited",
        CountryCode = "NZ",
    },
    c => c.QueryParameters.ApiVersion = ApiVersion);

var organisationReference = organisation!.Properties!.Reference!;

Every Management call needs ApiVersion. Omitting it throws rather than quietly reaching some default.

Create and read an issuer

var issuer = await management.Management.Issuers.PostAsync(
    new CreatePublicIssuerRequest
    {
        DisplayName = "Quickstart Issuer",
        OrganisationReference = organisationReference,
    },
    c => c.QueryParameters.ApiVersion = ApiVersion);

var issuerId = issuer!.Name!;

var read = await management.Management.Issuers[issuerId].GetAsync(
    c => c.QueryParameters.ApiVersion = ApiVersion);

Console.WriteLine(read!.Properties!.DisplayName);
Console.WriteLine(read.SystemData!.CreatedAt);

The resource envelope is typed: Id, Name, Type, Etag, Properties, SystemData.

Update safely

await management.Management.Issuers[issuerId].PatchAsync(
    new PublicIssuerConfigurationRequest { DisplayName = "Quickstart Issuer (renamed)" },
    c =>
    {
        c.QueryParameters.ApiVersion = ApiVersion;
        c.Headers.Add("If-Match", read.Etag!);
    });

A stale tag throws rather than overwriting. See handle concurrency.

List

var issuers = await management.Management.Issuers.GetAsync(
    c => c.QueryParameters.ApiVersion = ApiVersion);

foreach (var item in issuers!.Value!)
{
    Console.WriteLine($"{item.IssuerId}: {item.Status}");
}

NextLink is null today. Loop on it anyway and adding pagination later costs you nothing.

Issue

var issuance = await product.V10.Credentials.Issuance.PostAsync(
    new CreateIssuanceTransactionRequest
    {
        IssuerId = issuerId,
        CredentialConfiguration = "membership-2026",
        ExternalSubjectReference = "subject-1",
    },
    c => c.Headers.Add("Idempotency-Key", "enrolment-2026-a41f9"));

Console.WriteLine(issuance!.Data!.Status);   // awaiting_wallet

awaiting_wallet is correct, not stuck — the offer is waiting for the holder.

Edit this page on GitHub