API Endpoints OverviewΒΆ
Complete reference of all ReputeAPI endpoints.
Mailflow Security API (Primary)ΒΆ
The main API for comprehensive email security analysis.
| Endpoint | Method | Purpose | Response Time |
|---|---|---|---|
| /api/v1/check | GET | Full security check with detailed results | ~500ms |
| /api/v1/score | GET | Quick score only (faster) | ~200ms |
| /api/v1/recommendations | POST | Get prioritized fixes with DNS snippets | ~500ms |
| /api/v1/history | GET | Historical snapshots and trends | ~150ms |
When to Use Each EndpointΒΆ
Use /api/v1/check when:
- You need detailed SPF/DKIM/DMARC results
- You want actionable remediation steps
- You need DNS snippets for fixes
- You're doing a comprehensive audit
Use /api/v1/score when:
- You only need the score number
- You're building a dashboard
- You want faster responses
- You're checking many domains quickly
Use /api/v1/recommendations when:
- You want prioritized action items
- You need copy-paste DNS fixes
- You're guiding users through improvements
- You want score impact calculations
Use /api/v1/history when:
- Tracking improvements over time
- Generating compliance reports
- Detecting regressions
- Creating trend charts
Validation API (Legacy)ΒΆ
Simpler validation endpoints for basic checks.
| Endpoint | Method | Purpose |
|---|---|---|
| /v1/validate | GET | Single domain validation |
| /v1/validate/bulk | POST | Validate up to 100 domains at once |
Migration Tip
New projects should use the Mailflow Security API (/api/v1/* endpoints) as they provide richer data and better scoring.
Usage & ManagementΒΆ
| Endpoint | Method | Purpose |
|---|---|---|
| /v1/usage | GET | View API usage statistics and quotas |
Endpoint ComparisonΒΆ
Response SizeΒΆ
| Endpoint | Typical Response Size |
|---|---|
/api/v1/score |
~500 bytes |
/api/v1/check |
~3-5 KB |
/api/v1/recommendations |
~2-4 KB |
/api/v1/history |
~1-10 KB (depends on limit) |
/v1/validate |
~4-6 KB |
CachingΒΆ
| Endpoint | Cache TTL |
|---|---|
/api/v1/check |
15 minutes |
/api/v1/score |
15 minutes |
/api/v1/recommendations |
15 minutes |
/api/v1/history |
No cache (always fresh) |
/v1/validate |
15 minutes |
Use ?refresh=true to bypass cache.
Common PatternsΒΆ
Pattern 1: Quick Health CheckΒΆ
# Check score only
response = requests.get(
f"{API_URL}/api/v1/score",
params={"domain": "example.com"},
headers={"X-API-Key": API_KEY}
)
if response.json()['score'] < 70:
print("β οΈ Security issues detected!")
Pattern 2: Full AuditΒΆ
# Get full details
response = requests.get(
f"{API_URL}/api/v1/check",
params={"domain": "example.com"},
headers={"X-API-Key": API_KEY}
)
result = response.json()
# Show issues
for issue in result['issues']:
print(f"[{issue['severity']}] {issue['message']}")
Pattern 3: Guided RemediationΒΆ
# Get recommendations
response = requests.post(
f"{API_URL}/api/v1/recommendations",
json={"domain": "example.com"},
headers={"X-API-Key": API_KEY}
)
result = response.json()
# Show fixes
print(f"Current score: {result['current_score']}")
print(f"Potential score: {result['potential_score']}")
for rec in result['recommendations']:
print(f"\n{rec['priority']}. {rec['action']}")
if rec.get('dns_snippet'):
print(f" DNS: {rec['dns_snippet']['value']}")
Pattern 4: Bulk CheckΒΆ
# Check multiple domains
domains = ["domain1.com", "domain2.com", "domain3.com"]
response = requests.post(
f"{API_URL}/v1/validate/bulk",
json={"domains": domains},
headers={"X-API-Key": API_KEY}
)
for result in response.json()['results']:
print(f"{result['domain']}: {result['score']}/100")
Pattern 5: Trend AnalysisΒΆ
# Get historical data
response = requests.get(
f"{API_URL}/api/v1/history",
params={"domain": "example.com", "days": 30},
headers={"X-API-Key": API_KEY}
)
snapshots = response.json()['snapshots']
# Calculate trend
first_score = snapshots[-1]['score']
latest_score = snapshots[0]['score']
improvement = latest_score - first_score
print(f"Score trend: {improvement:+d} points over 30 days")
Rate LimitsΒΆ
All endpoints share the same rate limits based on your plan tier:
| Tier | Requests/Minute |
|---|---|
| Free | 10 |
| Basic | 60 |
| Premium | 120 |
See Rate Limits for details.
AuthenticationΒΆ
All endpoints require an API key via the X-API-Key header:
See Authentication for details.
Error HandlingΒΆ
All endpoints return consistent error responses:
Common HTTP status codes: - 200 OK - Success - 400 Bad Request - Invalid parameters - 401 Unauthorized - Missing/invalid API key - 404 Not Found - Resource not found - 429 Too Many Requests - Rate limit exceeded - 500 Internal Server Error - Server error
See Common Errors for troubleshooting.
Next StepsΒΆ
- Interactive API - Try endpoints in your browser
- Quick Start - Make your first request
- Code Examples - Ready-to-use code