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

# AI App Builders

> Use Migma from Lovable, Bolt, v0, Replit, and similar app builders.

AI app builders can use Migma when an app needs real email creation, sending, campaign workflows, contacts, webhooks, or delivery logs.

Use [agent registration](/agent-registration) first for agent access. If a fallback key is needed, create it from **Settings → Developers → API Keys**. Create webhooks from **Settings → Developers → Webhooks**.

Start with **Create → Set up Migma with agent** when the builder has a coding agent or repo-aware assistant. Migma copies the `/setup` handoff prompt so the agent audits the app, creates or reuses emails, and wires backend sends safely.

Use the surface your builder supports:

* **Agent handoff** for first-time app setup from Migma
* **REST API** for production app code
* **SDK** for TypeScript and Node.js apps
* **CLI** for terminal-capable builders
* **Setup workflow** when a coding agent can inspect and edit the repository
* **MCP** when the builder supports MCP tools

## Best path

<Steps>
  <Step title="Copy the setup handoff">
    In Migma, open **Create**, click **Set up Migma with agent**, then copy the prompt.
  </Step>

  <Step title="Paste into the builder agent">
    Use the agent that can inspect and edit the app repository.
  </Step>

  <Step title="Approve access">
    Let the agent use [agent registration](/agent-registration) first. Add a fallback API key only when needed.
  </Step>

  <Step title="Review the dry-run">
    Before live sends, confirm the agent mapped each trigger to the right `emailId` and added a smoke test.
  </Step>
</Steps>

## Builder guides

<CardGroup cols={2}>
  <Card title="Lovable" icon="https://mintcdn.com/migmaai/kT6TJgF40rDP8_qB/images/logos/lovable.png?fit=max&auto=format&n=kT6TJgF40rDP8_qB&q=85&s=20f45e55be5abfd91b95783e7afb197e" href="/agents/app-builder-lovable" width="120" height="120" data-path="images/logos/lovable.png">
    Add Migma to Lovable backend sends.
  </Card>

  <Card title="Bolt" icon="https://mintcdn.com/migmaai/kT6TJgF40rDP8_qB/images/logos/bolt.png?fit=max&auto=format&n=kT6TJgF40rDP8_qB&q=85&s=9ac9f2cac4dd8d9ee15cf14a66419d6a" href="/agents/app-builder-bolt" width="120" height="120" data-path="images/logos/bolt.png">
    Add Migma to Bolt app email triggers.
  </Card>

  <Card title="v0" icon="https://mintcdn.com/migmaai/kT6TJgF40rDP8_qB/images/logos/v0.png?fit=max&auto=format&n=kT6TJgF40rDP8_qB&q=85&s=74822a0a928a8a979d846c29a9d3c418" href="/agents/app-builder-v0" width="120" height="120" data-path="images/logos/v0.png">
    Use Migma from server routes or server actions.
  </Card>

  <Card title="Replit" icon="https://mintcdn.com/migmaai/kT6TJgF40rDP8_qB/images/logos/replit.png?fit=max&auto=format&n=kT6TJgF40rDP8_qB&q=85&s=152058a6cf2a2ce13566c147cca9eade" href="/agents/app-builder-replit" width="120" height="120" data-path="images/logos/replit.png">
    Use Migma from Replit apps, agents, and jobs.
  </Card>
</CardGroup>

## Builder checklist

<Steps>
  <Step title="Prefer the handoff prompt">
    Use **Set up Migma with agent** instead of manually writing a long integration prompt.
  </Step>

  <Step title="Keep secrets server-side">
    Store `MIGMA_API_KEY` in the builder's server-side environment or secret manager.
  </Step>

  <Step title="Create or choose a brand">
    Use a Migma brand/project so emails use the right logo, colors, sender, and audience context.
  </Step>

  <Step title="Prepare email IDs">
    Generate or select emails in Migma, then store returned `emailId` values in backend config.
  </Step>

  <Step title="Wire sends in backend code">
    Send only from server routes, jobs, or trusted functions. Do not send directly from browser code.
  </Step>

  <Step title="Add dry-run checks">
    Test that each app trigger selects the right `emailId` without sending duplicates.
  </Step>
</Steps>

## Suggested prompt

```text theme={null}
Use Migma's /setup workflow for this app.
Fetch https://docs.migma.ai/llms.txt first.
Use agent registration before asking me for an API key.
Audit email triggers, templates, providers, queues, webhooks, and jobs.
Create or reuse Migma emails, store emailId values server-side, and add a dry-run before live sends.
```

## When to use each surface

| Surface        | Use it for                                                    |
| -------------- | ------------------------------------------------------------- |
| Agent handoff  | Copy the right setup prompt from Migma into the builder agent |
| Setup workflow | App audit, mapping existing emails, backend send wiring       |
| REST API       | Production app integration                                    |
| SDK            | Node.js and TypeScript apps                                   |
| CLI            | Terminal workflows and agent scripts                          |
| MCP            | Agent work inside MCP-capable builders                        |

## Next

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

  <Card title="Agent Handoff" icon="copy" href="/agents/agent-handoff">
    Copy setup and selected-email prompts from Migma.
  </Card>

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

  <Card title="SDK" icon="code-bracket" href="/sdk">
    Use Migma from Node.js or TypeScript.
  </Card>

  <Card title="Webhooks" icon="arrow-path" href="/webhooks">
    Trigger app workflows from Migma events.
  </Card>
</CardGroup>
