Skip to content

Resend

Nuget package dotnet License: MIT Discord

Features 🔥

  • Fully generated C# SDK based on official Resend OpenAPI specification using AutoSDK
  • Same day update to support new features
  • Updated and supported automatically if there are no breaking changes
  • All modern .NET features - nullability, trimming, NativeAOT, etc.
  • Support .Net Framework/.Net Standard 2.0

Usage

1
dotnet add package tryAGI.Resend
1
2
3
using Resend;

using var client = new ResendClient(apiKey);

Generate

1
2
3
4
5
6
7
8
var apiKey =
    Environment.GetEnvironmentVariable("RESEND_API_KEY") is { Length: > 0 } value
        ? value
        : throw new AssertInconclusiveException("RESEND_API_KEY environment variable is not found.");

using var client = new ResendClient(apiKey);

// The client has sub-clients for different API areas.

MeaiTools

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
var apiKey =
    Environment.GetEnvironmentVariable("RESEND_API_KEY") is { Length: > 0 } value
        ? value
        : throw new AssertInconclusiveException("RESEND_API_KEY environment variable is not found.");

using var client = new ResendClient(apiKey);

// Create tools for email sending, retrieval, domains, contacts, and templates.
var sendEmailTool = client.AsSendEmailTool();
var getEmailTool = client.AsGetEmailTool();
var listEmailsTool = client.AsListEmailsTool();
var listDomainsTool = client.AsListDomainsTool();
var listContactsTool = client.AsListContactsTool();
var listTemplatesTool = client.AsListTemplatesTool();

// These tools can be passed to any IChatClient that supports function calling.
var tools = new[] { sendEmailTool, getEmailTool, listEmailsTool, listDomainsTool, listContactsTool, listTemplatesTool };

Support

Priority place for bugs: https://github.com/tryAGI/Resend/issues
Priority place for ideas and general questions: https://github.com/tryAGI/Resend/discussions
Discord: https://discord.gg/Ca2xhfBf3v

Acknowledgments

JetBrains logo

This project is supported by JetBrains through the Open Source Support Program.