Corsair
PluginsResend

Resend

Integrate Resend email sending and domain management

Quick Start

Install the plugin:

pnpm install @corsair-dev/resend

Add the Resend plugin to your Corsair instance:

corsair.ts
import { createCorsair } from "corsair";
import { resend } from "@corsair-dev/resend";

export const corsair = createCorsair({
    plugins: [
        resend(),
    ],
});

Once configured, you can access the Resend API through your Corsair instance:

await corsair.resend.api.emails.send({
    from: "hello@example.com",
    to: "user@example.com",
    subject: "Hello",
    html: "<p>Hello world!</p>",
});

Authentication

Supported Auth Types

The Resend plugin uses API key authentication.

  • api_key (default) - API key authentication

API Key Setup

Store credentials with the CLI:

pnpm corsair setup --resend api_key=your-api-key

See Get Credentials for step-by-step instructions on obtaining an API key.

Webhook Secret

Store the webhook secret with the CLI:

pnpm corsair setup --resend webhook_signature=your-webhook-secret

See Get Credentials for step-by-step instructions on setting up webhooks.

See Authentication for details on managing credentials.

Options

The Resend plugin accepts the following configuration options:

OptionTypeDescription
authType'api_key'Authentication method (defaults to 'api_key')
keystringAPI key (optional, uses database if not provided)
webhookSecretstringWebhook signing secret (optional)
hooksobjectEndpoint hooks for custom logic
webhookHooksobjectWebhook hooks for event handling
errorHandlersobjectCustom error handlers

For complete documentation on getting credentials, see the Plugin Credentials Guide.