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

# Migma vs Resend

> A detailed comparison of Migma and Resend — pricing, API design, code examples, and capabilities

## Overview

Migma and Resend are both developer-focused email platforms, but they solve fundamentally different problems. **Resend** is a transactional email delivery API — you write the HTML, they send it. **Migma** is an AI-powered email platform that generates, validates, previews, and sends emails — all from a single API.

<CardGroup cols={2}>
  <Card title="Migma" icon="wand-magic-sparkles">
    AI email generation + delivery + validation + previews in one API. Import your brand, describe what you want, get production-ready email HTML — then send it.
  </Card>

  <Card title="Resend" icon="paper-plane">
    Email delivery API. You provide the HTML, they handle DKIM/SPF and deliver it to inboxes.
  </Card>
</CardGroup>

***

## Quick Comparison

| Feature                 | Migma                                               | Resend                                                   |
| ----------------------- | --------------------------------------------------- | -------------------------------------------------------- |
| **AI email generation** | Prompt-to-email with brand awareness                | No                                                       |
| **Email sending**       | Built-in + SES, SendGrid, Mailgun, Resend           | Built-in only                                            |
| **Contact management**  | Full CRM (tags, segments, topics, bulk import)      | Basic (contacts + segments)                              |
| **Email validation**    | Compatibility, links, spelling, deliverability      | No                                                       |
| **Device previews**     | 20+ real devices                                    | No                                                       |
| **Export formats**      | HTML, MJML, PDF, PNG, Klaviyo, Mailchimp, HubSpot   | HTML only                                                |
| **Brand import**        | Auto-import from any website (colors, fonts, logos) | No                                                       |
| **Webhooks**            | HMAC-signed with delivery history                   | HMAC-signed with retry                                   |
| **Broadcast/campaigns** | Send to segments, tags, topics                      | Send to segments (Broadcasts)                            |
| **Node.js SDK**         | Yes (`migma`)                                       | Yes (`resend`)                                           |
| **SDK languages**       | Node.js/TypeScript                                  | Node.js, Python, Go, Ruby, PHP, Java, Rust, .NET, Elixir |
| **CLI**                 | Yes (`@migma/cli`)                                  | No                                                       |
| **MCP server**          | Yes (Claude, Cursor, etc.)                          | No                                                       |
| **Managed domains**     | Instant (no DNS setup)                              | No                                                       |
| **Inbound email**       | No                                                  | Yes                                                      |
| **SMTP relay**          | No                                                  | Yes                                                      |
| **Multi-region**        | Single region                                       | 4 regions                                                |

***

## Pricing

### Migma Plans

Migma offers two paid plans (both include a **7-day free trial** when you first subscribe):

| Plan         | Price      | AI Emails/Day | Sending/Month | Projects  |
| ------------ | ---------- | ------------- | ------------- | --------- |
| **Premium**  | \$99.99/mo | 100           | 200,000       | Unlimited |
| **Business** | \$299/mo   | Unlimited     | 3,000,000     | Unlimited |

<Info>
  Annual billing saves up to 23%: Premium at $950/year, Business at $2,748/year.
</Info>

### Resend Plans

| Plan           | Price   | Emails/Month    | Overage      | Domains  | Webhooks     |
| -------------- | ------- | --------------- | ------------ | -------- | ------------ |
| **Free**       | \$0     | 3,000 (100/day) | N/A          | 1        | 1 endpoint   |
| **Pro**        | \$20/mo | 50,000          | \$0.90/1,000 | 10       | 10 endpoints |
| **Scale**      | \$90/mo | 100,000         | \$0.90/1,000 | 1,000    | 10 endpoints |
| **Enterprise** | Custom  | Custom          | Custom       | Flexible | Flexible     |

### What You Get for the Price

The pricing models reflect the different value propositions:

**Resend at \$20/mo** gives you:

* Email delivery API (you provide the HTML)
* 50,000 sends
* Basic contact management

**Migma at \$99.99/mo** gives you everything Resend offers, plus:

* AI-powered email generation (100 emails/day)
* Automatic brand import from any website
* Email validation (compatibility, links, spelling, deliverability)
* Device previews on 20+ real devices
* Export to Klaviyo, Mailchimp, HubSpot, MJML, PDF
* Full audience management (tags, segments, topics, preference center)
* AI image & GIF generation
* CLI and MCP server for AI-assisted workflows

