{
  "openapi": "3.1.1",
  "info": {
    "title": "SecureMark Client API",
    "description": "Read-only DMARC aggregate data. Authorize using a member-bound API key; dates use UTC and collections use opaque cursors.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://securemark.leadify.biz/"
    }
  ],
  "paths": {
    "/api/v1/access": {
      "get": {
        "tags": [
          "ClientData"
        ],
        "description": "Returns the credential's effective access and limits.",
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAccessResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/domains": {
      "get": {
        "tags": [
          "ClientData"
        ],
        "description": "Requires domains:read. Only currently authorized organization data is returned.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPageOfApiDomain"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/domains/{domainId}": {
      "get": {
        "tags": [
          "ClientData"
        ],
        "description": "Requires domains:read. Only currently authorized organization data is returned.",
        "parameters": [
          {
            "name": "domainId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiDomain"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/domains/{domainId}/summary": {
      "get": {
        "tags": [
          "ClientData"
        ],
        "description": "Requires analytics:read. Only currently authorized organization data is returned.",
        "parameters": [
          {
            "name": "domainId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/domains/{domainId}/timeseries": {
      "get": {
        "tags": [
          "ClientData"
        ],
        "description": "Requires analytics:read. Only currently authorized organization data is returned.",
        "parameters": [
          {
            "name": "domainId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTimeseries"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/domains/{domainId}/sources": {
      "get": {
        "tags": [
          "ClientData"
        ],
        "description": "Requires analytics:read. Only currently authorized organization data is returned.",
        "parameters": [
          {
            "name": "domainId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPageOfApiSource"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/domains/{domainId}/reports": {
      "get": {
        "tags": [
          "ClientData"
        ],
        "description": "Requires reports:read. Only currently authorized organization data is returned.",
        "parameters": [
          {
            "name": "domainId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "received_from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "received_to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPageOfApiReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/{reportId}": {
      "get": {
        "tags": [
          "ClientData"
        ],
        "description": "Requires reports:read. Only currently authorized organization data is returned.",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/{reportId}/records": {
      "get": {
        "tags": [
          "ClientData"
        ],
        "description": "Requires reports:read. Only currently authorized organization data is returned.",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRecordPage"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiAccessResponse": {
        "required": [
          "organizationId",
          "scopes",
          "availableFrom",
          "requestsPerKeyPerMinute",
          "requestsPerOrganizationPerMinute",
          "maxAnalyticsDays",
          "maxPageSize"
        ],
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "availableFrom": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "requestsPerKeyPerMinute": {
            "type": "integer",
            "format": "int32"
          },
          "requestsPerOrganizationPerMinute": {
            "type": "integer",
            "format": "int32"
          },
          "maxAnalyticsDays": {
            "type": "integer",
            "format": "int32"
          },
          "maxPageSize": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ApiCounts": {
        "required": [
          "messages",
          "dmarcPassed",
          "dmarcFailed",
          "dmarcUnknown",
          "dispositionNone",
          "dispositionQuarantine",
          "dispositionReject",
          "dispositionUnknown"
        ],
        "type": "object",
        "properties": {
          "messages": {
            "type": "integer",
            "format": "int64"
          },
          "dmarcPassed": {
            "type": "integer",
            "format": "int64"
          },
          "dmarcFailed": {
            "type": "integer",
            "format": "int64"
          },
          "dmarcUnknown": {
            "type": "integer",
            "format": "int64"
          },
          "dispositionNone": {
            "type": "integer",
            "format": "int64"
          },
          "dispositionQuarantine": {
            "type": "integer",
            "format": "int64"
          },
          "dispositionReject": {
            "type": "integer",
            "format": "int64"
          },
          "dispositionUnknown": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ApiDay": {
        "required": [
          "day",
          "counts"
        ],
        "type": "object",
        "properties": {
          "day": {
            "type": "string",
            "format": "date-time"
          },
          "counts": {
            "$ref": "#/components/schemas/ApiCounts"
          }
        }
      },
      "ApiDkim": {
        "required": [
          "domain",
          "selector",
          "result"
        ],
        "type": "object",
        "properties": {
          "domain": {
            "type": [
              "null",
              "string"
            ]
          },
          "selector": {
            "type": [
              "null",
              "string"
            ]
          },
          "result": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiDomain": {
        "required": [
          "id",
          "name",
          "verified",
          "paused",
          "policyObservedAt",
          "policy"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          },
          "paused": {
            "type": "boolean"
          },
          "policyObservedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "policy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiPolicy"
              }
            ]
          }
        }
      },
      "ApiPageOfApiDomain": {
        "required": [
          "data",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiDomain"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiPageOfApiReport": {
        "required": [
          "data",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiReport"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiPageOfApiSource": {
        "required": [
          "data",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSource"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiPolicy": {
        "required": [
          "p",
          "sp",
          "np",
          "pct",
          "adkim",
          "aspf"
        ],
        "type": "object",
        "properties": {
          "p": {
            "type": [
              "null",
              "string"
            ]
          },
          "sp": {
            "type": [
              "null",
              "string"
            ]
          },
          "np": {
            "type": [
              "null",
              "string"
            ]
          },
          "pct": {
            "type": [
              "null",
              "string"
            ]
          },
          "adkim": {
            "type": [
              "null",
              "string"
            ]
          },
          "aspf": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiReason": {
        "required": [
          "type",
          "comment"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "comment": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiRecord": {
        "required": [
          "id",
          "sourceIp",
          "count",
          "disposition",
          "alignedDkim",
          "alignedSpf",
          "headerFrom",
          "envelopeFrom",
          "envelopeTo",
          "dkimResults",
          "spfResults",
          "reasons"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sourceIp": {
            "type": [
              "null",
              "string"
            ]
          },
          "count": {
            "type": "integer",
            "format": "int64"
          },
          "disposition": {
            "type": [
              "null",
              "string"
            ]
          },
          "alignedDkim": {
            "type": [
              "null",
              "string"
            ]
          },
          "alignedSpf": {
            "type": [
              "null",
              "string"
            ]
          },
          "headerFrom": {
            "type": [
              "null",
              "string"
            ]
          },
          "envelopeFrom": {
            "type": [
              "null",
              "string"
            ]
          },
          "envelopeTo": {
            "type": [
              "null",
              "string"
            ]
          },
          "dkimResults": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiDkim"
            }
          },
          "spfResults": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSpf"
            }
          },
          "reasons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiReason"
            }
          }
        }
      },
      "ApiRecordPage": {
        "required": [
          "reportId",
          "version",
          "data",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "reportId": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecord"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiReport": {
        "required": [
          "id",
          "domainId",
          "reporter",
          "externalReportId",
          "periodStart",
          "periodEnd",
          "receivedAt",
          "modifiedAt",
          "version",
          "policy"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "domainId": {
            "type": "string",
            "format": "uuid"
          },
          "reporter": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalReportId": {
            "type": [
              "null",
              "string"
            ]
          },
          "periodStart": {
            "type": "string",
            "format": "date-time"
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "modifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "policy": {
            "$ref": "#/components/schemas/ApiPolicy"
          }
        }
      },
      "ApiSource": {
        "required": [
          "sourceIp",
          "counts",
          "ptr",
          "isp",
          "country",
          "enrichmentObservedAt"
        ],
        "type": "object",
        "properties": {
          "sourceIp": {
            "type": "string"
          },
          "counts": {
            "$ref": "#/components/schemas/ApiCounts"
          },
          "ptr": {
            "type": [
              "null",
              "string"
            ]
          },
          "isp": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "enrichmentObservedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ApiSpf": {
        "required": [
          "domain",
          "scope",
          "result"
        ],
        "type": "object",
        "properties": {
          "domain": {
            "type": [
              "null",
              "string"
            ]
          },
          "scope": {
            "type": [
              "null",
              "string"
            ]
          },
          "result": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiSummary": {
        "required": [
          "domainId",
          "from",
          "to",
          "latestReportReceivedAt",
          "counts"
        ],
        "type": "object",
        "properties": {
          "domainId": {
            "type": "string",
            "format": "uuid"
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "latestReportReceivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "counts": {
            "$ref": "#/components/schemas/ApiCounts"
          }
        }
      },
      "ApiTimeseries": {
        "required": [
          "domainId",
          "from",
          "to",
          "data"
        ],
        "type": "object",
        "properties": {
          "domainId": {
            "type": "string",
            "format": "uuid"
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiDay"
            }
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "ClientData"
    }
  ]
}