Documentation

Learn how to integrate and use DDMARC

Docs/API Reference
REST API v1

API Reference

Integrate DDMARC into your applications with our REST API. Manage domains, retrieve reports, and automate your email authentication workflow.

Fast

<100ms response time

Secure

TLS 1.3 encrypted

RESTful

JSON API format

Rate Limited

1000 req/min

Base URL

https://api.ddmarc.com/v1

All API requests must be made over HTTPS. Calls made over plain HTTP will fail.

Authentication

The DDMARC API uses API keys to authenticate requests. You can create and manage your API keys in the dashboard settings.

Authentication Header
Authorization: Bearer your_api_key_here

Keep your API key secure

Never expose your API key in client-side code or public repositories. Rotate keys regularly and use environment variables.

Example Request

curl -X GET "https://api.ddmarc.com/v1/domains" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Example Response

200 OKapplication/json
{
  "data": [
    {
      "id": "dom_abc123",
      "name": "example.com",
      "status": "verified",
      "dmarc_policy": "reject",
      "pass_rate": 98.5,
      "reports_last_30d": 1250,
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "per_page": 20
  }
}

Endpoints

Domains

MethodEndpointDescription
GET/api/v1/domainsList all domains
POST/api/v1/domainsAdd a new domain
GET/api/v1/domains/:idGet domain details
PUT/api/v1/domains/:idUpdate domain settings
DELETE/api/v1/domains/:idRemove a domain
GET/api/v1/domains/:id/dnsGet DNS records to configure
POST/api/v1/domains/:id/verifyVerify domain ownership

Reports

MethodEndpointDescription
GET/api/v1/reportsList DMARC reports
GET/api/v1/reports/:idGet report details
GET/api/v1/reports/aggregateGet aggregated statistics
GET/api/v1/reports/sourcesList sending sources
GET/api/v1/reports/failuresList authentication failures

Analytics

MethodEndpointDescription
GET/api/v1/analytics/summaryGet summary statistics
GET/api/v1/analytics/trendsGet trend data over time
GET/api/v1/analytics/geoGet geographic distribution

Webhooks

MethodEndpointDescription
GET/api/v1/webhooksList webhook endpoints
POST/api/v1/webhooksCreate webhook endpoint
PUT/api/v1/webhooks/:idUpdate webhook
DELETE/api/v1/webhooks/:idDelete webhook
POST/api/v1/webhooks/:id/testSend test webhook

Rate Limiting

1,000
Requests per minute
100,000
Requests per day
429
Status when exceeded

Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining) are included in every response. Enterprise plans have higher limits.

Error Codes

CodeStatusDescription
400Bad RequestInvalid request parameters
401UnauthorizedMissing or invalid API key
403ForbiddenInsufficient permissions
404Not FoundResource not found
429Too Many RequestsRate limit exceeded
500Internal ErrorServer error - contact support

SDKs & Libraries

Official client libraries to make integration easier:

Node.js
npm install @ddmarc/sdk
Python
pip install ddmarc
Go
go get github.com/ddmarc/ddmarc-go

Explore More