> ## 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

> From zero to your first campaign in under 20 minutes

This walkthrough takes you from a blank account to a scheduled campaign, using the AI agent along the way.

<Steps>
  <Step title="Enable Email Marketing">
    Email Marketing is off by default on the Hosting plan and on by default on Standard and Premium.

    * **If you're on Standard or Premium**: you already have it. Skip to step 2.
    * **If you're on Hosting** or a team admin turned it off: go to the SaaS admin panel and enable **Email Marketing** on your account, or ask your admin to toggle it on.

    When Email Marketing is enabled for the first time, Hiveku auto-seeds a default memory document, four skills, three rules, and the AI Email Coach persona into your account.
  </Step>

  <Step title="Verify a sending domain">
    You cannot schedule or send until at least one sending domain is **verified**.

    Go to **Dashboard → Project Settings → Email Service → Domains → Add a domain**. Enter a subdomain you own (e.g., `mail.acme.com`) and add the DKIM, SPF, and DMARC DNS records Hiveku provides to your DNS host.

    Once DNS propagates (typically 5-15 minutes), click **Verify**. For the full DNS walkthrough, see [Email Domains](/email/domains).

    <Warning>
      The AI agent will refuse to schedule a send until a verified domain exists — this is an intentional guardrail baked into the agent's core rules.
    </Warning>
  </Step>

  <Step title="Build an audience">
    Go to [**Dashboard → Marketing → Audiences**](https://app.hiveku.com/dashboard/marketing/audiences).

    Click the **Email AI** chat launcher (bottom-right, sky-blue) and try:

    > Build a dynamic audience called "Engaged trial users" — lifecycle stage is "trial" and they signed up in the last 30 days.

    The Email Coach will:

    1. Call `email_audience_create` with a `filter_json` of `{"lifecycle_stages":["trial"], "created_after":"2026-03-23"}` (or similar).
    2. Call `email_audience_preview` to show you the materialized size plus 10 sample contacts.
    3. Save the audience to your account.

    You can always build audiences manually with the inline form on the same page.
  </Step>

  <Step title="Create your first campaign">
    Go to [**Dashboard → Marketing → Campaigns**](https://app.hiveku.com/dashboard/marketing/campaigns) and click **New campaign**, or ask the AI:

    > Draft a newsletter for "Engaged trial users" about the features we shipped this month. Pull the stories from the content domain. Propose three subject lines.

    The Email Coach will:

    1. Read the `content` domain memory for recently shipped stories.
    2. Read the `branding` domain for voice and tone.
    3. Draft three subject-line variants on different angles (curiosity, specificity, personal).
    4. Draft the HTML body and a matching preheader.
    5. Call `email_newsletter_create` which creates both a template and a draft campaign in one call.

    The campaign starts in `draft` status. You can review and edit before scheduling.
  </Step>

  <Step title="Schedule or send">
    With the campaign draft ready, say:

    > Schedule this for Tuesday at 10am in my timezone.

    The Email Coach will confirm the audience size, run the pre-flight check (verified domain, required fields present), and call `email_campaign_schedule`. You can also `Send now`, `Pause`, `Resume`, or `Cancel` from the campaign detail page or via the agent.

    After the send completes, the Email Coach can pull metrics with `email_campaign_metrics` and compare against your account's rolling 90-day baseline.
  </Step>
</Steps>

## What happens under the hood

When you schedule a campaign, the Hiveku campaign pipeline:

1. Flips the status from `draft` or `scheduled` to `sending` at the scheduled time.
2. Materializes the audience — writes a frozen snapshot of who was targeted to `marketing_audience_membership` for auditing.
3. Creates per-recipient send rows (`marketing_campaign_send`) with frozen merge data so personalization is stable even if contacts are edited mid-send.
4. A cron tick dispatches sends in batches through SES with per-recipient `List-Unsubscribe` headers.
5. Delivery, open, click, bounce, and complaint events stream back via SES webhooks and update the campaign's rollup counters.

## Next steps

<CardGroup cols={2}>
  <Card title="AI Email Agent" icon="sparkles" href="/email-marketing/ai-agent">
    Tune the agent's memory with your benchmarks, winning subjects, and blackout periods.
  </Card>

  <Card title="Sequences" icon="list-ol" href="/email-marketing/sequences">
    Build welcome flows, re-engagement cadences, and onboarding drips.
  </Card>

  <Card title="Deliverability" icon="shield-check" href="/email-marketing/deliverability">
    Watch bounce and complaint rates, stay on the safe side of AWS pause thresholds.
  </Card>
</CardGroup>
