DMARCdrift
DMARCdrift
Integrations

API reference

Complete reference for the DMARCdrift read-only API: authentication, endpoints, response shapes, rate limits, and example requests.

The external API gives programmatic read-only access to your domains, DMARC reports, and alerts. All endpoints are under /v1/external/ and require an API key. The API is available on the Pro plan.

Base URL: https://api.dmarcdrift.com

Authentication

Pass your API key in the Authorization header:

Authorization: Bearer dd_live_<your-key>

Missing or invalid keys return 401 Unauthorized:

{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key"
  }
}

Rate limits

ScopeLimit
Per API key60 requests / minute
Per IP address200 requests / minute

When a limit is exceeded the response is 429 Too Many Requests with Retry-After: 60.

Pagination

All list endpoints accept limit and offset query parameters and return a consistent envelope:

{
  "data": [ /* array of items */ ],
  "total": 42
}
ParameterDefaultRange
limit501200
offset0≥ 0

Endpoints

List domains

GET /v1/external/domains

Returns all active domains in your account.

Query parameters

NameTypeDescription
limitintegerPage size. Default 50, max 200.
offsetintegerNumber of items to skip. Default 0.

Example request

GET /v1/external/domains?limit=10 HTTP/1.1
Authorization: Bearer dd_live_...

Example response 200 OK

{
  "data": [
    {
      "id": "dddddddd-dddd-dddd-dddd-dddddddddddd",
      "domain": "example.com",
      "status": "active",
      "last_report_at": "2026-05-01T04:00:00+00:00"
    }
  ],
  "total": 1
}

Domain object fields

FieldTypeDescription
idstring (UUID)Domain identifier. Used in other endpoint paths.
domainstringThe domain name.
statusstringactive or paused.
last_report_atstring (ISO 8601) | nullTimestamp of the most recent report received.

List reports for a domain

GET /v1/external/domains/{domain_id}/reports

Returns DMARC aggregate reports received for a specific domain, newest first.

Returns 404 Not Found if the domain does not exist or does not belong to your account.

Path parameters

NameDescription
domain_idUUID of the domain, from the list domains response.

Query parameters

NameTypeDescription
limitintegerPage size. Default 50, max 200.
offsetintegerNumber of items to skip. Default 0.

Example request

GET /v1/external/domains/dddddddd-dddd-dddd-dddd-dddddddddddd/reports HTTP/1.1
Authorization: Bearer dd_live_...

Example response 200 OK

{
  "data": [
    {
      "id": "rrrrrrrr-rrrr-rrrr-rrrr-rrrrrrrrrrrr",
      "reporter_org": "google.com",
      "reporter_email": "noreply-dmarc-support@google.com",
      "begin_date": "2026-05-01T00:00:00+00:00",
      "end_date": "2026-05-02T00:00:00+00:00",
      "record_count": 12,
      "total_messages": 4820,
      "aligned_messages": 4785
    }
  ],
  "total": 1
}

Report object fields

FieldTypeDescription
idstring (UUID)Report identifier.
reporter_orgstring | nullOrganisation name from the report (e.g., google.com).
reporter_emailstring | nullContact email from the report.
begin_datestring (ISO 8601)Start of the reporting window.
end_datestring (ISO 8601)End of the reporting window.
record_countintegerNumber of policy evaluation records in the report.
total_messagesintegerTotal message count across all records.
aligned_messagesintegerMessages that passed SPF or DKIM alignment.

List alerts

GET /v1/external/alerts

Returns alerts fired for your account, newest first. Use the optional domain_id filter to scope results to a single domain.

Query parameters

NameTypeDescription
limitintegerPage size. Default 50, max 200.
offsetintegerNumber of items to skip. Default 0.
domain_idstring (UUID)Optional. Filter to alerts for a specific domain.

Example request

GET /v1/external/alerts?domain_id=dddddddd-dddd-dddd-dddd-dddddddddddd HTTP/1.1
Authorization: Bearer dd_live_...

Example response 200 OK

{
  "data": [
    {
      "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
      "domain_id": "dddddddd-dddd-dddd-dddd-dddddddddddd",
      "type": "alert.alignment_regression",
      "fired_at": "2026-05-01T04:30:00+00:00",
      "resolved_at": null,
      "context": {
        "drop_pct": 35.2,
        "prev_pass_rate": 98.1,
        "curr_pass_rate": 62.9
      }
    }
  ],
  "total": 1
}

Alert object fields

FieldTypeDescription
idstring (UUID)Alert identifier.
domain_idstring (UUID)Domain this alert is associated with.
typestringAlert type. See the event types table.
fired_atstring (ISO 8601)When the alert was created.
resolved_atstring (ISO 8601) | nullWhen the alert was resolved, or null if still active.
contextobjectAlert-type-specific data (metrics, DNS record changes, etc.).

Error responses

All errors follow the same envelope:

{
  "error": {
    "code": "string",
    "message": "string"
  }
}
StatusCodeMeaning
401unauthorizedMissing, invalid, or disabled API key.
404not_foundResource does not exist or does not belong to your account.
422validation_errorInvalid query parameter (e.g., limit out of range).
429rate_limitedPer-key or per-IP rate limit exceeded.
500internal_errorUnexpected server error.

See also: API keys — creating and managing keys. Webhooks — receiving push notifications when alerts fire.

Ask AI about this page:ClaudeChatGPT