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

# Bolt

> Use Migma from Bolt apps with backend-safe email sending.

Use Migma with Bolt when an AI-built app needs transactional emails, campaign drafts, contacts, webhooks, or delivery logs.

## Recommended setup

<Steps>
  <Step title="Start from Migma handoff">
    In Migma, open **Create**, click **Set up Migma with agent**, and paste the copied `/setup` prompt into Bolt's agent.
  </Step>

  <Step title="Approve agent access">
    Use [agent registration](/agent-registration) first. Add `MIGMA_API_KEY` as a Bolt backend secret only if the agent cannot complete registration.
  </Step>

  <Step title="Add a fallback secret">
    Store `MIGMA_API_KEY` in Bolt's backend environment. Do not expose it in browser code.
  </Step>

  <Step title="Create or choose emails">
    Prepare emails in Migma and save returned `emailId` values in backend config.
  </Step>

  <Step title="Wire backend sends">
    Send from server routes, jobs, or trusted functions only.
  </Step>
</Steps>

## Prompt

Use this only if you cannot copy the in-app handoff prompt.

```text theme={null}
Use Migma's /setup workflow for this Bolt app.
Use agent registration before asking me for an API key.
Find all current email triggers.
Create or reuse Migma emails for each trigger.
Store emailId values in backend config.
Add dry-run tests before any live send.
```

## Next

<CardGroup cols={2}>
  <Card title="AI App Builders" icon="cube" href="/agents/app-builders">
    Builder checklist and surface choice.
  </Card>

  <Card title="Agent Handoff" icon="copy" href="/agents/agent-handoff">
    In-app setup prompt and Copy for AI flow.
  </Card>

  <Card title="Setup Workflow" icon="plug" href="/setup">
    Agent-guided app wiring.
  </Card>
</CardGroup>
