API Overview
The MailShield API provides programmatic access to your email security monitoring data. Use it to integrate domain monitoring, DNS checks, and report data into your existing tools and workflows.
Base URL
All API requests should be made to:
https://app.mailshield.app/api/v1Quick Start
1. Create an API Token
Generate a token from your MailShield dashboard:
- Go to Settings > API
- Click Create Token
- Copy and securely store the token (it's only shown once)
2. Make Your First Request
bash
curl -H "Authorization: Bearer ms_your_token_here" \
https://app.mailshield.app/api/v1/domains3. Explore the Endpoints
- Domains - List, create, update, and delete domains
- DNS Checks - Trigger and retrieve security checks
- Security Score - Get domain security scores
- Reports - Access DMARC and TLS-RPT reports
Features
- RESTful Design - Predictable, resource-oriented URLs
- JSON Responses - All responses are in JSON format
- Bearer Authentication - Simple token-based auth
- IP Allowlisting - Restrict token usage to specific IPs
- Rate Limiting - Fair usage limits with clear headers
- OpenAPI Spec - Import into Postman, Insomnia, and more
Response Format
All responses follow a consistent format:
Success Response
json
{
"data": {
// Response data here
},
"meta": {
"pagination": {
"page": 1,
"limit": 20,
"hasMore": true
}
}
}Error Response
json
{
"error": {
"code": "not_found",
"message": "Domain not found"
}
}API Availability
API access is available on Pro plans and above. Check your current plan in Settings > Billing.
Next Steps
- Authentication - Learn about token management
- Rate Limiting - Understand usage limits
- Error Handling - Handle errors gracefully
- OpenAPI Spec - Import into your favorite tools