Coffrify 0.2.0

dotnet add package Coffrify --version 0.2.0
                    
NuGet\Install-Package Coffrify -Version 0.2.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="Coffrify" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Coffrify" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Coffrify" />
                    
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 Coffrify --version 0.2.0
                    
#r "nuget: Coffrify, 0.2.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 Coffrify@0.2.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=Coffrify&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Coffrify&version=0.2.0
                    
Install as a Cake Tool

Coffrify — .NET SDK

Official .NET 8+ SDK for Coffrify, encrypted file transfer infrastructure.

Pure BCL (System.Net.Http, System.Security.Cryptography, System.Text.Json). Zero NuGet runtime deps.

Install

dotnet add package Coffrify

Quickstart

using Coffrify;

var coffrify = new CoffrifyClient(Environment.GetEnvironmentVariable("COFFRIFY_API_KEY")!);

var transfer = await coffrify.Transfers.CreateAsync(
    new[] { new TransferFileInput("rapport.pdf", 1_240_000, "application/pdf") },
    expiresInHours: 72,
    maxDownloads: 10,
    password: "s3cret!");
Console.WriteLine(transfer.GetProperty("share_url").GetString());

var hook = await coffrify.Webhooks.CreateAsync(
    name: "Production hook",
    url: "https://app.example.com/hooks/coffrify",
    events: new[] { "transfer.created", "transfer.scan_infected", "workspace.payment_failed" });
Console.WriteLine($"Save this secret: {hook.GetProperty("secret").GetString()}");

Resources

Every resource is a lazily-initialized property on CoffrifyClient. Methods are async and return System.Text.Json.JsonElement (the raw decoded response).

Property Surface
Transfers create, list, get, delete, clone, qrcode, rescan, folder assignment, email, export
Webhooks CRUD, test, rotate-secret, deliveries, get/search delivery, retry, replay, health, events
ApiKeys list, get, create, update, revoke, rotate
ApiTokens list, create, revoke (short-lived, scoped)
Audit list, export
Analytics summary
Branding get, update
Domains list, get, create, delete, verify
Folders list, create, update, delete
Collections CRUD + items (list/add/remove)
Members list, invitations (list/invite/revoke)
Notifications get, update
Gdpr export, deletion, consents, retention, acceptances
Sessions list, revoke
Downloads per-transfer download log
Alerts CRUD
Templates list, create, delete
Requests CRUD + submissions (drop-box inboxes)
Coffres CRUD + sections + items + access-log
MagicLinks list, create, revoke
Quotas check, storage, bandwidth, throughput
Billing subscription, usage, address, portal/checkout links, recommendation
Status services, incidents, subscribe
Recipients list, upsert, delete (address book)
Rooms list, create
Mfa status
Sso get, update (SAML)
Scim tokens (list/create/revoke), audit
Changelog list
Marketing newsletter, blog, docs/help search, pricing, subprocessors, legal, DPO
Workspace activity feed, global search, health score
Programmable narrative policy/share API (manifesto vocabulary)
// Programmable Confidentiality — share with a fluent policy.
var resp = await coffrify.Programmable.ShareAsync(
    new[] { new Dictionary<string, object?> { ["name"] = "ndaa.pdf", ["size"] = 1_024L } },
    new ProgrammableResource.Policy
    {
        MaxViews = 5,
        ExpiresIn = "12h",
        Geo = new[] { "FR", "DE" },
        RequirePassword = true,
    });

Webhook signature verification (ASP.NET Core)

app.MapPost("/hooks/coffrify", async (HttpRequest req) =>
{
    using var sr = new StreamReader(req.Body);
    var raw = await sr.ReadToEndAsync();
    var sig = req.Headers["X-Coffrify-Signature"].ToString();
    var v   = Webhook.Verify(raw, sig, Environment.GetEnvironmentVariable("COFFRIFY_WEBHOOK_SECRET")!);
    if (!v.Valid) return Results.BadRequest(v.Reason);

    return v.Event.GetProperty("type").GetString() switch
    {
        "transfer.downloaded" => Results.Ok(),
        _ => Results.Ok(),
    };
});

The header has the form t=<timestamp>,v1=<hmac_hex>. Verification:

  1. Confirms the timestamp is within ±5 minutes (replay protection).
  2. Recomputes HMAC-SHA256 in constant time (CryptographicOperations.FixedTimeEquals).

License

MIT.

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
0.2.0 162 6/22/2026