Skip to main content
This guide walks you from zero to sent in about five minutes. By the end, you will have a verified domain, an API key, and a working send() call.
1

Create an API key

In the Hiveku dashboard, go to Settings > Email > API Keys and click Create API Key.Give the key a name (e.g., dev-local), choose the email:send scope, and pick test mode. Test keys (prefixed hk_test_) simulate sends without hitting AWS SES — perfect while you are wiring things up.
The key’s secret value is shown only once at creation. Store it in your secret manager or .env file immediately.
2

Add and verify a domain

Go to Settings > Email > Domains > Add Domain and enter the subdomain you want to send from (e.g., mail.acme.com).Hiveku will show you three DKIM CNAME records, an SPF TXT record, and a recommended DMARC TXT record. Add all of these to your DNS provider, then click Verify. See Domains for the full DNS details.
3

Install the SDK

npm install @hiveku-apps/email
4

Send your first email

import { Hiveku } from "@hiveku-apps/email";

const hiveku = new Hiveku({ apiKey: process.env.HIVEKU_API_KEY! });

const { messageId } = await hiveku.emails.send({
  from: "Acme <noreply@mail.acme.com>",
  to: "customer@example.com",
  subject: "Welcome to Acme",
  html: "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
  text: "Welcome! Thanks for signing up.",
});

console.log("Sent:", messageId);
Always include a plain-text text version alongside html. It improves deliverability and gives clients without HTML support something to render.
5

Check the logs

Go to Settings > Email > Logs in the dashboard to see the send you just made. For test-mode keys, the log shows the simulated send with the full payload so you can verify your template rendered correctly.

What’s next

  • Swap your hk_test_ key for an hk_live_ key to send real email.
  • Set up Webhooks to track deliveries, bounces, and opens.
  • Build reusable Templates for recurring emails.
  • Review Deliverability best practices before your first marketing blast.