API Quick Start
Authentication, base URLs, and your first request
API Quick Start
Get up and running with the DMARC Busta API in minutes.
Authentication
All programmatic API requests use Bearer tokens (Personal Access Tokens):
Authorization: Bearer YOUR_API_TOKEN
Create an API Token
- Go to Settings → API Access
- Click Generate Token
- Give it a descriptive name (e.g., "Zapier Integration")
- Copy the token immediately — it won't be shown again
- Store it securely in your application's environment
Base URL
https://app.dmarcbusta.com/api/v1
Example Request
curl -X GET https://app.dmarcbusta.com/api/v1/domains \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Response Format
All responses are JSON:
{
"data": [...],
"meta": { "total": 5 }
}
Next Steps
- Browse the API Endpoints reference
- Review authentication methods
- Set up webhooks for real-time events
API Endpoints Reference
Complete list of all available API endpoints organized by category.
Domain Management
GET /domains
List all domains with DMARC policy and status
POST /domains
Add a new domain
GET /domains/{name}
Get domain details
GET /domains/{name}/status
Get DMARC/SPF/DKIM/Automation status
GET /domains/{name}/reports
Get DMARC reports (last 30 days, max 90)
SPF Management
GET /domains/{domain}/spf
Get current SPF record
POST /domains/{domain}/spf/activate
Activate SPF management
POST /domains/{domain}/spf/detect-sources
Auto-detect SPF sources from DMARC reports
DMARC Sources & IPs
GET /domains/{domain}/sources
List all sending sources/IPs
GET /domains/{domain}/sources/intelligence
AI-powered source recommendations
POST /domains/{domain}/sources/{source}/add-to-spf
Add source to SPF record
DMARC Reports
GET /dmarc-reports/overview
Dashboard overview statistics
GET /dmarc-reports/domains/{domain}/summary
Domain report summary
GET /dmarc-reports/forensic/reports
List forensic (RUF) reports
Alerts & Issues
GET /v1/alerts
List alerts (filtered, paginated)
GET /v1/alerts/{alert}
Get alert details
POST /v1/alerts/{alert}/resolve
Mark alert as resolved
Organizations (Domain Groups)
GET /organizations
List organizations
POST /organizations
Create organization
GET /organizations/{group}/domains
Get domains in organization
DNS Providers
POST /dns-providers/authenticate
Authenticate with DNS provider (Cloudflare, Route53, etc.)
POST /dns-providers/{provider}/import-domains
Import domains from provider
For complete method signatures and request/response bodies, see the Settings → API Access page in the app.
Webhooks
Configure your account to receive real-time notifications when important events occur.
Setting Up Webhooks
- Go to Settings → API Access
- Under Webhook URL, enter your endpoint
- Click Save
- Verify signature in your receiver (see Signature Verification below)
Webhook Events
alert.created
Sent when a new security alert is generated for a domain
alert.resolved
Sent when an alert is marked as resolved
domain.verified
Sent when domain ownership is verified
spf.activated
Sent when SPF management is activated
dmarc.progressed
Sent when DMARC policy is advanced (none → quarantine → reject)
Webhook Payload
{
"event": "alert.created",
"timestamp": "2026-08-06T21:32:00Z",
"data": {
"alert_id": 12345,
"domain": "example.com",
"severity": "high",
"title": "SPF Policy Not Found"
}
}
Signature Verification
Every webhook includes an X-Webhook-Signature header containing an HMAC SHA-256 hash. Verify it like this:
// Node.js example
const crypto = require('crypto');
const signature = req.headers['x-webhook-signature'];
const body = req.rawBody; // Raw request body
const secret = process.env.DMARC_BUSTA_WEBHOOK_SECRET;
const hash = crypto
.createHmac('sha256', secret)
.update(body)
.digest('hex');
if (hash !== signature) {
return res.status(401).send('Unauthorized');
}
Retry Policy
If your endpoint returns an error (5xx or timeout), we'll retry with exponential backoff:
- Attempt 1: Immediate
- Attempt 2: 5 seconds
- Attempt 3: 30 seconds
- Attempt 4: 5 minutes
- Attempt 5: 1 hour
Authentication Methods
DMARC Busta supports multiple authentication methods depending on your use case.
1. Bearer Token (API)
For programmatic access to the API.
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://app.dmarcbusta.com/api/v1/domains
- Create tokens in Settings → API Access
- Each token is scoped to the creating user's account
- Store securely — never commit to repositories
- Revoke unused tokens anytime
2. Session-Based (Web)
Browser-based authentication for the web dashboard.
- Login with email/password, Google, Azure, or LinkedIn
- Session stored in secure HTTP-only cookies
- CSRF protection enabled
- Automatic logout after 30 days of inactivity
3. Embed Key (Widgets)
For third-party embedded scanners and widgets.
// Embed endpoint
GET /api/embed/{embed_key}/scan
- Public-key authentication (no secret required)
- CORS validation on origin domain
- Used for whitelabel widgets
4. Webhook Signatures
For verifying inbound webhook events.
X-Webhook-Signatureheader contains HMAC SHA-256 hash- Verify with your webhook secret from Settings → API Access
- Replay attacks prevented via timestamp validation
5. OAuth (Social Login)
Supported providers for account authentication:
- Google OAuth 2.0
- Microsoft Azure AD
- LinkedIn OAuth
Rate Limiting
API rate limiting prevents abuse and ensures fair usage across all accounts.
Default Limits
General API Endpoints
60 requests per minute per API token
Webhook Processing
1000 webhooks per hour
DNS Operations
10 DNS writes per minute (SPF updates, DNS provider writes)
Public Endpoints
100 requests per minute per IP
Rate Limit Headers
Every API response includes rate limit information:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1691350320
Handling Rate Limits
When you hit a rate limit, the API returns 429 Too Many Requests:
{
"error": "Rate limit exceeded",
"retry_after": 30
}
Implementation tips:
- Check
X-RateLimit-Remainingbefore making requests - Implement exponential backoff on 429 responses
- Batch operations where possible
- Contact support for higher limits if needed
Error Handling
Understanding API error responses and how to troubleshoot issues.
HTTP Status Codes
200 OK
Request succeeded
201 Created
Resource created successfully
400 Bad Request
Invalid request parameters or body
401 Unauthorized
Missing or invalid authentication
403 Forbidden
Authenticated but not authorized (e.g., domain not in your account)
404 Not Found
Resource doesn't exist
429 Too Many Requests
Rate limit exceeded (see Retry-After header)
500 Server Error
Internal server error — retry with backoff
Error Response Format
{
"message": "Validation failed",
"errors": {
"domain_name": ["Domain name is required"],
"automation_level": ["Invalid automation level"]
}
}
Common Error Scenarios
Invalid Token
Solution: Generate a new token in Settings → API Access. Expired tokens must be recreated.
Domain Not Found
Solution: Use the exact domain name. API only returns domains in your account (no enumeration).
SPF Lookup Limit Exceeded
Solution: Consolidate SPF sources. Use the SPF Flattener tool to reduce nested includes.
DNS Provider Authentication Failed
Solution: Re-authenticate in Settings. Verify API tokens are still valid on the DNS provider.