<Tip>
  Migma's Premium plan includes AI email generation, validation, previews, and multi-platform export — capabilities you'd need to piece together from multiple separate tools with Resend.
</Tip>

***

## API Design & Code Examples

Both platforms use REST APIs with Bearer token auth and return JSON. Here's how common workflows compare.

### Authentication

<Tabs>
  <Tab title="Migma">
    ```typescript theme={null}
    import Migma from 'migma';

    const migma = new Migma('sk_live_...');
    ```

    API keys support granular permissions: `audience:read`, `email:send`, `domain:write`, etc.
  </Tab>

  <Tab title="Resend">
    ```typescript theme={null}
    import { Resend } from 'resend';

    const resend = new Resend('re_...');
    ```

    API keys are scoped to Full Access or Sending Access only.
  </Tab>
</Tabs>

### Sending an Email

<Tabs>
  <Tab title="Migma">
    ```typescript theme={null}
    import Migma from 'migma';

    const migma = new Migma('sk_live_...');

    // Option 1: Send a selected Migma email slot
    await migma.sending.send({
      recipientType: 'email',
      recipientEmail: 'sarah@example.com',
      from: 'hello@yourbrand.com',
      fromName: 'Your Brand',
      subject: 'Welcome aboard!',
      emailId: 'email_123',
    });

    // Option 2: Generate with AI, then send
    const email = await migma.emails.generateAndWait({
      projectId: 'proj_123',
      prompt: 'Create a welcome email for new subscribers',
    });

    await migma.sending.send({
      recipientType: 'email',
      recipientEmail: 'sarah@example.com',
      from: 'hello@yourbrand.com',
      fromName: 'Your Brand',
      subject: email.data.result.subject,
      conversationId: email.data.conversationId,
    });
    ```
  </Tab>

  <Tab title="Resend">
    ```typescript theme={null}
    import { Resend } from 'resend';

    const resend = new Resend('re_...');

    // You must provide the HTML yourself
    const { data, error } = await resend.emails.send({
      from: 'Your Brand <hello@yourbrand.com>',
      to: ['sarah@example.com'],
      subject: 'Welcome aboard!',
      html: '<html>Your HTML here</html>',
    });
    ```
  </Tab>
</Tabs>

`★ Insight ─────────────────────────────────────`
**Key difference**: With Resend, you bring your own HTML. With Migma, you can pick a generated email by `emailId` or describe what you want and let AI generate it — on-brand, dark-mode optimized, and cross-client compatible.
`─────────────────────────────────────────────────`

### Sending to a Segment

<Tabs>
  <Tab title="Migma">
    ```typescript theme={null}
    // Send to an entire audience segment
    const { data } = await migma.sending.send({
      recipientType: 'segment',
      recipientId: 'seg_456',
      from: 'hello@yourbrand.com',
      fromName: 'Your Brand',
      subject: 'Summer Sale - 30% Off',
      emailId: 'email_123',
      topicId: 'topic_promotions', // preference center
    });

    // Track batch delivery
    const status = await migma.sending.getBatchStatus(data.batchId);
    console.log(`Sent: ${status.data.successCount}/${status.data.totalRecipients}`);
    ```
  </Tab>

  <Tab title="Resend">
    ```typescript theme={null}
    // Create a broadcast for the segment
    const { data, error } = await resend.broadcasts.create({
      segmentId: 'seg_456',
      from: 'Your Brand <hello@yourbrand.com>',
      subject: 'Summer Sale - 30% Off',
      html: '<html>Your HTML here</html>',
      send: true, // send immediately
    });
    ```
  </Tab>
</Tabs>

### Contact Management

<Tabs>
  <Tab title="Migma">
    ```typescript theme={null}
    // Create a contact with tags
    const { data } = await migma.contacts.create({
      email: 'steve@example.com',
      firstName: 'Steve',
      lastName: 'Smith',
      country: 'US',
      language: 'en',
      tags: ['premium', 'early-adopter'],
      customFields: { plan: 'enterprise', company: 'Acme' },
      projectId: 'proj_123',
    });

    // Bulk import (auto-async for >5000 contacts)
    const { data: bulk } = await migma.contacts.bulkImport({
      projectId: 'proj_123',
      subscribers: contacts, // up to 100,000+
    });

    // List with cursor-based pagination
    const { data: page } = await migma.contacts.list({
      projectId: 'proj_123',
      limit: 50,
      status: 'subscribed',
      tags: ['premium'],
    });
    ```
  </Tab>

  <Tab title="Resend">
    ```typescript theme={null}
    // Create a contact
    const { data, error } = await resend.contacts.create({
      email: 'steve@example.com',
      firstName: 'Steve',
      lastName: 'Smith',
      unsubscribed: false,
    });

    // List contacts (no filtering by tags or custom fields)
    const { data: contacts } = await resend.contacts.list({
      audienceId: 'aud_123',
    });
    ```
  </Tab>
