Validate EndpointΒΆ

The legacy /v1/validate endpoint provides basic domain validation functionality for backwards compatibility.

Legacy Endpoint

This is a legacy endpoint maintained for backwards compatibility. New integrations should use the Check endpoint which provides more comprehensive validation with scoring and recommendations.


EndpointΒΆ

GET /v1/validate

Request ParametersΒΆ

Parameter Type Required Description
domain string Yes The domain name to validate (e.g., "example.com")
dkim_selector string No Optional DKIM selector. If not provided, common selectors will be attempted

AuthenticationΒΆ

Authentication is handled via the X-API-Key header:

X-API-Key: your-api-key-here

Example RequestΒΆ

cURL:

curl -X GET "https://api.reputeapi.com/v1/validate?domain=example.com" \
  -H "X-API-Key: your-api-key"

Python:

import requests

url = "https://api.reputeapi.com/v1/validate"
headers = {"X-API-Key": "your-api-key"}
params = {"domain": "example.com"}

response = requests.get(url, headers=headers, params=params)
result = response.json()

JavaScript:

const response = await fetch(
  'https://api.reputeapi.com/v1/validate?domain=example.com',
  {
    headers: {
      'X-API-Key': 'your-api-key'
    }
  }
);

const result = await response.json();


Response FormatΒΆ

Success Response (200 OK)ΒΆ

{
  "domain": "example.com",
  "spf": {
    "valid": true,
    "record": "v=spf1 include:_spf.google.com ~all",
    "details": {
      "mechanisms": ["include:_spf.google.com"],
      "qualifier": "~all"
    }
  },
  "dkim": {
    "valid": true,
    "selector": "default",
    "record": "v=DKIM1; k=rsa; p=MIGfMA0GCS...",
    "details": {
      "version": "DKIM1",
      "key_type": "rsa"
    }
  },
  "dmarc": {
    "valid": true,
    "record": "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com",
    "details": {
      "policy": "quarantine",
      "rua": ["mailto:dmarc@example.com"]
    }
  },
  "timestamp": "2025-01-20T12:00:00Z"
}

Field DescriptionsΒΆ

Field Type Description
domain string The validated domain name
spf.valid boolean Whether a valid SPF record was found
spf.record string The SPF TXT record value
dkim.valid boolean Whether a valid DKIM record was found
dkim.selector string The DKIM selector used
dkim.record string The DKIM TXT record value
dmarc.valid boolean Whether a valid DMARC record was found
dmarc.record string The DMARC TXT record value
timestamp string ISO 8601 timestamp of the validation

Error ResponsesΒΆ

400 Bad RequestΒΆ

Missing or invalid domain parameter:

{
  "error": "Bad Request",
  "message": "Domain parameter is required",
  "status": 400
}

401 UnauthorizedΒΆ

Invalid or missing API key:

{
  "error": "Unauthorized",
  "message": "Invalid API key",
  "status": 401
}

429 Too Many RequestsΒΆ

Rate limit exceeded:

{
  "error": "Too Many Requests",
  "message": "Rate limit exceeded. Please try again later.",
  "retry_after": 60,
  "status": 429
}

500 Internal Server ErrorΒΆ

Server error during validation:

{
  "error": "Internal Server Error",
  "message": "An error occurred during validation",
  "status": 500
}

Rate LimitingΒΆ

This endpoint is subject to the same rate limits as other API endpoints:

  • Free tier: 10 requests per minute
  • Basic tier: 60 requests per minute
  • Premium tier: 120 requests per minute

See Rate Limits for more details.


Migration GuideΒΆ

If you're currently using the /v1/validate endpoint, we recommend migrating to the newer Check endpoint for the following benefits:

  1. Mailflow Security Score - Get a 0-100 score for overall email security
  2. Prioritized Issues - Receive severity-rated issues with remediation steps
  3. DNS Snippets - Get ready-to-use DNS configuration snippets
  4. Score Breakdown - Understand how issues impact your score

Migration ExampleΒΆ

Old endpoint:

curl "https://api.reputeapi.com/v1/validate?domain=example.com" \
  -H "X-API-Key: your-api-key"

New endpoint:

curl "https://api.reputeapi.com/api/v1/check?domain=example.com" \
  -H "X-API-Key: your-api-key"

The new endpoint provides backwards-compatible data plus additional features.


See AlsoΒΆ