GET /api/v1/scoreΒΆ

Get quick Mailflow Security Score for a domain.

GET

/api/v1/score

OverviewΒΆ

Fast endpoint that returns only the score and top issues without full validation details.

Use this when: - You only need the score, not full results - You're checking many domains quickly - You want faster response times (<200ms vs ~500ms)

Use /api/v1/check when: - You need detailed SPF/DKIM/DMARC results - You want actionable remediation steps - You need DNS snippets for fixes

RequestΒΆ

Query ParametersΒΆ

Parameter Type Required Default Description
domain string βœ… Yes - Domain to check (e.g., example.com)
refresh boolean ❌ No false Bypass cache and fetch fresh data

HeadersΒΆ

X-API-Key: your-api-key

ResponseΒΆ

Success Response (200 OK)ΒΆ

{
  "domain": "example.com",
  "score": 75,
  "grade": "Good",
  "top_issues": [
    {
      "code": "DMARC_POLICY_WEAK",
      "severity": "high",
      "message": "DMARC policy set to 'quarantine' instead of 'reject'"
    },
    {
      "code": "SPF_SOFTFAIL",
      "severity": "medium",
      "message": "SPF record uses '~all' (softfail) instead of '-all' (hardfail)"
    }
  ],
  "meta": {
    "latency_ms": 180,
    "cached": true
  }
}

Response FieldsΒΆ

Field Type Description
domain string Domain that was checked
score integer Mailflow Security Score (0-100)
grade string Excellent, Good, Fair, or Poor
top_issues array Top 5 issues by severity
meta.latency_ms integer Response time in milliseconds
meta.cached boolean Whether result was cached

ExamplesΒΆ

cURLΒΆ

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

PythonΒΆ

import requests

response = requests.get(
    "https://api.reputeapi.com/api/v1/score",
    params={"domain": "google.com"},
    headers={"X-API-Key": "your-api-key"}
)

result = response.json()
print(f"Score: {result['score']}/100 ({result['grade']})")

JavaScriptΒΆ

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

const result = await response.json();
console.log(`Score: ${result.score}/100`);

PerformanceΒΆ

Average response times:

  • Cached: 50-100ms
  • Uncached: 150-300ms

Compare to /api/v1/check:

  • Cached: 100-200ms
  • Uncached: 400-700ms

Use CasesΒΆ

Dashboard Score DisplayΒΆ

# Show scores for multiple domains in a dashboard
domains = ["example.com", "test.com", "demo.com"]

for domain in domains:
    response = requests.get(
        f"{API_URL}/api/v1/score",
        params={"domain": domain},
        headers={"X-API-Key": API_KEY}
    )
    result = response.json()
    print(f"{domain}: {result['score']}/100")

Monitoring ScriptΒΆ

#!/bin/bash
# Monitor domain score and alert if it drops

DOMAIN="example.com"
API_KEY="your-api-key"
THRESHOLD=70

SCORE=$(curl -s -H "X-API-Key: $API_KEY" \
  "https://api.reputeapi.com/api/v1/score?domain=$DOMAIN" \
  | jq -r '.score')

if [ "$SCORE" -lt "$THRESHOLD" ]; then
  echo "ALERT: Score dropped to $SCORE (threshold: $THRESHOLD)"
  # Send notification
fi