</Tabs>

### Error Handling

Both SDKs use the same `{ data, error }` pattern — no try/catch needed:

<Tabs>
  <Tab title="Migma">
    ```typescript theme={null}
    const { data, error } = await migma.contacts.create({
      email: 'sarah@example.com',
      projectId: 'proj_123',
    });

    if (error) {
      console.error(error.code);       // 'validation_error'
      console.error(error.statusCode); // 400
      console.error(error.message);    // 'Email is required'
      return;
    }

    console.log(data.id); // TypeScript narrows — data is guaranteed non-null
    ```
  </Tab>

  <Tab title="Resend">
    ```typescript theme={null}
    const { data, error } = await resend.emails.send({
      from: 'hello@example.com',
      to: ['sarah@example.com'],
      subject: 'Hello',
      html: '<p>Hi</p>',
    });

    if (error) {
      console.error(error.name);    // 'validation_error'
      console.error(error.message); // 'Missing required field'
      return;
    }

    console.log(data.id);
    ```
  </Tab>
</Tabs>

***

## What Migma Does That Resend Doesn't

### AI Email Generation

Describe what you want, get production-ready HTML:

```typescript theme={null}
const email = await migma.emails.generateAndWait({
  projectId: 'proj_123',
  prompt: 'Create a product launch email for our new wireless headphones. ' +
          'Highlight noise cancellation, 40-hour battery, and the $99 intro price.',
  languages: ['en', 'es'], // generate in multiple languages
});

// Returns complete, on-brand HTML — ready to send
console.log(email.data.result.subject); // "Introducing QuietMax Pro — $99 Launch Offer"
console.log(email.data.result.html);    // full responsive HTML with dark mode support
```

With Resend, you'd need to design and code the email yourself (or use a separate design tool), then pass the finished HTML to the API.

### Brand Import

Import your brand identity from any website in one API call:

```typescript theme={null}
const brand = await migma.projects.importAndWait({
  urls: ['https://yourbrand.com']
});

// Automatically extracts: colors, typography, logos, tone of voice
// Every email generated after this matches your brand
```

Resend has no equivalent — you manually configure each email's styling.

### Email Validation

Test emails before sending — no third-party tools needed:

```typescript theme={null}
// Run all validation checks at once
const { data } = await migma.validation.all({
  conversationId: 'conv_789',
});

// Or run individually:
await migma.validation.compatibility({ conversationId: 'conv_789' }); // 20+ email clients
await migma.validation.links({ conversationId: 'conv_789' });         // broken link detection
await migma.validation.spelling({ conversationId: 'conv_789' });      // grammar & spelling
await migma.validation.deliverability({ conversationId: 'conv_789' }); // spam score analysis
```

Resend doesn't offer validation. You'd need separate tools like Litmus or Email on Acid.

### Device Previews

See how your email renders on 20+ real devices:

```typescript theme={null}
const preview = await migma.previews.createAndWait({
  conversationId: 'conv_789',
});

// Get screenshots for specific devices
const iphone = await migma.previews.getDevice(preview.data.previewId, 'iphone-15-pro');
const gmail = await migma.previews.getDevice(preview.data.previewId, 'gmail-dark');
```

### Multi-Platform Export

Export to any email platform — not just HTML:

```typescript theme={null}
// Export to multiple formats from a single generation
await migma.export.html('conv_789');       // raw HTML
await migma.export.mjml('conv_789');       // MJML source
await migma.export.pdf('conv_789');        // PDF attachment
await migma.export.klaviyo('conv_789');    // Klaviyo-ready format
await migma.export.mailchimp('conv_789');  // Mailchimp template
await migma.export.hubspot({ conversationId: 'conv_789' }); // HubSpot
```

### CLI & AI Tool Integration

```bash theme={null}
# Generate from your terminal
migma generate --project proj_123 --prompt "Welcome email for new users"

# Send a test
migma send --to test@example.com --conversation conv_789

# Validate before sending
migma validate --conversation conv_789
```

Migma also ships [MCP](/mcp-server) so you can use it directly from Claude Desktop, Cursor, Windsurf, and other AI tools.

