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

# v0

> Use Migma with v0-built apps and backend email routes.

Use Migma with v0 when generated app code needs production email sending, 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 the coding agent editing your v0 app.
  </Step>

  <Step title="Approve agent access">
    Use [agent registration](/agent-registration) first. Add `MIGMA_API_KEY` to server environment variables only if the agent cannot complete registration.
  </Step>

  <Step title="Keep fallback key server-side">
    Store `MIGMA_API_KEY` in server environment variables. Do not put it in client components.
  </Step>

  <Step title="Use email IDs">
    Prepare emails in Migma and store `emailId` values in server config.
  </Step>

  <Step title="Send from backend routes">
    Wire sends through route handlers, server actions, or trusted jobs.
  </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 v0 app.
Use agent registration before asking me for an API key.
Use server routes or server actions only.
Map every email trigger to a Migma emailId.
Add a dry-run test path before live sending.
```

## Next

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

  <Card title="API Quickstart" icon="code-bracket-square" href="/quickstart">
    Send your first API request.
  </Card>

  <Card title="SDK" icon="https://mintcdn.com/migmaai/kT6TJgF40rDP8_qB/images/logos/npm.svg?fit=max&auto=format&n=kT6TJgF40rDP8_qB&q=85&s=1839361b0494d7d3199cdaa3575846ac" href="/sdk" width="24" height="24" data-path="images/logos/npm.svg">
    Use Migma from Node.js or TypeScript.
  </Card>
</CardGroup>
