PluginsResend
Resend Database Schema
Database entities and querying synced Resend data
The Resend plugin automatically syncs data from Resend to your database. This allows you to query Resend data without making API calls, providing faster access and offline capabilities.
New to Corsair? Learn about core concepts like database operations, data synchronization, and multi-tenancy before working with the database.
Full Implementation: For the complete, up-to-date database schema and implementations, see the Resend plugin source code on GitHub.
Synced Entities
The Resend plugin syncs the following entities to your database:
- emails - Sent email messages
- domains - Email domains
Database API
Access synced data through the db property:
const emails = await corsair.resend.db.emails.search({
data: { from: "onboarding@resend.com" },
});Emails
Schema
{
id: string;
from: string;
to: string[];
subject?: string;
created_at?: Date | null;
}Querying Emails
Search by sender:
const emails = await corsair.resend.db.emails.search({
data: { from: "onboarding@resend.com" },
});Domains
Schema
{
id: string;
name: string;
status: 'not_started' | 'validation' | 'scheduled' | 'ready' | 'error' | 'verified' | 'pending' | 'failed';
created_at?: Date | null;
region?: string;
}Querying Domains
Search by name:
const domains = await corsair.resend.db.domains.search({
data: { name: "example.com" },
});Find verified domains:
const verifiedDomains = await corsair.resend.db.domains.search({
data: { status: "verified" },
});See Database for more information about database concepts and querying patterns.