***

## What Resend Does That Migma Doesn't

### Wider SDK Support

Resend offers official SDKs in 9 languages:

<CardGroup cols={3}>
  <Card title="Node.js" icon="js" />

  <Card title="Python" icon="python" />

  <Card title="Go" icon="golang" />

  <Card title="Ruby" icon="gem" />

  <Card title="PHP" icon="php" />

  <Card title="Java" icon="java" />

  <Card title="Rust" icon="rust" />

  <Card title=".NET" icon="microsoft" />

  <Card title="Elixir" icon="droplet" />
</CardGroup>

Migma currently offers a Node.js/TypeScript SDK. If you work in Python, Go, or another language, you can use Migma's REST API directly — or use Resend for the sending layer and Migma for generation.

### SMTP Relay

Resend supports SMTP as an alternative to their REST API:

```
Host: smtp.resend.com
Port: 465 (TLS) or 587 (STARTTLS)
Username: resend
Password: re_your_api_key
```

Migma is REST API only — there's no SMTP interface.

### Inbound Email

Resend can receive emails on your domain, not just send them. This is useful for building support inboxes or email-based workflows.

### Multi-Region Sending

Resend supports 4 sending regions (`us-east-1`, `eu-west-1`, `sa-east-1`, `ap-northeast-1`). Migma currently operates from a single region.

***

## Using Them Together

Migma and Resend aren't mutually exclusive. Migma supports Resend as a sending provider — use Migma for generation and validation, send through Resend:

```typescript theme={null}
import Migma from 'migma';

const migma = new Migma('sk_live_...');

// Generate the email with Migma's AI
const email = await migma.emails.generateAndWait({
  projectId: 'proj_123',
  prompt: 'Create a welcome email for new subscribers',
});

// Send through Resend (or SES, SendGrid, Mailgun)
await migma.sending.send({
  recipientType: 'email',
  recipientEmail: 'sarah@example.com',
  from: 'hello@yourbrand.com',
  fromName: 'Your Brand',
  subject: email.data.result.subject,
  conversationId: email.data.conversationId,
  providerType: 'resend', // use your connected Resend account
});
```

<Info>
  Connect your Resend account in **Settings > Integrations > Email Service Providers** to enable this workflow. See the [ESP integration guide](/integrations/email-service-providers) for details.
</Info>

***

## When to Choose Migma

<Check>You want AI to generate on-brand emails from a text prompt</Check>
<Check>You need email validation, previews, and deliverability testing built in</Check>
<Check>You want to export to Klaviyo, Mailchimp, HubSpot, or MJML</Check>
<Check>You want a CLI and MCP server for AI-assisted workflows</Check>
<Check>You need full audience management (tags, segments, topics, preference center)</Check>
<Check>You want instant sending domains with no DNS setup</Check>

## When to Choose Resend

<Check>You only need transactional email delivery (you already have the HTML)</Check>
<Check>You need SDKs in Python, Go, Ruby, PHP, Java, Rust, or .NET</Check>
<Check>You need SMTP relay support</Check>
<Check>You need inbound email (receiving emails)</Check>
<Check>You need multi-region sending for data residency compliance</Check>

***

## Summary

|                       | Migma                                                                         | Resend                                                                    |
| --------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| **Best for**          | Teams that want AI to handle email creation, testing, and delivery end-to-end | Developers who build their own email templates and need reliable delivery |
| **Starting price**    | \$99.99/mo (Premium)                                                          | \$20/mo (Pro)                                                             |
| **Trial / free tier** | 7-day trial on Premium or Business                                            | 3,000 emails/month, 100/day                                               |
| **Core strength**     | AI generation + validation + previews + multi-platform export                 | Fast, reliable email delivery with great DX                               |
| **API endpoints**     | 51+                                                                           | \~25                                                                      |
| **SDK resources**     | 14 resource classes                                                           | \~8 resource classes                                                      |

***

## Get Started

<CardGroup cols={2}>
  <Card title="Try Migma" icon="rocket" href="https://migma.ai">
    Start with a 7-day trial on Premium or Business
  </Card>

  <Card title="Quickstart Guide" icon="bolt" href="/quickstart">
    Import your brand and send your first email in 5 minutes
  </Card>

  <Card title="SDK Reference" icon="npm" href="/sdk">
    Full Node.js SDK documentation with all 14 resources
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Complete endpoint documentation
  </Card>
</CardGroup>
