Skip to main content
API keys authenticate your requests to the Nuntly API and SMTP server. Every key starts with ntly_.

Create an API key

1

Go to API keys

In the dashboard, go to API Keys.The API keys page showing a button to create a new key
2

Name your key

Enter a descriptive name for the key (for example, “Production” or “Development”).The API keys dialog showing the name input field and the create button
3

Create the key

Click Create.The API key created dialog showing the API key value and a copy buttonThe API Key value is displayed once at creation. Copy it before closing. You will not be able to retrieve it again.
Store your API key in an environment variable or a secrets manager. Never hardcode it in your source code or commit it to version control.

Use your API key

With the SDK

Pass your key when initializing the Nuntly client:
import { Nuntly } from '@nuntly/sdk';

const nuntly = new Nuntly({
  apiKey: process.env.NUNTLY_API_KEY,
});
See SDK setup for full installation instructions.

With the REST API

Include the key in the Authorization header of every request:
curl -X POST https://api.nuntly.com/emails \
  -H 'Authorization: Bearer ntly_your_api_key_here' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'

With SMTP

Use your API key as the SMTP password. See Send emails with SMTP for the full configuration.

Best practices

  • Use a separate key for each environment (development, staging, production)
  • Store keys in environment variables. Never put them in source code.
  • If a key is compromised, create a new one and update your configuration