Create an API key
Create and save the API key your app will use to send email.
Save the secret before closing
Your secret is shown only once—copy and store it before closing.
1. One key for the API and SMTP
You only need one API key to get started. Send through the HTTP API with it as a Bearer token (learn more →), or send through SMTP with it as the password (learn more →).
2. Create the key
- In your workspace, open Credentials and click Create credential.
- Enter a recognizable Name, such as
Production backend. - Choose an Expiry.
- Click Create.
The Save this secret now dialog opens with your new key.
3. Save it in your app
Copy the full API key into your app's environment configuration or secrets manager. The identifier in the credentials list isn't a substitute for the secret.
Click I've saved it, then close the Send a test message dialog when you're done. Your credential appears in the list with status active.
Best practices
- Create a separate credential for each app or environment, with a name you'll recognize later.
- Keep secrets out of browser code, source control and shared screenshots.
- If a secret is exposed, follow Leaked credentials.