Quickstart
Go from an empty account to a sent message using the shared sandbox address, inspect the result in your team dashboard, and then prepare your own sending domain.
Sign in or create an account to open your team workspace, then create an API key in the dashboard. Hermesmail keys start with hm_ and are displayed in full only once at creation time.
Store the key in your shell environment as HERMESMAIL_API_KEY rather than committing it to source control.
Before adding a domain of your own, send from [email protected] as your sender address. While your team has no verified domain, the shared sandbox sender delivers to your team members' own account addresses and to the simulated test addresses documented in Testing without a domain.
The examples below send to [email protected] so they run immediately without touching a real mailbox.
curl -sS -X POST https://api.hermesmail.app/emails \
-H "Authorization: Bearer $HERMESMAIL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "[email protected]",
"to": "[email protected]",
"subject": "Quickstart email via cURL",
"text": "Sent from the Hermesmail sandbox address."
}'
Install the resend Node SDK package pinned to version
6.39.0
(see the Node.js guide for setup details), then run this script pointed at https://api.hermesmail.app:
import { Resend } from 'resend';
const resend = new Resend(process.env.HERMESMAIL_API_KEY, {
baseUrl: process.env.RESEND_BASE_URL || 'https://api.hermesmail.app',
});
const { data, error } = await resend.emails.send({
from: '[email protected]',
to: ['[email protected]'],
subject: 'Quickstart email via Node.js',
text: 'Sent from the Hermesmail sandbox address with the Node SDK.',
});
if (error) {
console.error(JSON.stringify(error));
process.exitCode = 1;
} else {
console.log(JSON.stringify(data));
}
Both requests return HTTP 200 with a JSON object holding the new message's id.
Open the Emails page in your team dashboard to locate the message by subject, recipient or id. Select the row to review the sender, recipients, headers and delivery event timeline, or call GET /emails/{email_id} with a full_access key to fetch the same details programmatically.
To deliver mail from your own address to external recipients outside your team, add and verify a sending domain in the dashboard. Follow Sending domains and DNS for the DKIM, MAIL FROM MX, SPF and optional DMARC records and provider-specific DNS walkthroughs.
From here, explore:
- Testing without a domain for simulated bounces, complaints, suppressions and
+labelruns. - Node.js guide and cURL guide for batches, attachments and error handling.
- Webhooks for signed delivery notifications and Limits for rate limits and quotas.