Skip to main content
POST
/
v1
/
emails
/
validate
/
spelling
Check Spelling & Grammar
curl --request POST \
  --url https://api.migma.ai/v1/emails/validate/spelling \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "html": "<string>",
  "languages": [
    "<string>"
  ],
  "checkGrammar": true
}
'
{
  "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

JWT Bearer token authentication. Use 'Authorization: Bearer ' where the JWT token is obtained from the login endpoint.

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