PluginsResend
Resend
Integrate Resend email sending and domain management
Quick Start
Install the plugin:
pnpm install @corsair-dev/resendAdd the Resend plugin to your Corsair instance:
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-keySee 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-secretSee 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:
| Option | Type | Description |
|---|---|---|
authType | 'api_key' | Authentication method (defaults to 'api_key') |
key | string | API key (optional, uses database if not provided) |
webhookSecret | string | Webhook signing secret (optional) |
hooks | object | Endpoint hooks for custom logic |
webhookHooks | object | Webhook hooks for event handling |
errorHandlers | object | Custom error handlers |
For complete documentation on getting credentials, see the Plugin Credentials Guide.