Skip to content
emailkit
Esc
navigateopen⌘Jpreview
On this page

mailbox.onCreated

A mailbox was created through the API.

Fires when a mailbox is created through emailkit.mailboxes.create(), on providers that support it. Save the mailbox so your app knows the address exists.

hooks: {
  mailbox: {
    onCreated: async ({ emailDriver, mailbox }) => {
      await prisma.appMailbox.create({
        data: { emailDriver, email: mailbox.email, mailbox },
      });
    },
  },
},

Payload

PropType
emailDriverstring
Typestring
mailboxMailbox
TypeMailbox
context?unknown
Typeunknown

Last updated on July 24, 2026

Was this page helpful?