You’ll need: a verified sending domain, an API key with the
sending scope, Node.js 18+, and an Express app. See the Quickstart if you haven’t set these up.1
Install the SDK
2
Create the client
Store the key in an environment variable. Never hard-code it.
3
Send on sign-up, with an idempotency key
The key identifies the business event, not the request. Using the user’s ID means a retried request sends the same email once.
4
Handle failures
Retryable failures (See Errors, retries and limits for every status code.
429 and 5xx) are retried by the SDK. A permanent failure, such as an unverified domain (403), is thrown, so log it and alert:5
Test it
Sign up with your own address. Then check the email’s status:Retry the same sign-up request with the same
user.id to confirm the second send doesn’t deliver a duplicate.Next
- Handle bounces with webhooks to keep bad addresses out of future sends.
- Idempotency for a deeper look at safe retries.