{
  "openapi": "3.0.1",
  "info": {
    "title": "Domain Security Audit API | SSL Expiry, DMARC, Domain Expiry",
    "description": "Summary-first portfolio monitor for SSL expiry, DMARC/SPF/DKIM, domain expiry/ownership, and security headers with remediation-ready outputs.",
    "version": "0.1",
    "x-build-id": "WlN5n7aLIrRbGc8Mi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~domain-trust-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-domain-trust-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/taroyamada~domain-trust-monitor/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-domain-trust-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/taroyamada~domain-trust-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-domain-trust-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "domains"
        ],
        "properties": {
          "domains": {
            "title": "Free / starter: Domains / URLs to audit",
            "type": "array",
            "description": "Free / starter quickstart: begin with 2-3 domains for a fast first success. Paid expansion: grow into larger recurring portfolios (for example 5-25+ domains) while keeping the same SSL expiry, DMARC/SPF/DKIM, domain expiry / ownership, and security header checks bundled together.",
            "items": {
              "type": "string"
            }
          },
          "port": {
            "title": "HTTPS / TLS port",
            "minimum": 1,
            "maximum": 65535,
            "type": "integer",
            "description": "Port used for SSL/TLS expiry and trust checks across the portfolio.",
            "default": 443
          },
          "expiryWarningDays": {
            "title": "SSL + domain expiry warning window (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Flag certificates or domains that expire within this many days.",
            "default": 30
          },
          "followRedirects": {
            "title": "Follow redirects before header audit",
            "type": "boolean",
            "description": "Follow redirects before scoring the final site's security headers.",
            "default": true
          },
          "checkDkim": {
            "title": "Check DKIM selectors",
            "type": "boolean",
            "description": "Probe common selectors so the first run catches missing DKIM alongside SPF and DMARC.",
            "default": true
          },
          "dkimSelectors": {
            "title": "Custom DKIM selectors",
            "type": "array",
            "description": "Optional DKIM selectors to check instead of the built-in defaults.",
            "items": {
              "type": "string"
            }
          },
          "delivery": {
            "title": "Delivery mode (free / starter dataset vs paid webhook)",
            "enum": [
              "dataset",
              "webhook"
            ],
            "type": "string",
            "description": "Free / starter path: dataset keeps the first run low-friction and still writes the full summary to OUTPUT. Paid expansion path: webhook sends the same summary + remediation list to your endpoint for recurring delivery, ticketing, or adjacent ops workflows.",
            "default": "dataset"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Advanced delivery only: required when delivery is webhook. The payload includes the executive summary, flattened remediation list, and per-domain results."
          },
          "snapshotKey": {
            "title": "Snapshot key for recurring audits",
            "type": "string",
            "description": "Keep this stable when you move from the free / starter quickstart to richer recurring audits so SSL, DMARC, header, and ownership changes stay comparable run to run.",
            "default": "domain-trust-monitor-snapshots"
          },
          "concurrency": {
            "title": "Parallel domain checks",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Free / starter default 3 is usually enough for 2-3 domains. Increase it for paid expansion portfolios when you want broader coverage in one run.",
            "default": 3
          },
          "enableReputationLookup": {
            "title": "Paid expansion: Add Google Web Risk",
            "type": "boolean",
            "description": "Paid expansion add-on: layer Google Web Risk on top of the core bundled audit when you want a richer threat signal or stronger client-ready narrative.",
            "default": false
          },
          "reputationApiKey": {
            "title": "Paid expansion: Google Web Risk API key",
            "type": "string",
            "description": "Required only for the paid Google Web Risk overlay."
          },
          "reputationThreatTypes": {
            "title": "Paid expansion: Web Risk threat types",
            "type": "array",
            "description": "Threat types to query when the paid Web Risk overlay is enabled.",
            "items": {
              "type": "string"
            }
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Preview the audit without saving snapshots, dataset rows, or sending webhooks. Useful for validation, but leave it off for the free / starter baseline or paid recurring runs you want to keep.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}