Skip to main content

Requirements

Before installing Nuxt Lettermint, ensure your project meets these requirements:
  • Nuxt 3.x or Nuxt 4.x
  • Node.js 16.x or higher

Installation Steps

1

Install the module

Choose your preferred package manager to install the module:
2

Add module to Nuxt config

Add nuxt-lettermint to the modules array in your nuxt.config.ts file:
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['nuxt-lettermint']
})
If you used the Nuxt CLI installation method, this step is done automatically.
3

Configure your API key

You need a Lettermint API key to send emails. Get your key from the Lettermint Dashboard.
4

Verify installation

Start your development server to verify the installation:
npm run dev
If everything is set up correctly, you should see no errors related to Lettermint in your console.

Configuration Options

The module accepts the following configuration options in nuxt.config.ts:
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['nuxt-lettermint'],
  lettermint: {
    // Your Lettermint API key
    apiKey: 'your-api-key',
    
    // Enable/disable the auto-generated /api/lettermint/send endpoint
    // Default: true
    autoEndpoint: true
  }
})

Auto-Generated Endpoint

By default, the module creates an endpoint at /api/lettermint/send for sending emails. This enables the client-side useLettermint() composable to work out of the box. If you prefer to create your own custom endpoints, you can disable this behavior:
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['nuxt-lettermint'],
  lettermint: {
    autoEndpoint: false
  }
})
When autoEndpoint is set to false, the client-side useLettermint() composable will not work unless you create a custom endpoint at /api/lettermint/send.

Get Your API Key

To obtain your Lettermint API key:
1

Visit the Lettermint Dashboard

2

Select your project

Choose the project you want to use for sending emails
3

Copy your API token

Find and copy your API token from the project settings
Don’t have a Lettermint account yet? Sign up at lettermint.co to get started.

Next Steps

Quickstart

Learn how to send your first email

API Reference

Explore the complete API documentation

Build docs developers (and LLMs) love