We graded 255 ASX 200 domains on email security. Only 29.4% are fully protected. [Read the Report]

Authentication Methods

Bearer tokens, sessions, embed keys, and signature verification

5 min read API Reference

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-Signature header 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-Remaining before 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.