> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hiveku.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Send your first email in 5 minutes

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.

<Steps>
  <Step title="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.

    <Warning>
      The key's secret value is shown **only once** at creation. Store it in your secret manager or `.env` file immediately.
    </Warning>
  </Step>

  <Step title="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](/email/domains) for the full DNS details.
  </Step>

  <Step title="Install the SDK">
    ```bash theme={null}
    npm install @hiveku-apps/email
    ```
  </Step>

  <Step title="Send your first email">
    ```ts theme={null}
    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);
    ```

    <Tip>
      Always include a plain-text `text` version alongside `html`. It improves deliverability and gives clients without HTML support something to render.
    </Tip>
  </Step>

  <Step title="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.
  </Step>
</Steps>

## What's next

* Swap your `hk_test_` key for an `hk_live_` key to send real email.
* Set up [Webhooks](/email/webhooks) to track deliveries, bounces, and opens.
* Build reusable [Templates](/email/templates) for recurring emails.
* Review [Deliverability](/email/deliverability) best practices before your first marketing blast.
