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

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.validation.links({
  html: '<html>...</html>'
});
{
  "success": true,
  "data": {
    "totalLinks": 123,
    "checkedLinks": [
      {
        "url": "<string>",
        "type": "<string>",
        "status": 123,
        "statusText": "<string>",
        "responseTime": 123,
        "error": "<string>"
      }
    ],
    "summary": {
      "workingLinks": 123,
      "brokenLinks": 123,
      "unreachableLinks": 123,
      "averageResponseTime": 123
    },
    "recommendations": [
      "<string>"
    ],
    "metadata": {
      "processingTime": 123,
      "linksChecked": 123,
      "linksSkipped": 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 containing links

timeout
integer
default:10000

Timeout per link in milliseconds

Required range: 1000 <= x <= 30000
followRedirects
boolean
default:true

Follow HTTP redirects when checking links

Response

Link analysis completed

success
boolean
data
object