domain.onCreated
A domain was registered with the provider — show your user its DNS records.
Fires when a domain is registered with the provider via emailkit.domains.create(). The event’s domain.verification.records are the DNS records your user needs to add — save the domain and show them.
hooks: {
domain: {
onCreated: async ({ emailDriver, domain }) => {
await prisma.sendingDomain.create({
data: {
emailDriver,
domain: domain.domain,
status: domain.status,
records: domain.verification?.records,
},
});
},
},
},
The full setup flow is covered in Manage domains.
Payload
PropType
emailDriverstring
Type
stringdomainDomain
Type
Domaincontext?unknown
Type
unknown