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

# Analyze Email Deliverability

> Predict email deliverability and inbox placement (Inbox/Promotions/Spam) based on content analysis.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/emails/validate/deliverability
openapi: 3.1.0
info:
  title: Migma.ai API (v1)
  description: >-
    API for managing brands, contacts, email generation, sending, and
    integrations.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.migma.ai
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Projects/Brands
    description: Manage projects (brands) and import from websites
  - name: Contacts
    description: Manage your contacts, segments, tags, and topics
  - name: Segments
    description: Create and manage dynamic contact segments
  - name: Tags
    description: Organize contacts with tags
  - name: Topics
    description: Manage subscription topics and preferences
  - name: Emails
    description: Generate, send, and export emails
  - name: Email Validation
    description: Validate email content for compatibility and deliverability
  - name: Email Previews
    description: Preview emails across devices and email clients
  - name: Domains
    description: Manage sending domains and verification
  - name: Webhooks
    description: Manage webhook endpoints for real-time event notifications
  - name: Events
    description: Record customer events and conversions
  - name: Integrations
    description: Third-party platform integrations
  - name: Campaigns
    description: Create, schedule, send, and manage email campaigns
  - name: Project Editing
    description: Edit project assets, logos, images, and knowledge base entries
paths:
  /v1/emails/validate/deliverability:
    post:
      tags:
        - Email Validation
      summary: Analyze Email Deliverability
      description: >-
        Predict email deliverability and inbox placement (Inbox/Promotions/Spam)
        based on content analysis.
      operationId: AnalyzeEmailDeliverability
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - html
              properties:
                html:
                  type: string
                  description: Email HTML content to analyze
                subject:
                  type: string
                  description: Email subject line
                fromName:
                  type: string
                  description: Sender name
                fromEmail:
                  type: string
                  format: email
                  description: Sender email address
      responses:
        '200':
          description: Deliverability analysis completed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      prediction:
                        type: object
                        properties:
                          category:
                            type: string
                            enum:
                              - inbox
                              - promotions
                              - spam
                          confidence:
                            type: integer
                          score:
                            type: integer
                          reasoning:
                            type: string
                      contentSignals:
                        type: object
                        properties:
                          promotional:
                            type: array
                            items:
                              type: string
                          transactional:
                            type: array
                            items:
                              type: string
                          spam:
                            type: array
                            items:
                              type: string
                          engagement:
                            type: array
                            items:
                              type: string
                      spamScore:
                        type: object
                        properties:
                          score:
                            type: number
                          triggers:
                            type: array
                            items:
                              type: string
                          recommendations:
                            type: array
                            items:
                              type: string
                      recommendations:
                        type: object
                        properties:
                          critical:
                            type: array
                            items:
                              type: string
                          important:
                            type: array
                            items:
                              type: string
                          suggested:
                            type: array
                            items:
                              type: string
                      metadata:
                        type: object
                        properties:
                          processingTime:
                            type: integer
                          analysisType:
                            type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-codeSamples:
        - lang: javascript
          label: Node.js SDK
          source: |-
            import Migma from 'migma';

            const migma = new Migma('YOUR_API_KEY');

            const { data, error } = await migma.validation.deliverability({
              html: '<html>...</html>',
              subject: 'My Email Subject'
            });
components:
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          default: false
        error:
          type: string
        code:
          type: string
          description: >-
            Machine-readable error code (e.g., IDEMPOTENCY_CONFLICT,
            DOMAIN_CLAIMABLE).
        data:
          type: object
          description: >-
            Additional structured context for the error, such as the affected
            domain.
          additionalProperties: true
      required:
        - success
        - error
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where
        YOUR_API_KEY is obtained from the Migma dashboard under Settings →
        Developers → API Keys.

````