API Referencev1

C# and .NET SDK

Install the Nexra .NET SDK, sign in, start runs, follow cursor pages and verify event webhooks from C#.

Updated 14/10/2026

On this page

Install

The C# and .NET SDK is awaiting publication to NuGet. Registry installation will be available here once the release is verified.

For access to the prepared package, contact contact@amakoragroup.com. You can also use the REST API.

Quickstart

Sign in once with the Nexra CLI (nexra auth login) to get an access token.

The token acts with your own role in the workspace.

csharp
using Amakora.Nexra;

using var nexra = new NexraClient(new NexraClientOptions
{
    Token = Environment.GetEnvironmentVariable("NEXRA_TOKEN"),        // the default
    WorkspaceId = Environment.GetEnvironmentVariable("NEXRA_WORKSPACE_ID"), // the default
});

foreach (var integration in await nexra.Integrations.ListIntegrationsAsync())
    Console.WriteLine($"{integration.Name} {integration.Status}");

// Start a run. An idempotency key is added for you, so a retry never starts a second run.
var run = await nexra.StartRunAsync("cmflow01orders");

var detail = await nexra.Runs.GetRunAsync(run.Id);
Console.WriteLine($"{detail.Status}: {detail.RecordsSucceeded} succeeded, {detail.RecordsFailed} failed");

Each area of the API is a property: Integrations, Flows, Runs,

Connections, Triggers, Reconciliation, Approvals, EventWebhooks,

Governance, Lifecycle, Schedules, FailedRecords, Templates,

Catalogue, EndUsers, Records, Pensions, Research, CompanyData and

Mcp. Models are in Amakora.Nexra.Model. Every method has a synchronous

and an Async form, plus WithHttpInfo forms that also return the status

and headers.

Errors

Refusals throw a subclass of NexraApiException with Status, Code,

RequestId and Nexra's message:

StatusException
400, 422NexraBadRequestException
401NexraAuthenticationException
403NexraPermissionException
404NexraNotFoundException
409NexraConflictException
429NexraRateLimitException (with RetryAfter)
5xxNexraServerException
csharp
try
{
    var flow = await nexra.Flows.GetFlowAsync("cmflow01orders");
}
catch (NexraNotFoundException error)
{
    Console.WriteLine($"No such flow (request {error.RequestId})");
}

Retries

Requests are retried up to 3 times with exponential backoff and jitter on

network errors and on 408, 425, 429, 500, 502, 503 and 504, honouring

Retry-After. A POST or PATCH is only retried when Nexra did not act on it

(429) or when its body has an idempotencyKey. Change this with

Retry = new RetryOptions { MaxRetries = 5 }, or set MaxRetries = 0 to turn

it off.

Cursor pages

Most lists return the newest items as a list. Governance lists return

Items and NextCursor; NexraPagination.PaginateAsync follows the cursor:

csharp
await foreach (var entry in NexraPagination.PaginateAsync(async (cursor, ct) =>
{
    var page = await nexra.Governance.ListEvidenceAsync(cursor: cursor, cancellationToken: ct);
    return new Page<EvidenceEntry>(page.Items, page.NextCursor);
}))
{
    Console.WriteLine($"{entry.Sequence} {entry.EventType}");
}

Verify event webhooks

Nexra signs each event delivery with your endpoint's signing secret. Verify

against the raw body before parsing it:

csharp
// ASP.NET Core minimal API
app.MapPost("/nexra/events", async (HttpRequest request) =>
{
    using var reader = new StreamReader(request.Body);
    var rawBody = await reader.ReadToEndAsync();
    try
    {
        var nexraEvent = NexraWebhooks.ConstructEvent(rawBody, request.Headers[NexraWebhooks.SignatureHeader], secret);
        // De-duplicate on nexraEvent.Id, queue the work, answer quickly.
        return Results.NoContent();
    }
    catch (WebhookVerificationException)
    {
        return Results.BadRequest();
    }
});

Signatures older than 5 minutes are refused. Answer with a 2xx within 8

seconds. nexraEvent.Data.ToObject<EventFlowRunFailed>() gives a typed payload.

Send events to a webhook trigger

csharp
var body = "{\"orderId\":\"1001\"}";
var headers = NexraWebhooks.SignTriggerRequest(body, triggerSecret, "order-1001-0001");

Versioning

This package follows semantic versioning from 1.0.0. The API it is built from

is dated (2026-10-01); Nexra adds operations and optional fields without a

new date, and a minor SDK release picks them up. A breaking API change gets a

new dated version and a new major SDK version.

Reference

Platform API: sign-in, headers, errors and limits

Platform API reference: every operation and field

Need a hand?

Ask Nexra Agent for implementation steps or error guidance.

Ask Nexra Agent