Skip to main content
The Courier C# SDK gives typed access to the from C#. It targets .NET Standard 2.0, uses async/await throughout, and returns typed response objects. Available on NuGet and GitHub.

Installation

Install the package from NuGet:
Requires .NET Standard 2.0 or later.

Quick start

The client reads COURIER_API_KEY from your environment. You can also set it explicitly: new CourierClient { ApiKey = "YOUR_COURIER_API_KEY" }.

Authentication

Get your API key from . Set it as an environment variable:
Or pass it to the client:

Sending notifications

Design your notification in , then reference it by ID:

Available resources

The SDK covers the full Courier API. Every method is async and returns typed models.

Common operations

Checking message status

Managing user profiles

Issuing JWT tokens

Courier’s (React, JavaScript, mobile) authenticate users with a JWT your backend issues. covers the token flow, the scope strings, and token refresh. Use client.Auth.IssueToken:

Configuration

Error handling

When the API returns a non-success status code, the SDK throws a CourierApiException:

Retries and timeouts

The SDK retries failed requests up to 2 times with exponential backoff. Use WithOptions to configure per-request:
WithOptions returns a new client instance. The original is unchanged.

Journeys

are multi-step workflows: send, delay, branch, throttle, digest, and more. Invoke one by ID or alias to start a run. Cancel runs by ID, or by a shared cancelation token.
client.Journeys.Cancel(...) takes exactly one of run_id or cancelation_token (spelled with one “l”). Build and manage journeys from code with Create, List, Publish, and Archive. See .

More operations

A few more resources from the full :

API Reference

Full REST API docs with request/response examples.

Send API

Learn about the Send endpoint, routing, and message options.

Quickstart

Send your first notification in under two minutes.

GitHub

Source code, issues, and changelog.

Idempotent sends

Pass an idempotency key and Courier replays the first response for that key instead of sending again. The SDK sets the Idempotency-Key header for you. covers the scoping rule and the replay window.