Skip to main content
POST
/
v1
/
emails
/
validate
/
spelling
Node.js SDK
import Migma from 'migma';

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.validation.spelling({
  html: '<html>...</html>'
});
{
  "success": true,
  "data": {
    "totalWords": 123,
    "errors": [
      {
        "word": "<string>",
        "suggestions": [
          "<string>"
        ],
        "context": "<string>",
        "type": "<string>"
      }
    ],
    "summary": {
      "totalErrors": 123,
      "uniqueErrors": 123
    },
    "metadata": {
      "processingTime": 123,
      "aiModel": "<string>",
      "tokensUsed": 123
    }
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → API Integration.

Body

application/json
html
string
required

Email HTML content to check

languages
string[]

Languages to check (auto-detected if not provided)

checkGrammar
boolean
default:true

Include grammar checking

Response

Spelling check completed

success
boolean
data
object