Transmitly.Client 1.0.0

dotnet add package Transmitly.Client --version 1.0.0
                    
NuGet\Install-Package Transmitly.Client -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Transmitly.Client" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Transmitly.Client" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Transmitly.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Transmitly.Client --version 1.0.0
                    
#r "nuget: Transmitly.Client, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Transmitly.Client@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Transmitly.Client&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Transmitly.Client&version=1.0.0
                    
Install as a Cake Tool

Transmitly .NET SDK

Dependency-free .NET 8 client for the Transmitly API.

# from the platform repository
dotnet add reference sdk/dotnet/Transmitly/Transmitly.csproj

# once published
# dotnet add package Transmitly.Client
using Transmitly;

var tx = new TransmitlyClient(Environment.GetEnvironmentVariable("TRANSMITLY_API_KEY")!);

var accepted = await tx.Emails.SendAsync(new EmailMessage
{
    From = "Notify <notify@mail.acme.com>",
    To = new[] { "ada@example.net" },
    Subject = "Your workspace is ready",
    Html = "<p>Welcome.</p>",
    ReplyTo = "Support <support@acme.com>",
    Tags = new Dictionary<string, string> { ["flow"] = "onboarding" },
});
// accepted.Id, accepted.Recipients

SendAsync generates an idempotency key. Pass idempotencyKey: to control it yourself; retries with the same key return the original message.

ASP.NET Core

Register one client and inject it into controllers, minimal APIs or workers:

// Program.cs
builder.Services.AddSingleton(_ =>
    new TransmitlyClient(builder.Configuration["Transmitly:ApiKey"]
        ?? throw new InvalidOperationException("Transmitly:ApiKey is required")));
app.MapPost("/welcome", async (TransmitlyClient tx, string email) =>
{
    var accepted = await tx.Emails.SendAsync(new EmailMessage
    {
        From = "Notify <notify@mail.acme.com>",
        To = new[] { email },
        Subject = "Welcome to Acme",
        Html = "<p>Your workspace is ready.</p>",
    });
    return Results.Accepted($"/messages/{accepted.Id}", new { accepted.Id });
});

Keep the API key in configuration or a secret store. Never ship it to a client application.

Resources

await tx.Emails.GetAsync(messageId);
await tx.Messages.ListAsync(status: "bounced", limit: 20);
await tx.Messages.DeliveriesAsync(messageId);
await tx.Domains.ListAsync();
await tx.Domains.CreateAsync("mail.acme.com");
await tx.Domains.VerifyAsync(domainId);
await tx.Suppressions.ListAsync();
await tx.Suppressions.AddAsync(new SuppressionInput { Email = "bounce@example.net", Reason = "manual" });
await tx.Webhooks.ListAsync();
await tx.Webhooks.CreateAsync(new WebhookInput
{
    Url = "https://api.acme.com/hooks",
    Events = new[] { "email.delivered_to_mx" },
});
await tx.Inbound.RoutesAsync();
await tx.Usage.GetAsync();
await tx.Events.ListAsync(limit: 50);

Resources other than Emails.SendAsync return JsonElement so new fields do not require an SDK release:

var messages = await tx.Messages.ListAsync(status: "bounced");
foreach (var message in messages.GetProperty("messages").EnumerateArray())
{
    Console.WriteLine(message.GetProperty("id").GetString());
}

Attachments

await tx.Emails.SendAsync(new EmailMessage
{
    From = "Notify <notify@mail.acme.com>",
    To = new[] { "ada@example.net" },
    Subject = "November invoice",
    Html = "<p>Attached.</p>",
    Attachments = new[] { Attachment.FromFile("invoice.pdf", contentType: "application/pdf") },
});

Webhooks

Verify the raw request body before deserializing it:

app.MapPost("/webhooks/transmitly", async (HttpRequest request) =>
{
    using var reader = new StreamReader(request.Body);
    var raw = await reader.ReadToEndAsync();
    var signature = request.Headers["Transmitly-Signature"].ToString();
    var secret = builder.Configuration["Transmitly:WebhookSecret"]!;

    if (!TransmitlyClient.VerifyWebhook(raw, signature, secret))
    {
        return Results.BadRequest();
    }

    // Deserialize and handle only after the signature passes.
    return Results.Ok();
});

Non-2xx responses throw TransmitlyException with Status, Code, Details and Payload. Domain, webhook and inbound management require an API key with the admin scope.

dotnet pack Transmitly/Transmitly.csproj -c Release
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 98 11/17/2026