{
  "openapi": "3.1.0",
  "info": {
    "title": "DomainWarn API",
    "version": "1.0.0",
    "description": "Public API of DomainWarn: read and write domains, monitors, incidents, events and customers of an organization from scripts, CI pipelines and your own integrations.\n\nAuthenticate with an API token as bearer token; tokens are created in the dashboard under Settings → API and are valid for exactly one organization with the scope `read` or `write`. 300 requests per minute and token. All timestamps are ISO 8601 in UTC.",
    "contact": {
      "name": "DomainWarn",
      "url": "https://domainwarn.com/docs/api",
      "email": "info@domainwarn.com"
    },
    "termsOfService": "https://domainwarn.com/legal/terms"
  },
  "externalDocs": {
    "description": "API documentation",
    "url": "https://domainwarn.com/docs/api"
  },
  "servers": [
    {
      "url": "https://api.domainwarn.com/api/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Organization",
      "description": "The organization the token belongs to"
    },
    {
      "name": "Overview",
      "description": "Summary as on the dashboard home page"
    },
    {
      "name": "Domains",
      "description": "Create, update, pause and check monitored domains"
    },
    {
      "name": "Monitors",
      "description": "Individual checks per domain, their results and availability"
    },
    {
      "name": "DNS",
      "description": "DNS snapshots and changes"
    },
    {
      "name": "Incidents",
      "description": "Problems with cause, status and acknowledgement"
    },
    {
      "name": "Events",
      "description": "Detected changes and history"
    },
    {
      "name": "Customers",
      "description": "Customers domains are assigned to"
    }
  ],
  "paths": {
    "/organizations": {
      "get": {
        "operationId": "listOrganizations",
        "tags": [
          "Organization"
        ],
        "summary": "Organization of the token",
        "description": "Returns exactly the organization the token belongs to, with slug, plan and the role of the token. Useful to look up the slug for all further calls.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Organization"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/dashboard": {
      "get": {
        "operationId": "getDashboard",
        "tags": [
          "Overview"
        ],
        "summary": "Overview",
        "description": "Counters per health state, open incidents, changes of the last 24 hours, plan usage and history of the last 14 days. The response carries an ETag; with `If-None-Match` the server answers 304 when nothing changed.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "ETag of the previous response; if nothing changed the server answers 304 without a body",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Dashboard"
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Identifier of this state for `If-None-Match`"
              },
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "example": "private, max-age=30"
                },
                "description": "Short lifetime, the response is per organization"
              }
            }
          },
          "304": {
            "description": "Unchanged since the ETag in `If-None-Match`, no body",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Identifier of this state for `If-None-Match`"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/usage": {
      "get": {
        "operationId": "getUsage",
        "tags": [
          "Overview"
        ],
        "summary": "Plan usage",
        "description": "Limits of the effective plan and current usage: domains, monitors, members, channels and checks of the last 24 hours.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Usage"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains": {
      "get": {
        "operationId": "listDomains",
        "tags": [
          "Domains"
        ],
        "summary": "List domains",
        "description": "All domains of the organization with health, customer and number of open incidents, paginated. Monitors are not included here; use the single fetch for them.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Health states, comma-separated: healthy, warning, critical, unknown",
            "schema": {
              "type": "string",
              "example": "critical,warning"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "Only domains of this customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cms",
            "in": "query",
            "required": false,
            "description": "CMS keys, comma-separated; `none` for reachable without a known system, `unknown` for not detected yet",
            "schema": {
              "type": "string",
              "example": "wordpress"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Part of the domain name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort order, minus for descending",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "-name",
                "health_status",
                "-health_status",
                "created_at",
                "-created_at",
                "last_checked_at",
                "-last_checked_at"
              ],
              "default": "name"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page (1 to 200)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Domain"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/Links"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createDomain",
        "tags": [
          "Domains"
        ],
        "summary": "Create a domain",
        "description": "Creates the domain with the default monitors and starts the first check. The domain limit of the plan applies; above it the server answers 422.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Domain"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Domain, Unicode or punycode; subdomains and schemes are stripped"
                  },
                  "customer_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Customer the domain is assigned to"
                  },
                  "run_checks": {
                    "type": "boolean",
                    "default": true,
                    "description": "Start the first check immediately"
                  }
                }
              },
              "example": {
                "name": "kunde.de",
                "customer_id": null
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/export.csv": {
      "get": {
        "operationId": "exportDomainsCsv",
        "tags": [
          "Domains"
        ],
        "summary": "Domains as CSV",
        "description": "The same list as when listing, as a CSV file with all rows instead of pages (UTF-8 with BOM, `Content-Disposition: attachment`). Columns: domain, customer, health, cms, cms_version, registrar, domain_expires_at, certificate_target, certificate_valid_to, certificate_days_left, open_incidents, last_checked_at, paused, dashboard_url. The certificate is the one of the apex domain on port 443, otherwise of the first enabled certificate monitor (`certificate_target` names it).\n\nA read token is sufficient (`read`).\n\nOwn limit: 30 calls per hour and organization.",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Health states, comma-separated: healthy, warning, critical, unknown",
            "schema": {
              "type": "string",
              "example": "critical,warning"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "Only domains of this customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cms",
            "in": "query",
            "required": false,
            "description": "CMS keys, comma-separated; `none` for reachable without a known system, `unknown` for not detected yet",
            "schema": {
              "type": "string",
              "example": "wordpress"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Part of the domain name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort order, minus for descending",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "-name",
                "health_status",
                "-health_status",
                "created_at",
                "-created_at",
                "last_checked_at",
                "-last_checked_at"
              ],
              "default": "name"
            }
          },
          {
            "name": "delimiter",
            "in": "query",
            "required": false,
            "description": "Delimiter; without it semicolon for language de (Excel), comma otherwise",
            "schema": {
              "type": "string",
              "enum": [
                "comma",
                "semicolon"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CSV file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/expirations": {
      "get": {
        "operationId": "listExpirations",
        "tags": [
          "Domains"
        ],
        "summary": "List expirations",
        "description": "What expires in the coming days, by date: domain registration (RDAP), certificate (TLS check), contract end and last day to cancel (contract end minus notice period) from the contract data, each row with customer, responsible member and cost. Overdue rows stay visible with negative days left. `meta.totals` sums the annual cost per customer and currency over the domains in the list. A customer login sees only domain and certificate expiries of its domains.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Horizon in calendar days from today",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 730,
              "default": 90
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "Only domains of this customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "Kinds, comma-separated: domain, certificate, contract_end, notice_deadline",
            "schema": {
              "type": "string",
              "example": "contract_end,notice_deadline"
            }
          },
          {
            "name": "action_required",
            "in": "query",
            "required": false,
            "description": "Only rows that need action",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Expiration"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "days": {
                          "type": "integer",
                          "description": "Applied horizon"
                        },
                        "totals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "customer": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid",
                                    "description": "Customer ID"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Name"
                                  }
                                }
                              },
                              "currency": {
                                "type": "string",
                                "description": "Currency"
                              },
                              "annual_cost": {
                                "type": "number",
                                "description": "Sum of annual cost"
                              },
                              "domains": {
                                "type": "integer",
                                "description": "Domains with cost in the sum"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/expirations/export.csv": {
      "get": {
        "operationId": "exportExpirationsCsv",
        "tags": [
          "Domains"
        ],
        "summary": "Expirations as CSV",
        "description": "The same list as when listing, as a CSV file (UTF-8 with BOM, `Content-Disposition: attachment`). Columns: date, days_left, kind, domain, customer, target, provider, auto_renews, responsible, annual_cost, currency, cost_reference, action_required, dashboard_url.\n\nA read token is sufficient (`read`).\n\nOwn limit: 30 calls per hour and organization.",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Horizon in calendar days from today",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 730,
              "default": 90
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "Only domains of this customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "Kinds, comma-separated: domain, certificate, contract_end, notice_deadline",
            "schema": {
              "type": "string",
              "example": "contract_end,notice_deadline"
            }
          },
          {
            "name": "action_required",
            "in": "query",
            "required": false,
            "description": "Only rows that need action",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "delimiter",
            "in": "query",
            "required": false,
            "description": "Delimiter; without it semicolon for language de (Excel), comma otherwise",
            "schema": {
              "type": "string",
              "enum": [
                "comma",
                "semicolon"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CSV file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/cms": {
      "get": {
        "operationId": "listDomainCms",
        "tags": [
          "Domains"
        ],
        "summary": "Detected systems",
        "description": "Which CMS and shop systems were detected on the domains, with counts; `meta.none` counts reachable domains without a known system, `meta.unknown` those not detected yet. Values for the `cms` filter of the domain list.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "CMS key"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "count": {
                            "type": "integer",
                            "description": "Domains"
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "none": {
                          "type": "integer",
                          "description": "Reachable without a known system"
                        },
                        "unknown": {
                          "type": "integer",
                          "description": "Not detected yet"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/bulk": {
      "post": {
        "operationId": "bulkCreateDomains",
        "tags": [
          "Domains"
        ],
        "summary": "Create domains in bulk",
        "description": "Up to 200 domains per call, as a list or as text with one domain per line (comma, semicolon and whitespace also separate; lines starting with # are skipped). Invalid or duplicate domains end up in `meta.errors`, the rest are created.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 3 calls per hour and organization.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created domains and errors per input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Domain"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "created": {
                          "type": "integer"
                        },
                        "failed": {
                          "type": "integer"
                        },
                        "errors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 200,
                    "description": "List of domains (alternative to `text`)"
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 20000,
                    "description": "Domains as text (alternative to `domains`)"
                  },
                  "customer_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Customer for all created domains"
                  }
                }
              },
              "example": {
                "text": "kunde-a.de\nkunde-b.de\nshop.kunde-c.com",
                "customer_id": null
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/bulk-actions": {
      "post": {
        "operationId": "bulkDomainAction",
        "tags": [
          "Domains"
        ],
        "summary": "Bulk action on domains",
        "description": "One action on up to 500 domains of the organization: `pause` (optional `until`), `resume`, `assign_customer` (`customer_id` or null), `set_areas` (`groups` as in `PATCH /domains/{domain}/monitoring`), `set_interval` (`type` and `interval_seconds`, not below the plan's minimum), `check_now` (at most 50 domains, counts against the same limits as “check now”; domains without remaining quota are skipped) and `delete` (only with `confirm: true`, frees plan slots). Up to 100 domains the server answers 200 with the result per domain, above that 202 with the bulk action in status queued; `GET /domains/bulk-actions/{operation}` reports the progress. IDs of other organizations or unknown IDs appear as skipped (`not_found`) without a name. The audit log receives one summary entry.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 10 calls per minute and organization.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result per domain (status done); for more than 100 domains 202 with status queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DomainBulkOperation"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action",
                  "ids"
                ],
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "pause",
                      "resume",
                      "assign_customer",
                      "set_areas",
                      "set_interval",
                      "check_now",
                      "delete"
                    ],
                    "description": "Action"
                  },
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 500,
                    "uniqueItems": true,
                    "description": "Domain IDs (at most 50 for `check_now`)"
                  },
                  "until": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "pause: until this time, indefinitely without it"
                  },
                  "customer_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "assign_customer: a client of the organization or null (remove the assignment); required for this action"
                  },
                  "groups": {
                    "type": "object",
                    "properties": {
                      "web": {
                        "type": "boolean"
                      },
                      "mail": {
                        "type": "boolean"
                      },
                      "dns": {
                        "type": "boolean"
                      },
                      "security": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1,
                    "description": "set_areas: areas on or off"
                  },
                  "type": {
                    "type": "string",
                    "description": "set_interval: check type (all except heartbeat)"
                  },
                  "interval_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 604800,
                    "description": "set_interval: interval in seconds"
                  },
                  "confirm": {
                    "type": "boolean",
                    "description": "delete: must be true"
                  }
                }
              },
              "example": {
                "action": "set_areas",
                "ids": [
                  "9a1c6d2e-4b7f-4e1a-9c3d-2f5e8a7b6c10",
                  "9a1c6d2e-4b7f-4e1a-9c3d-2f5e8a7b6c11"
                ],
                "groups": {
                  "mail": false
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/bulk-actions/{operation}": {
      "get": {
        "operationId": "getBulkDomainAction",
        "tags": [
          "Domains"
        ],
        "summary": "Get bulk action progress",
        "description": "State of a background bulk action: counters and the result per domain so far. Poll every few seconds until `status` is done or failed. Agency-internal: customer accounts cannot see bulk actions.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "operation",
            "in": "path",
            "required": true,
            "description": "Bulk action ID from the start response",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DomainBulkOperation"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/import/zone-file": {
      "post": {
        "operationId": "previewZoneFileImport",
        "tags": [
          "Domains"
        ],
        "summary": "Parse a zone file",
        "description": "Reads a BIND zone file and returns the website hostnames (A, AAAA, CNAME) as a preview, each with a flag whether it is already monitored. At most 200 per call, further pages via `offset` = `next_offset`. Creates nothing: the confirmed selection goes to the import.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 60 calls per minute and organization.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "origin": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Detected zone"
                        },
                        "records": {
                          "type": "integer",
                          "description": "Records read"
                        },
                        "hostnames": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "hostname": {
                                "type": "string"
                              },
                              "is_apex": {
                                "type": "boolean",
                                "description": "The zone itself"
                              },
                              "already_monitored": {
                                "type": "boolean",
                                "description": "A website monitor for this hostname already exists"
                              }
                            }
                          }
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total hostnames"
                        },
                        "offset": {
                          "type": "integer",
                          "description": "First entry of this page"
                        },
                        "next_offset": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Offset of the next page, null at the end"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "More hostnames than one page"
                        },
                        "limit": {
                          "type": "integer",
                          "description": "Hostnames per page"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "maxLength": 500000,
                    "description": "Contents of the zone file"
                  },
                  "origin": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Zone for files without `$ORIGIN` (e.g. example.com); if missing with relative names the server answers 422"
                  },
                  "offset": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "description": "First entry of the page (from `next_offset`)"
                  }
                }
              },
              "example": {
                "text": "$ORIGIN kunde.de.\n@ IN A 203.0.113.10\nwww IN CNAME kunde.de.\nshop IN A 203.0.113.11"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/import/commit": {
      "post": {
        "operationId": "commitDomainImport",
        "tags": [
          "Domains"
        ],
        "summary": "Confirm an import",
        "description": "Creates the confirmed list from a zone file in the background, up to 5000 domains per import. The response (202) is the import with its ID; `GET /domains/import/{import}` reports the progress until `status` is done or failed. Unlike bulk creation, the monitors start at their regular time instead of immediately. Once the plan's domain limit is reached, the remaining names are rejected with the same reason.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 10 imports per hour and organization.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "The created import (status queued)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DomainImport"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domains"
                ],
                "properties": {
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "minItems": 1,
                    "maxItems": 5000,
                    "description": "Confirmed domains or hostnames"
                  },
                  "customer_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Customer for all created domains"
                  }
                }
              },
              "example": {
                "domains": [
                  "kunde.de",
                  "shop.kunde.de"
                ],
                "customer_id": null
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/import/{import}": {
      "get": {
        "operationId": "getDomainImport",
        "tags": [
          "Domains"
        ],
        "summary": "Get import progress",
        "description": "State of an import: counters per batch and, once finished, the list of rejected or skipped names with reason. Poll every few seconds until `status` is done or failed. Agency-internal: customer accounts cannot see imports.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "import",
            "in": "path",
            "required": true,
            "description": "Import ID from the confirm response",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DomainImport"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}": {
      "get": {
        "operationId": "getDomain",
        "tags": [
          "Domains"
        ],
        "summary": "Get a domain",
        "description": "A single domain with all monitors, their latest findings and the number of open incidents.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Domain"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateDomain",
        "tags": [
          "Domains"
        ],
        "summary": "Update a domain",
        "description": "Assign a customer, switch monitoring on or off, or set notification rules for this domain only. Only fields that are sent change.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Domain"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "customer_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Customer or null to unassign"
                  },
                  "is_active": {
                    "type": "boolean",
                    "description": "false pauses monitoring indefinitely, true resumes it"
                  },
                  "notification_overrides": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "Notification overrides",
                    "properties": {
                      "failure_minutes": {
                        "type": "integer",
                        "description": "Minutes before a failure is reported (1 to 1440)",
                        "minimum": 1,
                        "maximum": 1440
                      },
                      "recovery_minutes": {
                        "type": "integer",
                        "description": "Minutes before recovery is reported (1 to 1440)",
                        "minimum": 1,
                        "maximum": 1440
                      },
                      "min_severity": {
                        "type": "string",
                        "enum": [
                          "info",
                          "warning",
                          "critical"
                        ],
                        "description": "Lowest severity that is reported"
                      },
                      "ignore_quiet_hours": {
                        "type": "boolean",
                        "description": "Notify during quiet hours as well"
                      },
                      "notify_on_change": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Change types that are reported"
                      }
                    }
                  }
                }
              },
              "example": {
                "customer_id": "3f9c1a52-6a2e-4c0e-9d4b-1c9a1a0e5b77",
                "notification_overrides": {
                  "min_severity": "critical"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteDomain",
        "tags": [
          "Domains"
        ],
        "summary": "Delete a domain",
        "description": "Permanently removes the domain with its monitors, results, incidents and events.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, no content"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/contract": {
      "get": {
        "operationId": "getDomainContract",
        "tags": [
          "Domains"
        ],
        "summary": "Get contract and costs",
        "description": "Contract and cost data of the domain: registrar, hosting provider, contract end, notice period, automatic renewal, annual cost, cost centre, responsible member, note. Without a stored contract the fields come back empty with `exists: false` and the registrar detected by the domain check as a suggestion. Agency-internal: customer logins cannot reach this route.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DomainContract"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "put": {
        "operationId": "updateDomainContract",
        "tags": [
          "Domains"
        ],
        "summary": "Set contract and costs",
        "description": "Replaces the whole contract: omitted fields become empty, a call without fields deletes the contract. The last day to cancel is contract end minus notice period; 30 and 7 days before it (and, without automatic renewal, before the contract end) DomainWarn reminds you via the organization's notification rules, and both dates appear in the calendar subscription.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DomainContract"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "registrar": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 160,
                    "description": "Registrar (free text)"
                  },
                  "hosting_provider": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 160,
                    "description": "Hosting provider"
                  },
                  "ends_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "Contract end as YYYY-MM-DD"
                  },
                  "notice_period_days": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 3650,
                    "description": "Notice period in days"
                  },
                  "auto_renews": {
                    "type": "boolean",
                    "default": false,
                    "description": "Renews automatically"
                  },
                  "annual_cost": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "description": "Annual cost"
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "default": "EUR",
                    "description": "Currency (ISO 4217)"
                  },
                  "cost_reference": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120,
                    "description": "Cost centre or reference"
                  },
                  "responsible_user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Member of the organization (not a customer login)"
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000,
                    "description": "Note"
                  }
                }
              },
              "example": {
                "registrar": "IONOS SE",
                "hosting_provider": "Hetzner",
                "ends_at": "2026-12-31",
                "notice_period_days": 90,
                "auto_renews": false,
                "annual_cost": 119.5,
                "currency": "EUR",
                "cost_reference": "KST-4711",
                "responsible_user_id": "3f9c1a52-6a2e-4c0e-9d4b-1c9a1a0e5b77"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/pause": {
      "post": {
        "operationId": "pauseDomain",
        "tags": [
          "Domains"
        ],
        "summary": "Pause a domain",
        "description": "Suspends monitoring until a point in time, e.g. during a migration. Without `until` the pause is lifted. Open incidents remain.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Domain"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "until": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "End of the pause, in the future; null lifts the pause"
                  }
                }
              },
              "example": {
                "until": "2026-10-01T06:00:00Z"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/move": {
      "post": {
        "operationId": "moveDomain",
        "tags": [
          "Domains"
        ],
        "summary": "Move a domain to another organisation",
        "description": "Moves the domain with its monitors, results, history, incidents and certificates to another organisation in which the caller has write access. Customer assignment, domain-specific rules and maintenance windows stay behind; the target plan and intervals apply afterwards (above the limit the domain is paused there). 409 `domain-exists` if the target already monitors the domain.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "unicode_name": {
                          "type": "string"
                        },
                        "organization": {
                          "type": "object",
                          "properties": {
                            "slug": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          }
                        },
                        "plan_paused": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "organization"
                ],
                "properties": {
                  "organization": {
                    "type": "string",
                    "description": "Slug of the target organisation"
                  }
                }
              },
              "example": {
                "organization": "zweite-agentur"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/monitoring": {
      "patch": {
        "operationId": "setMonitoringGroups",
        "tags": [
          "Domains"
        ],
        "summary": "Switch monitoring groups",
        "description": "Switches the groups website (`web`: http, tls, ct_log, redirects, ipv6), mail (`mail`: mx, spf, dkim, dmarc, mta_sts, tls_rpt, bimi, reverse_dns, smtp, dane, autodiscover) and DNS (`dns`: dns, dnssec, domain, blacklist, caa, nameservers) on or off. Groups that are switched off close their open incidents.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Domain"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "groups"
                ],
                "properties": {
                  "groups": {
                    "type": "object",
                    "properties": {
                      "web": {
                        "type": "boolean"
                      },
                      "mail": {
                        "type": "boolean"
                      },
                      "dns": {
                        "type": "boolean"
                      }
                    },
                    "description": "Groups with the desired state; groups not mentioned stay unchanged"
                  }
                }
              },
              "example": {
                "groups": {
                  "mail": false
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/detect-cms": {
      "post": {
        "operationId": "detectDomainCms",
        "tags": [
          "Domains"
        ],
        "summary": "Detect the system again",
        "description": "Queues CMS and shop system detection for the domain; the result appears in the domain's `cms`.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Detection queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "queued": {
                          "type": "boolean",
                          "description": "Queued"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/check-now": {
      "post": {
        "operationId": "checkDomainNow",
        "tags": [
          "Domains"
        ],
        "summary": "Check now",
        "description": "Queues all enabled monitors of the domain immediately, e.g. after a deploy or a DNS change. Results show up in the monitors a few seconds later.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 5 per domain and hour, 60 per organization and hour.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Checks queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "dispatched": {
                          "type": "integer",
                          "description": "Number of queued checks"
                        },
                        "requested_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/fixes": {
      "get": {
        "operationId": "listFixes",
        "tags": [
          "DNS"
        ],
        "summary": "Suggestions for findings",
        "description": "Suggestions derived from the current findings of the domain – missing DNS records (DMARC, SPF, TLS-RPT, CAA), ~all instead of a permissive SPF ending, the issuing CA for a CAA set that locks it out – with the connected integrations and the DNS provider hosting the zone according to its name servers (dns_provider); only an integration of that provider can create records.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Fix"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "integrations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "provider": {
                                "type": "string",
                                "description": "Provider key, e.g. cloudflare"
                              },
                              "provider_name": {
                                "type": "string",
                                "description": "Provider display name"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "dns_provider": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Provider all name servers of the domain point to (records can only be created through its integration); null for foreign or mixed delegation"
                        },
                        "dns_hosted_at_cloudflare": {
                          "type": "boolean",
                          "description": "Deprecated: dns_provider equals cloudflare"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/fixes/{fix}/apply": {
      "post": {
        "operationId": "applyFix",
        "tags": [
          "DNS"
        ],
        "summary": "Apply the suggestion at the DNS provider",
        "description": "Creates the suggested record through the given integration (action create). The server changes an existing record only for action update, with `replace: true` and the value shown in `current`; if the record at the provider no longer looks like that, it responds with 422. Nothing is ever deleted; if a matching record already exists or the zone is not (or no longer) hosted at the integration's provider, it also responds with 422. Every application is recorded in the audit log, the monitor is re-checked afterwards.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 20 per minute.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fix",
            "in": "path",
            "required": true,
            "description": "Suggestion key from the list of missing records",
            "schema": {
              "type": "string",
              "pattern": "^[a-z_]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Record created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "fix": {
                          "$ref": "#/components/schemas/Fix"
                        },
                        "record_id": {
                          "type": "string",
                          "description": "ID of the created record at the provider"
                        },
                        "zone": {
                          "type": "string",
                          "description": "Zone name at the provider"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "integration_id"
                ],
                "properties": {
                  "integration_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Integration of the organization (Settings → Integrations)"
                  },
                  "rua": {
                    "type": "string",
                    "description": "Report address for dmarc_missing and tls_rpt_missing (required for these suggestions)"
                  },
                  "senders": {
                    "type": "string",
                    "description": "Additional SPF mechanisms for spf_missing and spf_all, comma-separated (include:…, ip4:…, ip6:…, a, mx); empty confirms that no other services send"
                  },
                  "replace": {
                    "type": "boolean",
                    "description": "Explicit confirmation to change an existing record (required for action update)"
                  },
                  "current": {
                    "type": "string",
                    "description": "The existing value as the suggestion states it (required for action update); if the record differs, DomainWarn changes nothing"
                  }
                }
              },
              "example": {
                "integration_id": "3f9c1a52-6a2e-4c0e-9d4b-1c9a1a0e5b77",
                "rua": "dmarc-reports@agentur.de"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/hosting-dns/{feature}": {
      "get": {
        "operationId": "showHostingDns",
        "tags": [
          "DNS"
        ],
        "summary": "Records of a hosted feature at the DNS provider",
        "description": "Compares the records MTA-STS, BIMI, SPF flattening (`spf`) or the security.txt redirect need with the state at the integration's provider, without changing anything. Per record `state`: `missing` (will be created), `current`, `outdated` (created by DomainWarn, old value or duplicate – will be updated or cleaned up), `conflict` (foreign content, e.g. A records next to the CNAME or several policy records – only with `replace`), `blocked` (the credentials lack a permission) or `manual` (provider without redirect rules). `deletes` lists per record what applying would delete. Queries the provider with the integration's credentials; not available to client accounts.\n\nA read token is sufficient (`read`).\n\nOwn limit: 30 per minute.",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "feature",
            "in": "path",
            "required": true,
            "description": "Hosted feature: mta_sts (CNAME and TXT), bimi (TXT) or security_txt (redirect, only with providers offering redirect rules such as Cloudflare)",
            "schema": {
              "type": "string",
              "enum": [
                "mta_sts",
                "bimi",
                "security_txt"
              ]
            }
          },
          {
            "name": "integration_id",
            "in": "query",
            "required": true,
            "description": "Integration of the organization whose provider hosts the zone according to its name servers",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "feature": {
                          "type": "string",
                          "description": "Feature"
                        },
                        "provider": {
                          "type": "string",
                          "description": "Provider key"
                        },
                        "zone": {
                          "type": "string",
                          "description": "Zone at the provider"
                        },
                        "status": {
                          "type": "string",
                          "description": "What applying would do",
                          "enum": [
                            "up_to_date",
                            "actionable",
                            "needs_replace",
                            "blocked",
                            "manual"
                          ]
                        },
                        "records": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "description": "TXT, CNAME or REDIRECT"
                              },
                              "name": {
                                "type": "string"
                              },
                              "content": {
                                "type": "string",
                                "description": "Target content"
                              },
                              "proxied": {
                                "type": [
                                  "boolean",
                                  "null"
                                ],
                                "description": "For providers with a proxy: false = \"DNS only\""
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "missing",
                                  "current",
                                  "outdated",
                                  "conflict",
                                  "blocked",
                                  "manual"
                                ]
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "existing": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string"
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "deletes": {
                                "type": "array",
                                "description": "Existing records applying would delete",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string"
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "sync": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Automatic update (mta_sts, bimi and spf only)"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/hosting-dns/{feature}/apply": {
      "post": {
        "operationId": "applyHostingDns",
        "tags": [
          "DNS"
        ],
        "summary": "Create or update the records of a hosted feature",
        "description": "Creates missing records and updates outdated ones created by DomainWarn (new MTA-STS id, new logo URL). DomainWarn cleans up its own duplicate records (listed in `deletes` of the preview); records with foreign content – including A/AAAA next to the CNAME or several policy records – are only replaced or deleted with `replace: true`. Deleted records appear in `changes` with `action: deleted`; other records under the same name stay untouched. At Cloudflare the MTA-STS CNAME is not proxied (\"DNS only\"), the security.txt redirect is a rule of its own with the ref `domainwarn_security_txt` (permission \"Zone → Single Redirect → Edit\"). 422 if the credentials lack permissions, if a conflict is not confirmed, or if the zone is not (or no longer) hosted at the provider.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 20 per minute.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "feature",
            "in": "path",
            "required": true,
            "description": "Hosted feature: mta_sts (CNAME and TXT), bimi (TXT) or security_txt (redirect, only with providers offering redirect rules such as Cloudflare)",
            "schema": {
              "type": "string",
              "enum": [
                "mta_sts",
                "bimi",
                "security_txt"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Records written",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "feature": {
                          "type": "string"
                        },
                        "zone": {
                          "type": "string"
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "enum": [
                                  "created",
                                  "updated",
                                  "replaced",
                                  "deleted"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "integration_id"
                ],
                "properties": {
                  "integration_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Integration of the organization"
                  },
                  "replace": {
                    "type": "boolean",
                    "default": false,
                    "description": "Replace records with foreign content (state conflict)"
                  }
                }
              },
              "example": {
                "integration_id": "3f9c1a52-6a2e-4c0e-9d4b-1c9a1a0e5b77"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/hosting-dns/{feature}/sync": {
      "patch": {
        "operationId": "updateHostingDnsSync",
        "tags": [
          "DNS"
        ],
        "summary": "Keep the TXT record up to date automatically",
        "description": "`mta_sts`, `bimi` and `spf` only: with an integration, DomainWarn updates the TXT record itself whenever the policy, the logo or the resolved networks change (for SPF flattening only the parts at `_spf.<domain>`, never the domain's SPF record) (in the background, with retries; a failure creates a change event). Requires a record already created by DomainWarn; if it is missing or foreign, set it up with `apply` first. `null` switches it off.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 20 per minute.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "feature",
            "in": "path",
            "required": true,
            "description": "Hosted feature: mta_sts (CNAME and TXT), bimi (TXT) or security_txt (redirect, only with providers offering redirect rules such as Cloudflare)",
            "schema": {
              "type": "string",
              "enum": [
                "mta_sts",
                "bimi",
                "security_txt"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "integration_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "last_synced_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Last run without errors"
                        },
                        "last_error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "integration_id"
                ],
                "properties": {
                  "integration_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Integration used for writing; null switches off"
                  }
                }
              },
              "example": {
                "integration_id": "3f9c1a52-6a2e-4c0e-9d4b-1c9a1a0e5b77"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/suggestions": {
      "get": {
        "operationId": "listHostnameSuggestions",
        "tags": [
          "Monitors"
        ],
        "summary": "Hostname suggestions",
        "description": "Hostnames under the domain that appear in certificate transparency logs but are not monitored yet. Open ones by default; with `all=1` also accepted and dismissed ones, in pages of 200.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "description": "Include decided suggestions as well",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HostnameSuggestion"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "has_more": {
                          "type": "boolean",
                          "description": "Another page exists"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/suggestions/{suggestion}/accept": {
      "post": {
        "operationId": "acceptHostnameSuggestion",
        "tags": [
          "Monitors"
        ],
        "summary": "Accept a suggestion",
        "description": "Creates a website monitor for the hostname and marks the suggestion as accepted. 422 if the hostname does not belong to the domain or the limit of hostnames per domain is reached.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "suggestion",
            "in": "path",
            "required": true,
            "description": "Hostname suggestion ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/HostnameSuggestion"
                    },
                    "monitor": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/Monitor"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Created monitor; null if it already existed"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The suggestion has already been decided",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/suggestions/{suggestion}/dismiss": {
      "post": {
        "operationId": "dismissHostnameSuggestion",
        "tags": [
          "Monitors"
        ],
        "summary": "Dismiss a suggestion",
        "description": "Marks the suggestion as dismissed; the hostname is not suggested again.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "suggestion",
            "in": "path",
            "required": true,
            "description": "Hostname suggestion ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/HostnameSuggestion"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The suggestion has already been decided",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/site-insights": {
      "get": {
        "operationId": "siteInsight",
        "tags": [
          "Domains"
        ],
        "summary": "Inside view of the site",
        "description": "What an extension inside the system reports (Shopware, WordPress): exact version, PHP, installed extensions with available updates, mail setup, maintenance mode – plus the assessment. None of this is visible from the outside. `null` while nothing has been reported.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "reportSiteInsight",
        "tags": [
          "Domains"
        ],
        "summary": "Report the inside view",
        "description": "The extension reports facts only; the assessment happens in DomainWarn so that it can change without anyone updating the site. The latest report per domain is kept.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "platform"
                ],
                "properties": {
                  "platform": {
                    "type": "string",
                    "enum": [
                      "shopware",
                      "wordpress"
                    ],
                    "description": "System"
                  },
                  "platform_version": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32,
                    "description": "Version of the system"
                  },
                  "php_version": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32,
                    "description": "PHP version"
                  },
                  "maintenance": {
                    "type": "boolean",
                    "description": "Maintenance mode active"
                  },
                  "extensions": {
                    "type": "array",
                    "maxItems": 300,
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "label": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "version": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "latest_version": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "active": {
                          "type": "boolean"
                        }
                      }
                    },
                    "description": "Installed extensions; latest_version is the version the system knows as an update"
                  },
                  "mailer": {
                    "type": "object",
                    "properties": {
                      "transport": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "host": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "sender": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "description": "Mail setup of the site"
                  },
                  "channels": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "domains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "description": "Sales channels (Shopware) or sites of a network (WordPress)"
                  },
                  "agent": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32,
                    "description": "Reporting extension"
                  },
                  "agent_version": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32,
                    "description": "Version of the extension"
                  }
                }
              },
              "example": {
                "platform": "shopware",
                "platform_version": "6.7.3.1",
                "php_version": "8.3.26",
                "maintenance": false,
                "extensions": [
                  {
                    "name": "SwagPayPal",
                    "version": "9.0.0",
                    "latest_version": "9.1.0",
                    "active": true
                  }
                ],
                "mailer": {
                  "transport": "smtp",
                  "host": "smtp.hoster.de",
                  "sender": "shop@kunde.de"
                },
                "agent": "shopware",
                "agent_version": "1.2.0"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/plugin-installations": {
      "get": {
        "operationId": "listPluginInstallations",
        "tags": [
          "Domains"
        ],
        "summary": "Extensions and their reporting state",
        "description": "All installations of the WordPress plugin and the Shopware extension across the organization's domains: platform and version, extension version, last report and its state (`current` up to two hours, `late` up to a day, `stale` older) and the heartbeat the extension set up for its scheduled run. An installation reporting to two domains appears twice.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "domain": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "Domain ID"
                              },
                              "name": {
                                "type": "string",
                                "description": "Domain"
                              },
                              "unicode_name": {
                                "type": "string",
                                "description": "Domain in Unicode"
                              }
                            }
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "First hostname of the installation; `null` for older extensions"
                          },
                          "platform": {
                            "type": "string",
                            "description": "System",
                            "enum": [
                              "shopware",
                              "wordpress"
                            ]
                          },
                          "platform_version": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "System version"
                          },
                          "agent": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Reporting extension"
                          },
                          "agent_version": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Extension version"
                          },
                          "reported_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Last report"
                          },
                          "state": {
                            "type": "string",
                            "description": "Reporting state",
                            "enum": [
                              "current",
                              "late",
                              "stale"
                            ]
                          },
                          "heartbeat": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "monitor_id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "Monitor ID"
                              },
                              "is_enabled": {
                                "type": "boolean",
                                "description": "Monitor enabled"
                              },
                              "status": {
                                "type": "string",
                                "description": "Monitor status",
                                "enum": [
                                  "ok",
                                  "warning",
                                  "critical",
                                  "unknown"
                                ]
                              },
                              "last_ping_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "Last ping"
                              }
                            }
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "Installations"
                        },
                        "current": {
                          "type": "integer",
                          "description": "Current"
                        },
                        "late": {
                          "type": "integer",
                          "description": "Late"
                        },
                        "stale": {
                          "type": "integer",
                          "description": "Stale"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/mta-sts": {
      "get": {
        "operationId": "showMtaSts",
        "tags": [
          "Domains"
        ],
        "summary": "MTA-STS policy of the domain",
        "description": "Setting plus the two records the client has to create (CNAME to the website, TXT with the id). If DomainWarn serves the policy, its text is included.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateMtaSts",
        "tags": [
          "Domains"
        ],
        "summary": "Host MTA-STS with DomainWarn",
        "description": "The policy file has to live at `https://mta-sts.<domain>/.well-known/mta-sts.txt` with a valid certificate; DomainWarn serves it. Every change issues a new id – the TXT record has to follow (through an integration with a click or automatically, see `hosting-dns`). Without known MX hosts nothing is served on purpose.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "hosted"
                ],
                "properties": {
                  "hosted": {
                    "type": "boolean",
                    "description": "Let DomainWarn serve the policy"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "testing",
                      "enforce"
                    ],
                    "description": "testing only reports failures, enforce makes sending servers abort"
                  },
                  "max_age": {
                    "type": "integer",
                    "minimum": 86400,
                    "maximum": 31557600,
                    "description": "Lifetime in seconds"
                  },
                  "mx": {
                    "type": "array",
                    "maxItems": 20,
                    "items": {
                      "type": "string"
                    },
                    "description": "MX hosts for the policy; empty = the resolved MX records of the domain"
                  }
                }
              },
              "example": {
                "hosted": true,
                "mode": "enforce",
                "max_age": 604800
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/bimi": {
      "get": {
        "operationId": "showBimi",
        "tags": [
          "Domains"
        ],
        "summary": "BIMI logo of the domain",
        "description": "Whether DomainWarn serves a BIMI logo for the domain, at which URL, and the TXT record `default._bimi.<domain>` the client has to create.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "updateBimi",
        "tags": [
          "Domains"
        ],
        "summary": "Host the BIMI logo with DomainWarn",
        "description": "Uploads or replaces the logo. DomainWarn converts it to SVG Tiny PS (like `previewBimi`) and stores the result; `changes` in the response lists what was changed. A logo that already is Tiny PS stays unchanged. Anything that cannot be converted (raster images, entities, not an SVG, over 512 KB or over 32 KB after conversion) is rejected with 422 and every reason. On replacement the URL keeps its token, only the version in the file name changes.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "svg"
                ],
                "properties": {
                  "svg": {
                    "type": "string",
                    "description": "The logo as SVG text, up to 512 KB"
                  }
                }
              },
              "example": {
                "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.2\" baseProfile=\"tiny-ps\" viewBox=\"0 0 100 100\"><title>Kunde GmbH</title><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#0a7\"/></svg>"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteBimi",
        "tags": [
          "Domains"
        ],
        "summary": "Remove the BIMI logo",
        "description": "The logo URL answers with 404 from now on. A later upload gets a new URL.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/bimi/preview": {
      "post": {
        "operationId": "previewBimi",
        "tags": [
          "Domains"
        ],
        "summary": "Convert the BIMI logo (preview)",
        "description": "Converts an SVG to SVG Tiny PS without storing anything: profile, title element (client name, otherwise the domain), square viewBox, CSS as attributes, no scripts, animations, editor data or external references. The response holds the result (`svg`, `preview` as data URL, `size`) and `changes`: per change `code`, `params`, `message` in the language of the request and `severity` (`warning` if the look may change). Sending the same SVG to `updateBimi` stores exactly this result. Raster images cannot be converted: 422. At most 30 conversions per minute and organization, preview and upload combined (429).\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "svg"
                ],
                "properties": {
                  "svg": {
                    "type": "string",
                    "description": "The logo as SVG text, up to 512 KB"
                  }
                }
              },
              "example": {
                "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"200\" height=\"100\"><circle cx=\"100\" cy=\"50\" r=\"40\" fill=\"#0a7\"/></svg>"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/compliance": {
      "get": {
        "operationId": "getDomainCompliance",
        "tags": [
          "Domains"
        ],
        "summary": "Domain compliance report",
        "description": "Maps the latest check results to the requirements of BSI TR-03108 (secure email transport), BSI TR-03182 (email authentication) and NIS2 Art. 21(2): per requirement `met`, `partial`, `failed` or `unknown` with evidence and recommendation. A technical indication from the outside, not a certification. From Agency on (plan feature `reports`, otherwise 402).\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Report language (texts, date formats); without it the customer's report language, else the organization's. Accept-Language does not apply here.",
            "schema": {
              "type": "string",
              "enum": [
                "de",
                "en"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Organization, customer, sections (frameworks), totals and the requirements per domain"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/compliance/pdf": {
      "get": {
        "operationId": "getDomainCompliancePdf",
        "tags": [
          "Domains"
        ],
        "summary": "Domain compliance report as PDF",
        "description": "The same report as PDF in the style of the monthly report, with white label; `download=1` returns it as an attachment.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Report language (texts, date formats); without it the customer's report language, else the organization's. Accept-Language does not apply here.",
            "schema": {
              "type": "string",
              "enum": [
                "de",
                "en"
              ]
            }
          },
          {
            "name": "download",
            "in": "query",
            "required": false,
            "description": "As download (Content-Disposition attachment)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/email-audits": {
      "get": {
        "operationId": "listEmailAudits",
        "tags": [
          "Domains"
        ],
        "summary": "Email security check reports of the domain",
        "description": "The last 30 check reports of the domain, newest first: report number, check date, `met` of `total` counted criteria, `passed`, source (`manual` on request, `daily` for the seal), the 15 criteria from BSI TR-03108 and TR-03182 with requirement and result, and the public verification address (`verify_url`). Reports never change. `meta.available` tells whether the organization may create new ones. An automated external check, not a certification.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createEmailAudit",
        "tags": [
          "Domains"
        ],
        "summary": "Create an email security check report",
        "description": "Records the current state of the email checks as a new report with its own report number. All MUST criteria that apply to the domain are counted; “partial” and “not checkable” count as not met. All paid plans (plan feature `seal`, otherwise 402).\n\nRequires a token with write scope (`write`).\n\nOwn limit: 20 per organization and hour.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/email-audits/{number}/pdf": {
      "get": {
        "operationId": "getEmailAuditPdf",
        "tags": [
          "Domains"
        ],
        "summary": "Email security check report as PDF",
        "description": "The report with result line, criteria and a QR code to the verification page; `download=1` returns it as an attachment.\n\nA read token is sufficient (`read`).\n\nOwn limit: 10 per minute and organization.",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "description": "Report number of the check report (upper or lower case)",
            "schema": {
              "type": "string",
              "example": "DW-20261109-7K3Q-X9MP-4R2T"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Report language (texts, date formats); without it the customer's report language, else the organization's. Accept-Language does not apply here.",
            "schema": {
              "type": "string",
              "enum": [
                "de",
                "en"
              ]
            }
          },
          {
            "name": "download",
            "in": "query",
            "required": false,
            "description": "As download (Content-Disposition attachment)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/email-seal": {
      "get": {
        "operationId": "showDomainEmailSeal",
        "tags": [
          "Domains"
        ],
        "summary": "Domain “Email security checked” seal",
        "description": "Dedicated seal of the domain for the end customer’s website: on/off, whether it is currently valid (`valid`: latest check report at most 48 hours old with all counted criteria met), holder name (default: the domain’s customer), contents, token and addresses per language (`urls`) and the latest check report. Also for customer logins on their own domains.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "put": {
        "operationId": "updateDomainEmailSeal",
        "tags": [
          "Domains"
        ],
        "summary": "Configure the domain seal",
        "description": "Turns the seal on or off and sets the holder name (`name`, empty = the domain’s customer), `show_name`, `show_date` and `show_result`. Turning it on requires the plan feature `seal` (otherwise 402); without a recent check report one is created right away.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "enabled"
                ],
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Seal on or off"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 80,
                    "description": "Own holder name; empty = the domain’s customer"
                  },
                  "show_name": {
                    "type": "boolean",
                    "description": "Show the holder name in the image"
                  },
                  "show_date": {
                    "type": "boolean",
                    "description": "Show the check date"
                  },
                  "show_result": {
                    "type": "boolean",
                    "description": "Show the criteria result"
                  }
                }
              },
              "example": {
                "enabled": true,
                "name": null,
                "show_result": true
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/email-seal/token": {
      "post": {
        "operationId": "rotateDomainEmailSeal",
        "tags": [
          "Domains"
        ],
        "summary": "New address for the domain seal",
        "description": "Creates a new token; image and confirmation page under the old address show “no longer valid” from now on.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/email-seal/preview": {
      "get": {
        "operationId": "previewDomainEmailSeal",
        "tags": [
          "Domains"
        ],
        "summary": "Preview of the domain seal",
        "description": "The image with the saved settings and the latest check report as SVG inside JSON (`svg`, `width`, `height`), even while the seal is off.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "description": "Size (default banner)",
            "schema": {
              "type": "string",
              "enum": [
                "small",
                "banner",
                "leaderboard",
                "square"
              ]
            }
          },
          {
            "name": "theme",
            "in": "query",
            "required": false,
            "description": "Colour scheme (default light)",
            "schema": {
              "type": "string",
              "enum": [
                "light",
                "dark"
              ]
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language (default: language of the organization)",
            "schema": {
              "type": "string",
              "enum": [
                "de",
                "en"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/pagespeed": {
      "get": {
        "operationId": "showPageSpeedHistory",
        "tags": [
          "Domains"
        ],
        "summary": "PageSpeed history",
        "description": "Score (0–100) and key metrics per weekly measurement for mobile and desktop (`points`, both strategies of one run share the timestamp `t`), plus the latest and the previous measurement per strategy (`latest`, `previous`) for the trend. Metrics: lab `lcp_ms`, `fcp_ms`, `tbt_ms`, `cls`, `speed_index_ms`, and `field` with real-user `overall`, `lcp_ms`, `inp_ms` and `cls` (Chrome UX Report) or null. The strategy `monitor.rated_strategy` (default mobile) is the one rated. Without a PageSpeed monitor `monitor` is null and the history is empty.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "months",
            "in": "query",
            "required": false,
            "description": "Period in months (default 12; the history is kept for 13 months)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 13
            }
          },
          {
            "name": "monitor",
            "in": "query",
            "required": false,
            "description": "A specific PageSpeed monitor of the domain (default: the first enabled one)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/heartbeats/reliability": {
      "get": {
        "operationId": "showHeartbeatReliability",
        "tags": [
          "Domains"
        ],
        "summary": "Heartbeat reliability",
        "description": "Per heartbeat of the domain the share of runs on time (`percent`, null without runs in the period), the totals `on_time`, `late`, `failed`, `missed` and `total`, and the same counters per day (`days`, UTC, oldest to today). Missed runs count on the day they were due; while the next ping is outstanding, the runs missed so far are already included.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Period in days (default 30; the counters are kept for 90 days)",
            "schema": {
              "type": "integer",
              "minimum": 7,
              "maximum": 90
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/security-txt": {
      "get": {
        "operationId": "showSecurityTxt",
        "tags": [
          "Domains"
        ],
        "summary": "security.txt of the domain",
        "description": "Whether DomainWarn serves a security.txt (RFC 9116) for the domain, the stored details, the generated file (`content`) and the URL (`url`) the client redirects `/.well-known/security.txt` to.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateSecurityTxt",
        "tags": [
          "Domains"
        ],
        "summary": "Host the security.txt with DomainWarn",
        "description": "Stores the details and switches serving on or off. Only fields sent change, `null` clears an optional field. DomainWarn generates Canonical (the URL on the client domain) and Expires (start of day plus 180 days, fresh on every request). Values with line breaks or control characters are rejected with 422. The URL keeps its token across all changes, including switching off and on.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "enabled"
                ],
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Serve the file"
                  },
                  "contacts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "1 to 10 contacts: `mailto:`, `tel:` (without spaces) or `https://`; required on the first save"
                  },
                  "encryption": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "HTTPS URL of the OpenPGP key"
                  },
                  "policy": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "HTTPS URL of the disclosure policy"
                  },
                  "acknowledgments": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "HTTPS URL of the acknowledgments page"
                  },
                  "hiring": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "HTTPS URL of security job openings"
                  },
                  "preferred_languages": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    },
                    "description": "Language tags (RFC 5646), at most 10"
                  }
                }
              },
              "example": {
                "enabled": true,
                "contacts": [
                  "mailto:security@kunde.de",
                  "https://kunde.de/sicherheit"
                ],
                "policy": "https://kunde.de/disclosure",
                "preferred_languages": [
                  "de",
                  "en"
                ]
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/hosted-spf": {
      "get": {
        "operationId": "showHostedSpf",
        "tags": [
          "Domains"
        ],
        "summary": "SPF flattening of the domain",
        "description": "Status of hosted SPF flattening: the source (`source_record`), the resolved networks (`networks`), the TXT records at `_spf.<domain>` (split into `_spf1`, `_spf2` … for long results, `records`), the SPF record the client sets at the domain (`pointer`), DNS lookups before and after, notices, the error of the last resolution and the history of changes. `published` and `pointer_active` come fresh from the DNS. Switched off (`enabled: false`) a preview from the domain's SPF record; `error` then says why it cannot be flattened (macros, `exists`, `ptr`, loops, limits). Not for client accounts.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "put": {
        "operationId": "updateHostedSpf",
        "tags": [
          "Domains"
        ],
        "summary": "Switch on SPF flattening",
        "description": "Switches flattening on or changes the source. Without `source` DomainWarn takes the domain's SPF record (if it already includes `_spf.<domain>`, the previous source). If it cannot be flattened: 422 with the explanation. `applyHostingDns` with the feature `spf` creates the records at the DNS provider: the parts first, the pointer at the domain last – DomainWarn only replaces the client's SPF record with `replace: true`. From Freelancer on (plan feature `hosted_spf`, otherwise 402).\n\nRequires a token with write scope (`write`).\n\nOwn limit: 20 per minute.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2048,
                    "description": "SPF record DomainWarn flattens (starts with v=spf1); without it the domain's record"
                  }
                }
              },
              "example": {
                "source": "v=spf1 include:_spf.google.com include:spf.protection.outlook.com include:servers.mcsv.net -all"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteHostedSpf",
        "tags": [
          "Domains"
        ],
        "summary": "Switch off SPF flattening",
        "description": "DomainWarn stops updating the records. As long as the domain's SPF record still includes `_spf.<domain>`: 422 – put the original record back first, otherwise the networks would stay frozen. The records at `_spf.<domain>` stay in place.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Switched off"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/hosted-spf/sync": {
      "post": {
        "operationId": "syncHostedSpf",
        "tags": [
          "Domains"
        ],
        "summary": "Resolve SPF flattening now",
        "description": "Resolves immediately (otherwise daily and after every SPF check). `meta.result`: `changed` (new networks – with automatic updates DomainWarn rewrites the records, otherwise there is the warning \"Flattened SPF record outdated\"), `unchanged` or `failed` (reason in `data.error`, the published networks stay). 422 if flattening is off.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 6 per 10 minutes and domain.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "string",
                          "enum": [
                            "changed",
                            "unchanged",
                            "failed"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/hosting": {
      "get": {
        "operationId": "showHostingOverview",
        "tags": [
          "Domains"
        ],
        "summary": "Hosted features at a glance",
        "description": "Status of security.txt, MTA-STS and BIMI in one response, meant for extensions on the website (WordPress, Shopware): per feature `enabled`, `state` (as in the dashboard: `off`, `pending`, `active`, `missing`, `outdated`, `elsewhere`, `unreachable`, `noMx`), the dashboard page (`dashboard_url`), for security.txt the redirect target (`url`, only while it is served) and the host names that should redirect (`hosts`), for MTA-STS and BIMI the records to copy (`records`). Not for client accounts.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/mail-reports": {
      "get": {
        "operationId": "listMailReports",
        "tags": [
          "Domains"
        ],
        "summary": "DMARC and TLS-RPT reports",
        "description": "Figures from the received reports: messages, aligned, sources per IP with DKIM and SPF result, TLS sessions and failures. The report address of the domain is part of the response.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Period in days (1 to 90, default 30)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "uploadMailReport",
        "tags": [
          "Domains"
        ],
        "summary": "Upload a report",
        "description": "For domains without a mailbox: a DMARC aggregate report (XML, gzip, ZIP or the whole mail) or a TLS-RPT report (JSON). Duplicates are detected.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "content": {
                    "type": "string",
                    "description": "Report as text (XML, JSON or mail)"
                  },
                  "content_base64": {
                    "type": "string",
                    "description": "Report as base64 (gzip, ZIP)"
                  },
                  "filename": {
                    "type": "string",
                    "maxLength": 190,
                    "description": "File name, helps with classification"
                  }
                }
              },
              "example": {
                "content": "<?xml version=\"1.0\"?><feedback>…</feedback>",
                "filename": "google.com!kunde.de!1!2.xml"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/mail-tests": {
      "get": {
        "operationId": "listMailTests",
        "tags": [
          "Domains"
        ],
        "summary": "Mail tests of the domain",
        "description": "The last 20 mail tests of the domain (kept for 30 days), newest first: one-time address, status (`waiting`, `received`, `expired`, `failed`), score 0–100 and the analysis in `result` (SPF, DKIM per signature, DMARC with alignment, TLS, reverse DNS, blacklist, translated findings). `meta.available` tells whether the test is set up on this instance.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "startMailTest",
        "tags": [
          "Domains"
        ],
        "summary": "Start a mail test",
        "description": "Creates a one-time address, valid for one hour. A mail sent to it is analysed as soon as it arrives; fetch the test for its status. Responds with 503 if no report mailbox is set up on this instance.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 30 per organization and hour.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/mail-tests/{mailTest}": {
      "get": {
        "operationId": "showMailTest",
        "tags": [
          "Domains"
        ],
        "summary": "Get a mail test",
        "description": "Status and analysis of a test. While it is waiting, the request checks the mailbox for it (at most every five seconds per test).\n\nA read token is sufficient (`read`).\n\nOwn limit: 30 per minute.",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/dmarc-assistant": {
      "get": {
        "operationId": "showDmarcAssistant",
        "tags": [
          "Domains"
        ],
        "summary": "DMARC assistant",
        "description": "Analyses the DMARC reports in the window (messages, rate of legitimate messages, sources per IP classified as `aligned`, `partial`, `unaligned` or `unauthenticated`, days with data) and recommends the next step from `p=none` via `quarantine` to `reject` (with a pct ramp 25/50/100 if the record uses pct; a weaker `sp` moves along). `recommendation.status`: `not_checked`, `no_record`, `invalid_record`, `no_reports`, `collecting`, `blocked`, `ready` or `done`; `checks` lists every requirement (days with reports since the current policy, minimum number of messages, 98 % passing, no significant legitimate-looking sender failing). `proposed` is the record after the step, all other tags stay. `meta` with integrations only for the agency team.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Window in days (default 30)",
            "schema": {
              "type": "integer",
              "minimum": 14,
              "maximum": 90
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "report_address": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Report address of the domain at DomainWarn"
                        },
                        "rua_has_address": {
                          "type": "boolean",
                          "description": "The report address is already in rua"
                        },
                        "analysis": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "recommendation": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "description": "State of the recommendation",
                              "enum": [
                                "not_checked",
                                "no_record",
                                "invalid_record",
                                "no_reports",
                                "collecting",
                                "blocked",
                                "ready",
                                "done"
                              ]
                            },
                            "step": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "enforce",
                                "pct",
                                "reject",
                                "subdomains",
                                null
                              ]
                            },
                            "proposed": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Record after the step"
                            },
                            "checks": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "key": {
                                    "type": "string"
                                  },
                                  "ok": {
                                    "type": "boolean"
                                  },
                                  "value": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "required": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "rua_proposal": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Record with the report address as an additional rua target"
                        }
                      }
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/dmarc-assistant/preview": {
      "get": {
        "operationId": "previewDmarcAssistant",
        "tags": [
          "DNS"
        ],
        "summary": "Preview a DMARC step at the DNS provider",
        "description": "Reads the DMARC record at the integration's provider and shows what applying would turn it into (`current`, `proposed`, `changes`), without changing anything. `status` `ready` or `blocked` with `reason`: `missing`, `multiple`, `changed` (differs from the last check), `not_ready`, `unauthorized`, `no_address` or `up_to_date`. Not available to client accounts.\n\nA read token is sufficient (`read`).\n\nOwn limit: 30 per minute.",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "integration_id",
            "in": "query",
            "required": true,
            "description": "Integration of the organization whose provider hosts the zone",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "description": "advance: next policy step; add_rua: report address as an additional rua target",
            "schema": {
              "type": "string",
              "enum": [
                "advance",
                "add_rua"
              ]
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Window of the recommendation (default 30)",
            "schema": {
              "type": "integer",
              "minimum": 14,
              "maximum": 90
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "What applying would do",
                          "enum": [
                            "ready",
                            "blocked"
                          ]
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "description": "Record name"
                        },
                        "current": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "proposed": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "from": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "to": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/dmarc-assistant/apply": {
      "post": {
        "operationId": "applyDmarcAssistant",
        "tags": [
          "DNS"
        ],
        "summary": "Apply a DMARC step at the DNS provider",
        "description": "Changes exactly the one existing DMARC record the way the preview shows. Requires `confirm: true` and `expected` (the content from the preview's `current`): if the provider holds something else by now, if there is no or more than one DMARC record, or if the step is not recommended, the server responds with 422. Only `p`, `pct` and `sp` (or `rua`) change; DomainWarn never creates or deletes records.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 20 per minute.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Record changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string"
                        },
                        "zone": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "previous": {
                          "type": "string",
                          "description": "Record before"
                        },
                        "content": {
                          "type": "string",
                          "description": "Record now"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "integration_id",
                  "action",
                  "expected",
                  "confirm"
                ],
                "properties": {
                  "integration_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Integration of the organization"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "advance",
                      "add_rua"
                    ],
                    "description": "As in the preview"
                  },
                  "expected": {
                    "type": "string",
                    "description": "The DMARC record as the preview read it"
                  },
                  "confirm": {
                    "type": "boolean",
                    "description": "Explicit confirmation"
                  },
                  "days": {
                    "type": "integer",
                    "minimum": 14,
                    "maximum": 90,
                    "description": "Window of the recommendation (default 30)"
                  }
                }
              },
              "example": {
                "integration_id": "3f9c1a52-6a2e-4c0e-9d4b-1c9a1a0e5b77",
                "action": "advance",
                "expected": "v=DMARC1; p=none; rua=mailto:dmarc@kunde.de",
                "confirm": true
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/mail-reports/connect/preview": {
      "get": {
        "operationId": "previewMailReportsConnect",
        "tags": [
          "DNS"
        ],
        "summary": "Preview the report address at the DNS provider",
        "description": "Reads the DMARC record (`_dmarc`) and the TLS-RPT record (`_smtp._tls`) at the integration's provider and shows per record what applying would turn it into (`current`, `proposed`, `changes`, `operation` `update` or `create`), without changing anything. `mode` `add` adds the report address, `replace` makes it the only rua target. `status` `ready` or `blocked` with `reason`: `missing` (no DMARC record), `multiple`, `invalid`, `unauthorized` (the report domain does not accept reports for other domains), `no_address` or `up_to_date`. Not available to client accounts.\n\nA read token is sufficient (`read`).\n\nOwn limit: 30 per minute.",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "integration_id",
            "in": "query",
            "required": true,
            "description": "Integration of the organization whose provider hosts the zone",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mode",
            "in": "query",
            "required": true,
            "description": "add: in addition to existing targets; replace: the only rua target",
            "schema": {
              "type": "string",
              "enum": [
                "add",
                "replace"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string"
                        },
                        "address": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "records": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "dmarc or tls_rpt",
                                "enum": [
                                  "dmarc",
                                  "tls_rpt"
                                ]
                              },
                              "name": {
                                "type": "string",
                                "description": "Record name"
                              },
                              "status": {
                                "type": "string",
                                "description": "What applying would do",
                                "enum": [
                                  "ready",
                                  "blocked"
                                ]
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "operation": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "enum": [
                                  "update",
                                  "create",
                                  null
                                ]
                              },
                              "current": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "proposed": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/mail-reports/connect": {
      "post": {
        "operationId": "applyMailReportsConnect",
        "tags": [
          "DNS"
        ],
        "summary": "Add the report address at the DNS provider",
        "description": "Writes every record the preview shows as `ready`: the existing DMARC record (only `rua` changes) and the TLS-RPT record (created if missing). Requires `confirm: true` and `expected` with the content from the preview's `current` per record (`null` if there was none): if the provider holds something else by now or there is nothing to do, the server responds with 422. DomainWarn never deletes records.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 20 per minute.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Records written",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "zone": {
                          "type": "string"
                        },
                        "mode": {
                          "type": "string"
                        },
                        "records": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "operation": {
                                "type": "string"
                              },
                              "previous": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "content": {
                                "type": "string",
                                "description": "Record now"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "integration_id",
                  "mode",
                  "expected",
                  "confirm"
                ],
                "properties": {
                  "integration_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Integration of the organization"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "add",
                      "replace"
                    ],
                    "description": "As in the preview"
                  },
                  "expected": {
                    "type": "object",
                    "properties": {
                      "dmarc": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "tls_rpt": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "description": "The records as the preview read them"
                  },
                  "confirm": {
                    "type": "boolean",
                    "description": "Explicit confirmation"
                  }
                }
              },
              "example": {
                "integration_id": "3f9c1a52-6a2e-4c0e-9d4b-1c9a1a0e5b77",
                "mode": "add",
                "expected": {
                  "dmarc": "v=DMARC1; p=quarantine; rua=mailto:dmarc@kunde.de",
                  "tls_rpt": null
                },
                "confirm": true
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/monitors": {
      "get": {
        "operationId": "listMonitors",
        "tags": [
          "Monitors"
        ],
        "summary": "Monitors of a domain",
        "description": "All monitors of the domain with status, latest findings and raw data, sorted by check type and target.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Monitor"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createMonitor",
        "tags": [
          "Monitors"
        ],
        "summary": "Create a monitor",
        "description": "Additional monitor, e.g. another URL or a mail server certificate. Targets must belong to the domain; only for `tls` any public hostname is allowed. The interval is capped at the minimum of the plan.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Monitor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "target"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "http",
                      "tls",
                      "dns",
                      "mx",
                      "spf",
                      "dmarc",
                      "domain",
                      "dkim",
                      "dnssec",
                      "mta_sts",
                      "blacklist",
                      "tls_rpt",
                      "bimi",
                      "smtp",
                      "reverse_dns",
                      "ct_log",
                      "redirects",
                      "caa",
                      "nameservers",
                      "ipv6",
                      "dane",
                      "cms",
                      "privacy",
                      "pagespeed",
                      "heartbeat",
                      "security_txt",
                      "ports",
                      "lookalike",
                      "crawl",
                      "journey"
                    ],
                    "description": "Check type"
                  },
                  "target": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "URL (http) or hostname; https:// is added when the scheme is missing"
                  },
                  "interval_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 604800,
                    "description": "Check interval in seconds"
                  },
                  "config": {
                    "type": "object",
                    "properties": {
                      "port": {
                        "type": "integer",
                        "enum": [
                          443,
                          8443,
                          465,
                          587,
                          25,
                          993,
                          143,
                          995,
                          110
                        ]
                      },
                      "starttls": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "smtp",
                          "imap",
                          "pop3",
                          null
                        ]
                      }
                    },
                    "description": "tls only: port and STARTTLS protocol"
                  }
                }
              },
              "example": {
                "type": "tls",
                "target": "mail.kunde.de",
                "config": {
                  "port": 587,
                  "starttls": "smtp"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/monitors/{monitor}": {
      "patch": {
        "operationId": "updateMonitor",
        "tags": [
          "Monitors"
        ],
        "summary": "Update a monitor",
        "description": "Interval, activation and configuration per check type: `expected_status` and `slow_ms` (http), `selectors` (dkim). A disabled monitor closes its open incidents.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "monitor",
            "in": "path",
            "required": true,
            "description": "Monitor ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Monitor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "interval_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 604800,
                    "description": "Check interval in seconds"
                  },
                  "is_enabled": {
                    "type": "boolean",
                    "description": "Enabled"
                  },
                  "config": {
                    "type": "object",
                    "properties": {
                      "expected_status": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 100,
                          "maximum": 599
                        }
                      },
                      "slow_ms": {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 60000
                      },
                      "selectors": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 63
                        },
                        "maxItems": 20
                      }
                    },
                    "description": "Expected HTTP status codes, threshold for \"slow\" in ms (http) or DKIM selectors (dkim)"
                  }
                }
              },
              "example": {
                "config": {
                  "expected_status": [
                    200,
                    301
                  ],
                  "slow_ms": 2000
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMonitor",
        "tags": [
          "Monitors"
        ],
        "summary": "Delete a monitor",
        "description": "Removes the monitor and closes its open incidents.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "monitor",
            "in": "path",
            "required": true,
            "description": "Monitor ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, no content"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/journeys": {
      "get": {
        "operationId": "listJourneys",
        "tags": [
          "Monitors"
        ],
        "summary": "Journeys of a domain",
        "description": "Journeys (transaction checks) of the domain: a real browser loads the start address and performs the steps (add product to cart, go to checkout, log in). Every 15 minutes; a failure is confirmed by a second run before the incident `journey_failed` opens. From the Agency plan (one per domain, Agency Pro three).\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Journey"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createJourney",
        "tags": [
          "Monitors"
        ],
        "summary": "Create a journey",
        "description": "Name, start address (must belong to the domain) and steps. Values of fill steps are stored encrypted and never returned. Without the plan feature `journeys` the API answers 402, above the per-domain limit 422.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Journey"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "start_url",
                  "steps"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Name, unique per domain"
                  },
                  "start_url": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Start address; https:// is added when the scheme is missing"
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/JourneyStep"
                    },
                    "minItems": 1,
                    "maxItems": 30,
                    "description": "Steps in order (1 to 30)"
                  },
                  "slow_ms": {
                    "type": "integer",
                    "minimum": 1000,
                    "maximum": 90000,
                    "description": "Threshold for \"slow\" in ms (default 20000)"
                  },
                  "interval_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 604800,
                    "description": "Check interval in seconds (capped by the plan)"
                  }
                }
              },
              "example": {
                "name": "Warenkorb bis Kasse",
                "start_url": "https://shop.kunde.de/",
                "steps": [
                  {
                    "type": "click",
                    "selector": ".product-box a.product-name"
                  },
                  {
                    "type": "click",
                    "selector": ".btn-buy"
                  },
                  {
                    "type": "expect_text",
                    "text": "Warenkorb"
                  },
                  {
                    "type": "goto",
                    "url": "/checkout/cart"
                  },
                  {
                    "type": "expect_url",
                    "contains": "/checkout"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/journeys/test": {
      "post": {
        "operationId": "testJourney",
        "tags": [
          "Monitors"
        ],
        "summary": "Test a journey",
        "description": "Runs start address and steps in the browser right away without saving anything (budget 60 s) and returns the outcome per step; with `journey`, a fill step with `keep_value` uses the stored value of that journey. At most 20 test runs per domain and 60 per organization per hour (429).\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "ok, blocked, unavailable, reason, duration_ms, final_url, steps, failed_step"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "start_url",
                  "steps"
                ],
                "properties": {
                  "start_url": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Start address"
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/JourneyStep"
                    },
                    "minItems": 1,
                    "maxItems": 30,
                    "description": "Steps"
                  },
                  "journey": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Stored journey whose fill values apply for keep_value"
                  },
                  "slow_ms": {
                    "type": "integer",
                    "minimum": 1000,
                    "maximum": 90000,
                    "description": "Threshold for \"slow\" in ms"
                  }
                }
              },
              "example": {
                "start_url": "https://shop.kunde.de/",
                "steps": [
                  {
                    "type": "click",
                    "text": "In den Warenkorb"
                  },
                  {
                    "type": "expect_text",
                    "text": "Warenkorb"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/journeys/{journey}": {
      "get": {
        "operationId": "showJourney",
        "tags": [
          "Monitors"
        ],
        "summary": "Get a journey",
        "description": "One journey with its steps (without fill values), the last result per step and the recent runs.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "journey",
            "in": "path",
            "required": true,
            "description": "Journey ID (also the ID of its monitor of type journey)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Journey"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateJourney",
        "tags": [
          "Monitors"
        ],
        "summary": "Update a journey",
        "description": "Name, start address, steps, threshold, interval and activation. New steps reset the failure streak; a fill step with `keep_value` keeps the stored value (same index and selector). A disabled journey closes its open incidents.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "journey",
            "in": "path",
            "required": true,
            "description": "Journey ID (also the ID of its monitor of type journey)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Journey"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Name"
                  },
                  "start_url": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Start address"
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/JourneyStep"
                    },
                    "minItems": 1,
                    "maxItems": 30,
                    "description": "Steps"
                  },
                  "slow_ms": {
                    "type": "integer",
                    "minimum": 1000,
                    "maximum": 90000,
                    "description": "Threshold for \"slow\" in ms"
                  },
                  "interval_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 604800,
                    "description": "Check interval in seconds"
                  },
                  "is_enabled": {
                    "type": "boolean",
                    "description": "Enabled"
                  }
                }
              },
              "example": {
                "is_enabled": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteJourney",
        "tags": [
          "Monitors"
        ],
        "summary": "Delete a journey",
        "description": "Removes the journey and closes its open incidents.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "journey",
            "in": "path",
            "required": true,
            "description": "Journey ID (also the ID of its monitor of type journey)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, no content"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/visual-monitors": {
      "get": {
        "operationId": "listVisualMonitors",
        "tags": [
          "Monitors"
        ],
        "summary": "Screenshot monitors of a domain",
        "description": "Visual monitoring (defacement protection): a real browser captures the page every hour and compares it pixel by pixel with the reference screenshot. Differences above the threshold (`visual_changed`), typical defacement phrases (`visual_defaced`) and replaced content (`visual_content_replaced`) are confirmed by a second run before the incident opens. From the Agency plan (three per domain, Agency Pro ten).\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VisualMonitor"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createVisualMonitor",
        "tags": [
          "Monitors"
        ],
        "summary": "Create a screenshot monitor",
        "description": "Address (must belong to the domain), viewports, threshold and excluded areas. The first run starts right away and saves the reference screenshots. Without the plan feature `visual` the API answers 402, above the per-domain limit 422.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VisualMonitor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Address of the page; https:// is added when the scheme is missing"
                  },
                  "viewports": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "desktop",
                        "mobile"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 2,
                    "description": "Viewports (default desktop)"
                  },
                  "threshold_percent": {
                    "type": "number",
                    "minimum": 0.1,
                    "maximum": 50,
                    "description": "Threshold in percent of the area (default 2)"
                  },
                  "ignore_selectors": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "maxItems": 20,
                    "description": "CSS selectors of changing areas (sliders, dates, ads)"
                  },
                  "hide_cookie_banners": {
                    "type": "boolean",
                    "description": "Accept cookie banners before capturing and paint over any remaining ones (default on)"
                  },
                  "interval_seconds": {
                    "type": "integer",
                    "minimum": 3600,
                    "maximum": 604800,
                    "description": "Check interval in seconds"
                  }
                }
              },
              "example": {
                "url": "https://kunde.de/",
                "viewports": [
                  "desktop",
                  "mobile"
                ],
                "threshold_percent": 2,
                "ignore_selectors": [
                  ".hero-slider",
                  "#datum"
                ]
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/visual-monitors/{visualMonitor}": {
      "get": {
        "operationId": "showVisualMonitor",
        "tags": [
          "Monitors"
        ],
        "summary": "Get a screenshot monitor",
        "description": "One screenshot monitor with the reference per viewport and the recent differences; images as signed addresses valid for two hours.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VisualMonitor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateVisualMonitor",
        "tags": [
          "Monitors"
        ],
        "summary": "Update a screenshot monitor",
        "description": "Address, viewports, threshold, excluded areas, interval and activation. A new address, excluded areas or cookie banner setting discard the previous images; the next run saves new references.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VisualMonitor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Address"
                  },
                  "viewports": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "desktop",
                        "mobile"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 2,
                    "description": "Viewports"
                  },
                  "threshold_percent": {
                    "type": "number",
                    "minimum": 0.1,
                    "maximum": 50,
                    "description": "Threshold in percent"
                  },
                  "ignore_selectors": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "maxItems": 20,
                    "description": "Excluded areas"
                  },
                  "hide_cookie_banners": {
                    "type": "boolean",
                    "description": "Accept cookie banners and paint over any remaining ones"
                  },
                  "interval_seconds": {
                    "type": "integer",
                    "minimum": 3600,
                    "maximum": 604800,
                    "description": "Check interval in seconds"
                  },
                  "is_enabled": {
                    "type": "boolean",
                    "description": "Enabled"
                  }
                }
              },
              "example": {
                "threshold_percent": 5
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteVisualMonitor",
        "tags": [
          "Monitors"
        ],
        "summary": "Delete a screenshot monitor",
        "description": "Removes the screenshot monitor including all images and closes its open incidents.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, no content"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/visual-monitors/{visualMonitor}/accept": {
      "post": {
        "operationId": "acceptVisualMonitor",
        "tags": [
          "Monitors"
        ],
        "summary": "Accept a difference as reference",
        "description": "Turns the most recent open difference per viewport (or the one given by `snapshot_id`) into the new reference screenshot and checks again right away; if the page matches the new reference, the incident closes. Without an open difference 422.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VisualMonitor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "snapshot_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Specific difference (id from changes)"
                  }
                }
              },
              "example": {}
            }
          }
        }
      }
    },
    "/orgs/{organization}/maintenance-windows": {
      "get": {
        "operationId": "listMaintenanceWindows",
        "tags": [
          "Monitors"
        ],
        "summary": "List maintenance windows",
        "description": "All maintenance windows of the organization, enabled first; with `domain` only those affecting that domain (its own, its customer's and organization-wide ones).\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "description": "Only windows affecting this domain",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MaintenanceWindow"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createMaintenanceWindow",
        "tags": [
          "Monitors"
        ],
        "summary": "Create a maintenance window",
        "description": "One-off (`starts_at`, `ends_at`) or weekly (`weekdays`, `time_from`, `time_to` in `timezone`). With `domain_id` it applies to one domain, with `customer_id` to all domains of the customer, with neither to the whole organization. No incidents or notifications are raised while it is active.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MaintenanceWindow"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "kind"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Name"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "once",
                      "weekly"
                    ],
                    "description": "One-off or weekly"
                  },
                  "customer_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Customer whose domains are affected"
                  },
                  "domain_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Single domain (resets `customer_id`)"
                  },
                  "starts_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Start, one-off (required for `once`)"
                  },
                  "ends_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "End, one-off, after the start (required for `once`)"
                  },
                  "weekdays": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 7
                    },
                    "maxItems": 7,
                    "description": "Weekdays 1 (Monday) to 7 (Sunday) (required for `weekly`)"
                  },
                  "time_from": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\d{2}:\\d{2}$",
                    "description": "Start HH:MM (required for `weekly`)"
                  },
                  "time_to": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\d{2}:\\d{2}$",
                    "description": "End HH:MM, different from the start; before the start the window spans midnight (required for `weekly`)"
                  },
                  "timezone": {
                    "type": "string",
                    "default": "Europe/Berlin",
                    "description": "Time zone for weekdays and times"
                  },
                  "is_enabled": {
                    "type": "boolean",
                    "default": true,
                    "description": "Enabled"
                  }
                }
              },
              "example": {
                "name": "Nächtliches Deploy",
                "kind": "weekly",
                "customer_id": "3f9c1a52-6a2e-4c0e-9d4b-1c9a1a0e5b77",
                "weekdays": [
                  2,
                  4
                ],
                "time_from": "02:00",
                "time_to": "03:00",
                "timezone": "Europe/Berlin"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/maintenance-windows/{window}": {
      "patch": {
        "operationId": "updateMaintenanceWindow",
        "tags": [
          "Monitors"
        ],
        "summary": "Update a maintenance window",
        "description": "Same fields as on create, all optional; only fields that are sent change. The rules per kind apply to the state after the change.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "window",
            "in": "path",
            "required": true,
            "description": "Maintenance window ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MaintenanceWindow"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Name"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "once",
                      "weekly"
                    ],
                    "description": "One-off or weekly"
                  },
                  "customer_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Customer or null"
                  },
                  "domain_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Domain or null"
                  },
                  "starts_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Start, one-off"
                  },
                  "ends_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "End, one-off"
                  },
                  "weekdays": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 7
                    },
                    "maxItems": 7,
                    "description": "Weekdays 1 to 7"
                  },
                  "time_from": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\d{2}:\\d{2}$",
                    "description": "Start HH:MM"
                  },
                  "time_to": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\d{2}:\\d{2}$",
                    "description": "End HH:MM"
                  },
                  "timezone": {
                    "type": "string",
                    "description": "Time zone"
                  },
                  "is_enabled": {
                    "type": "boolean",
                    "description": "Enabled"
                  }
                }
              },
              "example": {
                "is_enabled": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMaintenanceWindow",
        "tags": [
          "Monitors"
        ],
        "summary": "Delete a maintenance window",
        "description": "Requires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "window",
            "in": "path",
            "required": true,
            "description": "Maintenance window ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, no content"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/monitors/{monitor}/results": {
      "get": {
        "operationId": "listCheckResults",
        "tags": [
          "Monitors"
        ],
        "summary": "Check results",
        "description": "Single checks of a monitor, newest first, cursor-paginated. The cursor of the next page is in `links.next`.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "monitor",
            "in": "path",
            "required": true,
            "description": "Monitor ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Only checks from this time on",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Only checks up to this time; not before `from` and at most 366 days after it",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page (1 to 500)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Cursor of the next page, taken from `meta.next_cursor` of the previous response",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CheckResult"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "next": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Cursor of the next page"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/monitors/{monitor}/uptime": {
      "get": {
        "operationId": "getUptime",
        "tags": [
          "Monitors"
        ],
        "summary": "Availability and response time",
        "description": "Availability, response times (median, 95th percentile) and downtime per range, plus data points for charts.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "monitor",
            "in": "path",
            "required": true,
            "description": "Monitor ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "description": "Range",
            "schema": {
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "90d"
              ],
              "default": "24h"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Uptime"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/metrics": {
      "get": {
        "operationId": "getMetrics",
        "tags": [
          "Monitors"
        ],
        "summary": "Prometheus metrics",
        "description": "Health, availability (24 h), response time, certificate and domain expiry and open incidents of all domains in Prometheus text format (version 0.0.4) for Grafana, Zabbix, Checkmk, PRTG and others. Labels `domain`, `customer`, for monitors `type` and `target`. 30 requests per minute.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Prometheus text format",
            "content": {
              "text/plain; version=0.0.4": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/dns": {
      "get": {
        "operationId": "getDns",
        "tags": [
          "DNS"
        ],
        "summary": "Current DNS records",
        "description": "The latest DNS snapshot of the domain with all records per type; null while none exists yet.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/DnsSnapshot"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/dns/snapshots": {
      "get": {
        "operationId": "listDnsSnapshots",
        "tags": [
          "DNS"
        ],
        "summary": "DNS history",
        "description": "All snapshots of the domain, newest first, without records (use the diff for those). Each snapshot stands for a period with unchanged configuration.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DnsSnapshot"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/dns/diff": {
      "get": {
        "operationId": "diffDnsSnapshots",
        "tags": [
          "DNS"
        ],
        "summary": "Compare two DNS snapshots",
        "description": "Both snapshots with records and the differences between them (added, removed and changed records per type).\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "description": "ID of the older snapshot",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "description": "ID of the newer snapshot",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "$ref": "#/components/schemas/DnsSnapshot"
                        },
                        "to": {
                          "$ref": "#/components/schemas/DnsSnapshot"
                        },
                        "diff": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Differences per record type"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/zone-backups": {
      "get": {
        "operationId": "listZoneBackups",
        "tags": [
          "DNS"
        ],
        "summary": "Zone backup: states",
        "description": "Complete states of the zone, read through the DNS provider integration (including records nobody sees from outside), newest first, with a summary of the difference to the previous state. A new state is only stored when the zone changes; otherwise `last_seen_at` moves on. `meta.state` tells whether a backup is possible: `available`, `not_delegated` (zone not at a connected provider), `no_integration` (no verified integration for the provider) or `unsupported`; `meta.last_error` names the error of the last run. Available to client accounts too.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ZoneBackup"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "description": "Whether a backup is possible",
                          "enum": [
                            "available",
                            "not_delegated",
                            "no_integration",
                            "unsupported"
                          ]
                        },
                        "provider": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "provider_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Explanation if not available"
                        },
                        "last_error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "last_backup_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Last confirmed state"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/zone-backups/{backup}": {
      "get": {
        "operationId": "getZoneBackup",
        "tags": [
          "DNS"
        ],
        "summary": "Zone backup: one state",
        "description": "One state with all records (`key` = \"name|TYPE\", as restoring expects it) and the difference to the previous state per name and type: `added`, `removed` or `changed` with the values before and after.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "backup",
            "in": "path",
            "required": true,
            "description": "ID of the zone backup state",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ZoneBackup"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/zone-backups/{backup}/export.zone": {
      "get": {
        "operationId": "exportZoneBackup",
        "tags": [
          "DNS"
        ],
        "summary": "Zone backup as BIND zone file",
        "description": "The state as an RFC 1035 zone file (`$ORIGIN`, `$TTL`, names relative to the zone, `@` for the domain, TXT quoted in strings of up to 255 bytes), as a download (`Content-Disposition: attachment`). Can be imported at any provider with zone import; records behind the Cloudflare proxy carry the comment `; proxied`.\n\nA read token is sufficient (`read`).\n\nOwn limit: 30 exports per hour and organization.",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "backup",
            "in": "path",
            "required": true,
            "description": "ID of the zone backup state",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Zone file (text/plain)",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/zone-backups/{backup}/export.json": {
      "get": {
        "operationId": "exportZoneBackupJson",
        "tags": [
          "DNS"
        ],
        "summary": "Zone backup as JSON",
        "description": "The state as a JSON file to download: zone, provider, timestamps, hash and the canonical record list.\n\nA read token is sufficient (`read`).\n\nOwn limit: 30 exports per hour and organization.",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "backup",
            "in": "path",
            "required": true,
            "description": "ID of the zone backup state",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "zone": {
                          "type": "string"
                        },
                        "provider": {
                          "type": "string"
                        },
                        "provider_name": {
                          "type": "string"
                        },
                        "first_seen_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "last_seen_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "hash": {
                          "type": "string"
                        },
                        "records": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "ttl": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "content": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/zone-backups/run": {
      "post": {
        "operationId": "runZoneBackup",
        "tags": [
          "DNS"
        ],
        "summary": "Take a zone backup now",
        "description": "Reads the zone at the provider right away (otherwise this happens daily): `status` is `created` if the zone changed (then with the timeline event `zone.changed`) or `unchanged`. 422 if the zone is not at a connected provider or cannot be read.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 10 per hour and domain, 60 per hour and organization.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "created",
                            "unchanged"
                          ]
                        },
                        "backup": {
                          "$ref": "#/components/schemas/ZoneBackup"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/zone-backups/{backup}/restore": {
      "post": {
        "operationId": "restoreZoneBackup",
        "tags": [
          "DNS"
        ],
        "summary": "Restore records from the zone backup",
        "description": "Writes records of this state back into the zone through the integration: per key (\"name|TYPE\") the zone gets exactly the values of the state – missing ones are created (with the state's TTL), surplus ones deleted, equal numbers changed. `all: true` takes all differences between state and zone in one run, at most 200 changes. The name servers are resolved fresh beforehand; DomainWarn does not touch records behind the Cloudflare proxy (`skipped`). Recorded in the audit log and the timeline (`zone.restored`). Not available to client accounts.\n\nRequires a token with write scope (`write`).\n\nOwn limit: 20 per minute.",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "backup",
            "in": "path",
            "required": true,
            "description": "ID of the zone backup state",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "zone": {
                          "type": "string"
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "enum": [
                                  "created",
                                  "updated",
                                  "deleted"
                                ]
                              }
                            }
                          }
                        },
                        "skipped": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "keys": {
                    "type": "array",
                    "maxItems": 200,
                    "items": {
                      "type": "string",
                      "example": "www.kunde.de|A"
                    },
                    "description": "Record keys (name|type); required without all"
                  },
                  "all": {
                    "type": "boolean",
                    "description": "Restore all differences between state and zone"
                  }
                }
              },
              "example": {
                "keys": [
                  "kunde.de|MX",
                  "_dmarc.kunde.de|TXT"
                ]
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/incidents": {
      "get": {
        "operationId": "listIncidents",
        "tags": [
          "Incidents"
        ],
        "summary": "List incidents",
        "description": "By default only open and acknowledged incidents, open and critical first; cursor-paginated.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "`open` (open and acknowledged), `all` or statuses comma-separated: open, acknowledged, resolved",
            "schema": {
              "type": "string",
              "default": "open",
              "example": "open"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "description": "Severities, comma-separated: info, warning, critical",
            "schema": {
              "type": "string",
              "example": "critical,warning"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "description": "Only incidents of this domain",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "Only domains of this customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page (1 to 200)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Cursor of the next page, taken from `meta.next_cursor` of the previous response",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Incident"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/Links"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CursorMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/incidents/{incident}": {
      "get": {
        "operationId": "getIncident",
        "tags": [
          "Incidents"
        ],
        "summary": "Get an incident",
        "description": "A single incident with domain, monitor, cause and the name of the person who acknowledged it.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "incident",
            "in": "path",
            "required": true,
            "description": "Incident ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Incident"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/incidents/{incident}/acknowledge": {
      "post": {
        "operationId": "acknowledgeIncident",
        "tags": [
          "Incidents"
        ],
        "summary": "Acknowledge an incident",
        "description": "Marks the incident as seen; reminders stop, the recovery notice is still sent.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "incident",
            "in": "path",
            "required": true,
            "description": "Incident ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Incident"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/incidents/{incident}/report": {
      "put": {
        "operationId": "updateIncidentReport",
        "tags": [
          "Incidents"
        ],
        "summary": "Incident in the customer report",
        "description": "Free text “cause and actions” for the customer (empty or null removes it) and whether the incident is hidden from the monthly report. At least one of both. What the customer sees of it is governed by the customer's report settings. The current state is part of the incident under `report`.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "incident",
            "in": "path",
            "required": true,
            "description": "Incident ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hidden": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000,
                    "description": "Cause and actions"
                  },
                  "hidden": {
                    "type": "boolean",
                    "description": "Hide from the customer report"
                  }
                }
              },
              "example": {
                "note": "Der Hoster hat das Rechenzentrum gewechselt; die Website war 95 Minuten nicht erreichbar."
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/webhook-subscriptions": {
      "post": {
        "operationId": "createWebhookSubscription",
        "tags": [
          "Organization"
        ],
        "summary": "Create a webhook subscription",
        "description": "For automations such as the n8n trigger: creates a signed webhook channel owned by the requesting token. Like every webhook channel it receives incidents, recoveries and changes from the minimum severity on (`X-DomainWarn-Signature: sha256=HMAC(secret, timestamp + \".\" + body)`, `X-DomainWarn-Timestamp`, `X-DomainWarn-Event`). The `secret` is only part of this response. The subscription shows up among the channels in the dashboard, counts against the plan's channel limit (at most 20 per token) and disappears with the token; once the token expires or its creator leaves the organization it receives nothing. API tokens only, 403 with a session.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "min_severity": {
                          "type": "string",
                          "enum": [
                            "info",
                            "warning",
                            "critical"
                          ]
                        },
                        "is_enabled": {
                          "type": "boolean"
                        },
                        "broken_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "secret": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 500,
                    "description": "Target, https and public hosts only"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 80,
                    "description": "Name in the channel list; defaults to “Webhook (token name)”"
                  },
                  "min_severity": {
                    "type": "string",
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "default": "warning",
                    "description": "Minimum severity"
                  }
                }
              },
              "example": {
                "url": "https://n8n.example.org/webhook/3f1c…/webhook",
                "name": "n8n: Tickets aus Incidents",
                "min_severity": "warning"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/webhook-subscriptions/{channel}": {
      "get": {
        "operationId": "getWebhookSubscription",
        "tags": [
          "Organization"
        ],
        "summary": "Get a webhook subscription",
        "description": "A subscription of the requesting token, without `secret`. Subscriptions of other tokens and channels from the dashboard respond with 404 (read tokens cannot create subscriptions).\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "channel",
            "in": "path",
            "required": true,
            "description": "Webhook subscription ID from the create response",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "min_severity": {
                          "type": "string",
                          "enum": [
                            "info",
                            "warning",
                            "critical"
                          ]
                        },
                        "is_enabled": {
                          "type": "boolean"
                        },
                        "broken_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "secret": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteWebhookSubscription",
        "tags": [
          "Organization"
        ],
        "summary": "Delete a webhook subscription",
        "description": "Deletes a subscription of the requesting token, for example when the n8n workflow is deactivated.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "channel",
            "in": "path",
            "required": true,
            "description": "Webhook subscription ID from the create response",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, no content"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/mail-deliveries": {
      "get": {
        "operationId": "listMailDeliveries",
        "tags": [
          "Organization"
        ],
        "summary": "Email deliveries per recipient",
        "description": "Every email of the organization (alerts, reports, invitations, status page mails) per recipient, newest first, cursor-paginated, kept for 90 days. `meta.unreachable` lists addresses that receive no more mail after three bounces within 30 days or a complaint; `meta.stats` counts the statuses in the period and gives the delivery rate (`rate`). Not available to customer accounts.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only entries with this status",
            "schema": {
              "type": "string",
              "enum": [
                "sent",
                "failed",
                "bounced",
                "complained",
                "suppressed"
              ]
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Period in days",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 30
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Cursor of the next page, taken from `meta.next_cursor` of the previous response",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MailDelivery"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/Links"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CursorMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/mail-deliveries/reactivate": {
      "post": {
        "operationId": "reactivateMailRecipient",
        "tags": [
          "Organization"
        ],
        "summary": "Reactivate an unreachable address",
        "description": "Lifts the block on an address marked unreachable; earlier bounces no longer count. Recorded in the audit log. 404 if the address is not blocked. Requires the permission to manage settings.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "recipient": {
                          "type": "string",
                          "description": "Address, masked"
                        },
                        "recipient_hash": {
                          "type": "string",
                          "description": "Identifier of the address"
                        },
                        "reactivated_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of reactivation"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "The address (or `recipient_hash`)"
                  },
                  "recipient_hash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$",
                    "description": "Identifier from the delivery log (or `email`)"
                  }
                }
              },
              "example": {
                "email": "bereitschaft@agentur.de"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/events": {
      "get": {
        "operationId": "listEvents",
        "tags": [
          "Events"
        ],
        "summary": "List events",
        "description": "Detected changes and incident transitions of all domains, newest first, cursor-paginated. Suitable for your own reports or a change log.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "description": "Severities, comma-separated: info, warning, critical",
            "schema": {
              "type": "string",
              "example": "critical,warning"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Event types, comma-separated",
            "schema": {
              "type": "string",
              "example": "dns.record_changed,tls.renewed"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "description": "Only events of this domain",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "Only domains of this customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Only events from this time on",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Only events up to this time; not before `from` and at most 366 days after it",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page (1 to 200)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Cursor of the next page, taken from `meta.next_cursor` of the previous response",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/Links"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CursorMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/domains/{domain}/timeline": {
      "get": {
        "operationId": "getDomainTimeline",
        "tags": [
          "Events"
        ],
        "summary": "Timeline of a domain",
        "description": "Events of a single domain, newest first; same filters as for all events.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Domain ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "description": "Severities, comma-separated: info, warning, critical",
            "schema": {
              "type": "string",
              "example": "critical,warning"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Event types, comma-separated",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "From time",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Up to time; not before `from` and at most 366 days after it",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page (1 to 200)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Cursor of the next page, taken from `meta.next_cursor` of the previous response",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/Links"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CursorMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/announcements": {
      "get": {
        "operationId": "listAnnouncements",
        "tags": [
          "Customers"
        ],
        "summary": "Announcements on the status page",
        "description": "Incidents, maintenance and notices in your own words, as they appear at the top of the status page: active ones immediately, scheduled maintenance up to 14 days ahead.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createAnnouncement",
        "tags": [
          "Customers"
        ],
        "summary": "Publish an announcement",
        "description": "Appears on the status page of the customer. Without a start it applies immediately, without an end until it is marked resolved.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "title"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "incident",
                      "maintenance",
                      "info"
                    ],
                    "description": "Kind of announcement"
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 190,
                    "description": "Title"
                  },
                  "body": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Text"
                  },
                  "starts_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Start; empty = now"
                  },
                  "ends_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "End"
                  }
                }
              },
              "example": {
                "kind": "maintenance",
                "title": "Serverumzug am Samstag",
                "body": "Von 8 bis 10 Uhr ist der Shop nicht erreichbar.",
                "starts_at": "2026-10-03T06:00:00Z",
                "ends_at": "2026-10-03T08:00:00Z"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/announcements/{announcement}": {
      "patch": {
        "operationId": "updateAnnouncement",
        "tags": [
          "Customers"
        ],
        "summary": "Update an announcement",
        "description": "Change text, period or kind; marking it resolved ends it.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "announcement",
            "in": "path",
            "required": true,
            "description": "ID of the announcement on the status page",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteAnnouncement",
        "tags": [
          "Customers"
        ],
        "summary": "Delete an announcement",
        "description": "Removes the announcement from the status page.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "announcement",
            "in": "path",
            "required": true,
            "description": "ID of the announcement on the status page",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, no content"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/status-subscribers": {
      "get": {
        "operationId": "listStatusSubscribers",
        "tags": [
          "Customers"
        ],
        "summary": "Status page subscribers",
        "description": "Email addresses that signed up for incident notifications on the customer’s status page, with language and time of confirmation (empty = not yet confirmed). At most 500, newest first.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/status-subscribers/{subscriber}": {
      "delete": {
        "operationId": "deleteStatusSubscriber",
        "tags": [
          "Customers"
        ],
        "summary": "Remove a subscriber",
        "description": "Removes the address; it receives no further incident notifications and can sign up again on the page.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "subscriber",
            "in": "path",
            "required": true,
            "description": "ID of the status page subscriber",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, no content"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/customers": {
      "get": {
        "operationId": "listCustomers",
        "tags": [
          "Customers"
        ],
        "summary": "List customers",
        "description": "Customers of the organization with their number of domains, alphabetical; archived ones only on request.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Part of name or reference",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "archived",
            "in": "query",
            "required": false,
            "description": "true returns only archived, false only active (default)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page (1 to 200)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Customer"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/Links"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "createCustomer",
        "tags": [
          "Customers"
        ],
        "summary": "Create a customer",
        "description": "Requires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 160,
                    "description": "Name, unique per organization"
                  },
                  "reference": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "description": "Your own reference"
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000,
                    "description": "Notes"
                  },
                  "contact_email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "description": "Contact address for reports"
                  },
                  "logo": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Logo as data URL (PNG, JPEG or SVG without scripts, up to 300 KB); null removes it"
                  },
                  "monthly_report": {
                    "type": "boolean",
                    "description": "Send the monthly report"
                  },
                  "report_locale": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "de",
                      "en",
                      null
                    ],
                    "description": "Report language"
                  }
                }
              },
              "example": {
                "name": "Musterfirma GmbH",
                "reference": "K-1042",
                "contact_email": "it@musterfirma.de",
                "monthly_report": true,
                "report_locale": "de"
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}": {
      "get": {
        "operationId": "getCustomer",
        "tags": [
          "Customers"
        ],
        "summary": "Get a customer",
        "description": "A read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "patch": {
        "operationId": "updateCustomer",
        "tags": [
          "Customers"
        ],
        "summary": "Update a customer",
        "description": "Same fields as on create, plus `is_archived`. `name` must always be sent.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 160,
                    "description": "Name"
                  },
                  "reference": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "description": "Your own reference"
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000,
                    "description": "Notes"
                  },
                  "contact_email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "description": "Contact address"
                  },
                  "logo": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Logo as data URL; null removes it, omitted keeps it"
                  },
                  "is_archived": {
                    "type": "boolean",
                    "description": "Archive or restore"
                  },
                  "monthly_report": {
                    "type": "boolean",
                    "description": "Send the monthly report"
                  },
                  "report_locale": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "de",
                      "en",
                      null
                    ],
                    "description": "Report language"
                  }
                }
              },
              "example": {
                "name": "Musterfirma GmbH",
                "is_archived": true
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteCustomer",
        "tags": [
          "Customers"
        ],
        "summary": "Delete a customer",
        "description": "Removes the customer; their domains remain and only lose the assignment.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, no content"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/report": {
      "get": {
        "operationId": "getCustomerReport",
        "tags": [
          "Customers"
        ],
        "summary": "Get the monthly report",
        "description": "The customer's monthly report as data: summary, per domain availability, downtime, incidents and certificate, plus incidents, changes and upcoming expiries. Without `month` the previous month, language via `locale`.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "Report month as YYYY-MM; defaults to the previous month",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
              "example": "2026-08"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Report language (texts, date formats); without it the customer's report language, else the organization's. Accept-Language does not apply here.",
            "schema": {
              "type": "string",
              "enum": [
                "de",
                "en"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomerReport"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/report/pdf": {
      "get": {
        "operationId": "getCustomerReportPdf",
        "tags": [
          "Customers"
        ],
        "summary": "Monthly report as PDF",
        "description": "The same report as PDF; `download=1` returns it as an attachment instead of inline.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "Report month as YYYY-MM; defaults to the previous month",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
              "example": "2026-08"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Report language (texts, date formats); without it the customer's report language, else the organization's. Accept-Language does not apply here.",
            "schema": {
              "type": "string",
              "enum": [
                "de",
                "en"
              ]
            }
          },
          {
            "name": "download",
            "in": "query",
            "required": false,
            "description": "As download (Content-Disposition attachment)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/report/share": {
      "post": {
        "operationId": "shareCustomerReport",
        "tags": [
          "Customers"
        ],
        "summary": "Share the report",
        "description": "Creates a signed link to the PDF, valid for 60 days, retrievable without login – to pass on to the customer.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "Report month as YYYY-MM; defaults to the previous month",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
              "example": "2026-08"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Report language (texts, date formats); without it the customer's report language, else the organization's. Accept-Language does not apply here.",
            "schema": {
              "type": "string",
              "enum": [
                "de",
                "en"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Signed link"
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Valid until"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/compliance": {
      "get": {
        "operationId": "getCustomerCompliance",
        "tags": [
          "Customers"
        ],
        "summary": "Customer compliance report",
        "description": "Maps the latest check results to the requirements of BSI TR-03108 (secure email transport), BSI TR-03182 (email authentication) and NIS2 Art. 21(2): per requirement `met`, `partial`, `failed` or `unknown` with evidence and recommendation. A technical indication from the outside, not a certification. From Agency on (plan feature `reports`, otherwise 402).\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Report language (texts, date formats); without it the customer's report language, else the organization's. Accept-Language does not apply here.",
            "schema": {
              "type": "string",
              "enum": [
                "de",
                "en"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Organization, customer, sections (frameworks), totals and the requirements per domain"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/compliance/pdf": {
      "get": {
        "operationId": "getCustomerCompliancePdf",
        "tags": [
          "Customers"
        ],
        "summary": "Customer compliance report as PDF",
        "description": "The same report as PDF in the style of the monthly report, with white label; `download=1` returns it as an attachment.\n\nA read token is sufficient (`read`).",
        "x-scope": "read",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Report language (texts, date formats); without it the customer's report language, else the organization's. Accept-Language does not apply here.",
            "schema": {
              "type": "string",
              "enum": [
                "de",
                "en"
              ]
            }
          },
          {
            "name": "download",
            "in": "query",
            "required": false,
            "description": "As download (Content-Disposition attachment)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/report/settings": {
      "put": {
        "operationId": "updateCustomerReportSettings",
        "tags": [
          "Customers"
        ],
        "summary": "Monthly report content",
        "description": "What the customer's report shows – preview, PDF, link and mailing: sections, details per incident and which incidents. Missing keys stay unchanged; the default matches the report without settings (all sections, incidents with duration, no further details). The current state is part of the customer under `report_settings`.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Complete settings including defaults"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "sections": {
                    "type": "object",
                    "properties": {
                      "availability": {
                        "type": "boolean"
                      },
                      "pages": {
                        "type": "boolean"
                      },
                      "pagespeed": {
                        "type": "boolean"
                      },
                      "expiring": {
                        "type": "boolean"
                      },
                      "hosting": {
                        "type": "boolean"
                      },
                      "upcoming": {
                        "type": "boolean"
                      },
                      "incidents": {
                        "type": "boolean"
                      },
                      "changes": {
                        "type": "boolean"
                      }
                    },
                    "description": "Report sections"
                  },
                  "incident_details": {
                    "type": "object",
                    "properties": {
                      "duration": {
                        "type": "boolean"
                      },
                      "timeline": {
                        "type": "boolean"
                      },
                      "channels": {
                        "type": "boolean"
                      },
                      "acknowledged_by": {
                        "type": "boolean"
                      },
                      "note": {
                        "type": "boolean"
                      },
                      "changes": {
                        "type": "boolean"
                      }
                    },
                    "description": "Details per incident: duration, timeline, notified channel types, who acknowledged, cause and actions, changes with before/after"
                  },
                  "incident_filter": {
                    "type": "object",
                    "properties": {
                      "severity": {
                        "type": "string",
                        "enum": [
                          "all",
                          "critical"
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "all",
                          "resolved"
                        ]
                      }
                    },
                    "description": "Which incidents: all or critical only, all or resolved only"
                  }
                }
              },
              "example": {
                "sections": {
                  "changes": false
                },
                "incident_details": {
                  "timeline": true,
                  "note": true
                },
                "incident_filter": {
                  "severity": "critical"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/status-page": {
      "post": {
        "operationId": "enableCustomerStatusPage",
        "tags": [
          "Customers"
        ],
        "summary": "Enable the status page",
        "description": "Creates the token of the customer's public status page (reachable without login); an existing one is replaced and the old address stops working. The address is in `status_page_url`. For archived customers the server answers 422.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Enabled, address in `status_page_url`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "disableCustomerStatusPage",
        "tags": [
          "Customers"
        ],
        "summary": "Disable the status page",
        "description": "Deletes the token; the address answers 404 afterwards. Returns the customer (`status_page_url` is null).\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Disabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/orgs/{organization}/customers/{customer}/status-page/host/verify": {
      "post": {
        "operationId": "verifyCustomerStatusPageHost",
        "tags": [
          "Customers"
        ],
        "summary": "Verify the custom status page address",
        "description": "Checks the TXT record from `status_page_host_record` (name `_domainwarn.<address>`). Only after verification does the website serve the status page at `status_page_host`. If the record is missing or DNS cannot be queried right now, the server answers 422.\n\nRequires a token with write scope (`write`).",
        "x-scope": "write",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "Organization slug as shown in the dashboard URL and under Settings → API. A token only reaches its own organization; others respond with 404.",
            "schema": {
              "type": "string",
              "example": "meine-agentur"
            }
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "description": "Customer ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Verified, `status_page_host_verified` is true",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API token from the dashboard (Settings → API) in the header `Authorization: Bearer <token>`; also send `Accept: application/json`."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Token missing, expired or revoked",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Token is not allowed to do this (read token on a writing method or a blocked area)",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "NotFound": {
        "description": "Organization or object not found, also for a foreign organization",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "Organization suspended or without an active plan",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/PlanProblem"
            }
          }
        }
      },
      "ValidationError": {
        "description": "Invalid input, messages per field in `errors`",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ValidationProblem"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Limit exceeded; `Retry-After` gives the wait time in seconds",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      }
    },
    "schemas": {
      "Fix": {
        "type": "object",
        "description": "Suggestion for a finding that DomainWarn can carry out through a DNS provider integration (e.g. Cloudflare): create a missing record (action create) or change an existing one (action update)",
        "properties": {
          "key": {
            "type": "string",
            "description": "Suggestion key, e.g. dmarc_missing, spf_missing, spf_all, tls_rpt_missing, caa_missing, caa_issuer"
          },
          "finding": {
            "type": "string",
            "description": "Finding that triggers the suggestion"
          },
          "type": {
            "type": "string",
            "description": "Record type (TXT, CAA)"
          },
          "name": {
            "type": "string",
            "description": "Record name"
          },
          "content": {
            "type": "string",
            "description": "Record content as it would be created"
          },
          "monitor_id": {
            "type": "string",
            "format": "uuid",
            "description": "Monitor whose finding triggers the suggestion"
          },
          "action": {
            "type": "string",
            "enum": [
              "create",
              "update"
            ],
            "description": "create adds a record, update changes exactly one existing record (only with replace and current)"
          },
          "current": {
            "type": "string",
            "description": "Existing value according to the last check (only with action update)"
          },
          "existing": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Records of the same name and type that stay unchanged (e.g. the CAA set for caa_issuer)"
          },
          "note_key": {
            "type": "string",
            "description": "Key of the note for the suggestion, e.g. dmarc_missing, spf_include, spf_mx, caa_missing; the dashboard translates it"
          },
          "note_params": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Placeholders of the note, e.g. provider (spf_include) or ca (caa_missing)"
          },
          "input": {
            "type": "string",
            "enum": [
              "rua",
              "senders"
            ],
            "description": "Required input when applying: report address (rua) or sending services (senders); absent when none is needed"
          },
          "input_default": {
            "type": "string",
            "description": "Suggested value for the input (only with `input`)"
          },
          "input_value": {
            "type": "string",
            "description": "Value that is known to work and can be prefilled: DomainWarn's report address for the domain (tls_rpt_missing)"
          }
        },
        "required": [
          "key",
          "finding",
          "type",
          "name",
          "content",
          "monitor_id",
          "action",
          "note_key",
          "note_params"
        ]
      },
      "Organization": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Organization ID"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "slug": {
            "type": "string",
            "description": "Slug used in `/orgs/{organization}`"
          },
          "plan": {
            "type": "string",
            "enum": [
              "trial",
              "free",
              "freelancer",
              "agency",
              "agency_pro"
            ],
            "description": "Effective plan: trial during the trial period (free afterwards), otherwise the booked or gifted plan"
          },
          "monitoring_active": {
            "type": "boolean",
            "description": "Whether checks are running (false while the organization is suspended)"
          },
          "trial_days_left": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Remaining days of the trial period, null outside the trial"
          },
          "timezone": {
            "type": "string",
            "description": "Organization time zone"
          },
          "locale": {
            "type": "string",
            "enum": [
              "de",
              "en"
            ],
            "description": "Organization language"
          },
          "suspended": {
            "type": "boolean",
            "description": "Suspended by the operator"
          },
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "member"
            ],
            "description": "Role of the token: viewer (read) or member (write)"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Creation time"
          }
        }
      },
      "Customer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Customer ID"
          },
          "name": {
            "type": "string",
            "description": "Name, unique per organization"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own reference, e.g. a customer number"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Notes"
          },
          "contact_email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Contact address for reports"
          },
          "logo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Logo as data URL (PNG, JPEG or SVG up to 300 KB) for status page, report and list"
          },
          "is_archived": {
            "type": "boolean",
            "description": "Archived"
          },
          "monthly_report": {
            "type": "boolean",
            "description": "Monthly report by e-mail"
          },
          "report_locale": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "de",
              "en",
              null
            ],
            "description": "Report language"
          },
          "report_settings": {
            "type": "object",
            "additionalProperties": true,
            "description": "Monthly report content: `sections`, `incident_details`, `incident_filter` (see monthly report settings)"
          },
          "last_report_sent_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last report sent"
          },
          "status_page_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Public status page of the customer (contains the token); null while none is enabled"
          },
          "status_page_host": {
            "type": [
              "string",
              "null"
            ],
            "description": "Custom address of the status page (CNAME to the website), e.g. status.client.example"
          },
          "status_page_host_verified": {
            "type": "boolean",
            "description": "Custom address verified via TXT record; only then does the website serve the page there"
          },
          "status_page_host_record": {
            "type": [
              "object",
              "null"
            ],
            "description": "TXT record to verify the custom address (type, name, value); null without address or once verified",
            "properties": {
              "type": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            }
          },
          "status_badge_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "SVG badge with the overall state for embedding; null while no status page is enabled"
          },
          "sla_target": {
            "type": [
              "number",
              "null"
            ],
            "description": "Committed uptime in percent (90–100); null = no SLA"
          },
          "domains_count": {
            "type": "integer",
            "description": "Number of assigned domains"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Creation time"
          }
        }
      },
      "Monitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Monitor ID"
          },
          "domain_id": {
            "type": "string",
            "format": "uuid",
            "description": "Domain ID"
          },
          "type": {
            "type": "string",
            "enum": [
              "http",
              "tls",
              "dns",
              "mx",
              "spf",
              "dmarc",
              "domain",
              "dkim",
              "dnssec",
              "mta_sts",
              "blacklist",
              "tls_rpt",
              "bimi",
              "smtp",
              "reverse_dns",
              "ct_log",
              "redirects",
              "caa",
              "nameservers",
              "ipv6",
              "dane",
              "cms",
              "privacy",
              "pagespeed",
              "heartbeat",
              "security_txt",
              "ports",
              "lookalike",
              "crawl",
              "journey",
              "autodiscover",
              "takeover",
              "http3",
              "safe_browsing",
              "accessibility",
              "visual",
              "subdomains"
            ],
            "description": "Check type"
          },
          "target": {
            "type": "string",
            "description": "Target: URL for http, hostname otherwise"
          },
          "config": {
            "type": "object",
            "additionalProperties": true,
            "description": "Configuration per check type, e.g. expected_status and slow_ms (http), port and starttls (tls), selectors (dkim)"
          },
          "interval_seconds": {
            "type": "integer",
            "description": "Check interval in seconds (capped by the plan)"
          },
          "is_enabled": {
            "type": "boolean",
            "description": "Enabled"
          },
          "current_status": {
            "type": "string",
            "enum": [
              "ok",
              "warning",
              "critical",
              "unknown"
            ],
            "description": "Current status"
          },
          "next_check_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Next check"
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last check"
          },
          "consecutive_failures": {
            "type": "integer",
            "description": "Consecutive failures"
          },
          "consecutive_errors": {
            "type": "integer",
            "description": "Consecutive check errors (the check itself could not run)"
          },
          "failure_locations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Check locations that see the current failure; empty while the check passes"
          },
          "is_volatile": {
            "type": "boolean",
            "description": "Result flaps between checks"
          },
          "last_payload": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Raw data of the last check, structure depends on the type"
          },
          "last_payload_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time of the raw data"
          },
          "last_findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Finding"
            },
            "description": "Findings of the last check"
          },
          "ping_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "heartbeat only: address the cron job or extension calls (append /fail for a failed run)"
          },
          "pending_change": {
            "type": "boolean",
            "description": "Change detected, confirmation check pending"
          },
          "last_fingerprint": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fingerprint of the last observed configuration"
          }
        }
      },
      "JourneyStep": {
        "type": "object",
        "description": "One step of a journey. Which fields apply depends on `type`: goto (url), click (selector or text), fill (selector, value – write only; reads expose has_value only), select (selector, value), expect_text (text), expect_url (contains or pattern), expect_status (status), wait (ms, at most 5000).",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "goto",
              "click",
              "fill",
              "select",
              "expect_text",
              "expect_url",
              "expect_status",
              "wait"
            ],
            "description": "Step type"
          },
          "url": {
            "type": "string",
            "description": "goto: address (absolute with http(s) or path from /)"
          },
          "selector": {
            "type": "string",
            "description": "CSS selector (click, fill, select)"
          },
          "text": {
            "type": "string",
            "description": "Visible text (click: element to click; expect_text: expected text)"
          },
          "value": {
            "type": "string",
            "description": "fill/select: value to enter; fill values are stored encrypted and never returned"
          },
          "has_value": {
            "type": "boolean",
            "description": "fill, read only: a value is stored"
          },
          "keep_value": {
            "type": "boolean",
            "description": "fill, write only: keep the stored value instead of setting a new one"
          },
          "contains": {
            "type": "string",
            "description": "expect_url: part of the address"
          },
          "pattern": {
            "type": "string",
            "description": "expect_url: regular expression"
          },
          "status": {
            "type": "integer",
            "description": "expect_status: expected HTTP status of the last navigation"
          },
          "ms": {
            "type": "integer",
            "description": "wait: pause in ms (at most 5000)"
          }
        }
      },
      "Journey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Journey ID"
          },
          "domain_id": {
            "type": "string",
            "format": "uuid",
            "description": "Domain ID"
          },
          "name": {
            "type": "string",
            "description": "Name, unique per domain"
          },
          "start_url": {
            "type": "string",
            "description": "Start address, must belong to the domain"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JourneyStep"
            },
            "description": "Steps in order; fill without value, has_value only"
          },
          "slow_ms": {
            "type": "integer",
            "description": "Total duration in ms from which the journey counts as slow"
          },
          "interval_seconds": {
            "type": "integer",
            "description": "Check interval in seconds (900 from Agency)"
          },
          "is_enabled": {
            "type": "boolean",
            "description": "Enabled"
          },
          "current_status": {
            "type": "string",
            "enum": [
              "ok",
              "warning",
              "critical",
              "unknown"
            ],
            "description": "Current status"
          },
          "next_check_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Next check"
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last check"
          },
          "consecutive_failures": {
            "type": "integer",
            "description": "Consecutive failures"
          },
          "consecutive_errors": {
            "type": "integer",
            "description": "Consecutive runs without a result (browser runner unavailable)"
          },
          "last_findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Finding"
            },
            "description": "Findings of the last run"
          },
          "last_result": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Last run with a verdict: status, ok, duration_ms, final_url, steps (index, type, label, status ok|failed|skipped|blocked, duration_ms, error), failed_step (index, url, page_title, page_text), at"
          },
          "last_error": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Only if the most recent run had no result (runner unavailable): at, message"
          },
          "runs": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Recent runs, newest first: at, status, duration_ms, failed_step"
          }
        }
      },
      "VisualMonitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Screenshot monitor ID (monitor of type visual)"
          },
          "domain_id": {
            "type": "string",
            "format": "uuid",
            "description": "Domain ID"
          },
          "url": {
            "type": "string",
            "description": "Watched address, belongs to the domain"
          },
          "viewports": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "desktop",
                "mobile"
              ]
            },
            "description": "Viewports: desktop (1280 px) and/or mobile (390 px)"
          },
          "threshold_percent": {
            "type": "number",
            "description": "Difference in percent of the area from which an alert is raised"
          },
          "ignore_selectors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "CSS selectors painted over before capturing"
          },
          "hide_cookie_banners": {
            "type": "boolean",
            "description": "Accept cookie banners before capturing (consent) and paint over any remaining ones"
          },
          "interval_seconds": {
            "type": "integer",
            "description": "Check interval in seconds (at least 3600)"
          },
          "is_enabled": {
            "type": "boolean",
            "description": "Enabled"
          },
          "current_status": {
            "type": "string",
            "enum": [
              "ok",
              "warning",
              "critical",
              "unknown"
            ],
            "description": "Current status"
          },
          "next_check_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Next check"
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last check"
          },
          "last_findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Finding"
            },
            "description": "Findings of the last run"
          },
          "last_result": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Last run: status, at, title, http_status, error, shots (viewport, state baseline|unchanged|changed, ratio_percent)"
          },
          "baselines": {
            "type": "object",
            "additionalProperties": true,
            "description": "Current reference per viewport (desktop, mobile) or null: id, width, height, created_at, image_url (signed, valid for two hours)"
          },
          "changes": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Recent differences, newest first: id, viewport, ratio_percent, created_at, accepted_at, open, image_url, diff_url, baseline_url"
          },
          "can_accept": {
            "type": "boolean",
            "description": "There is an open difference that can be accepted as the new reference"
          }
        }
      },
      "Finding": {
        "type": "object",
        "description": "Check finding, text in the language of the Accept-Language header",
        "properties": {
          "code": {
            "type": "string",
            "description": "Machine-readable key, e.g. spf.too_many_lookups"
          },
          "severity": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "critical"
            ],
            "description": "Severity"
          },
          "params": {
            "type": "object",
            "additionalProperties": true,
            "description": "Values of the finding, e.g. number of lookups"
          },
          "message": {
            "type": "string",
            "description": "Translated description"
          },
          "recommendation": {
            "type": [
              "string",
              "null"
            ],
            "description": "Translated recommendation, if any"
          }
        },
        "additionalProperties": true
      },
      "Domain": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Domain ID"
          },
          "name": {
            "type": "string",
            "description": "Domain in ASCII (punycode)"
          },
          "unicode_name": {
            "type": "string",
            "description": "Domain in Unicode"
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Customer ID"
          },
          "customer": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID"
              },
              "name": {
                "type": "string",
                "description": "Name"
              }
            },
            "description": "Assigned customer"
          },
          "is_active": {
            "type": "boolean",
            "description": "Monitoring active"
          },
          "paused_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Paused until"
          },
          "is_paused": {
            "type": "boolean",
            "description": "Currently paused"
          },
          "in_maintenance": {
            "type": "boolean",
            "description": "Currently inside an active maintenance window (no incidents or notifications)"
          },
          "plan_paused": {
            "type": "boolean",
            "description": "Paused by the plan (above the domain limit)"
          },
          "cms": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "key": {
                "type": "string",
                "description": "Key, e.g. wordpress"
              },
              "name": {
                "type": "string",
                "description": "Name"
              },
              "version": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Detected version"
              }
            },
            "description": "Detected content management system"
          },
          "cms_detected_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time of CMS detection"
          },
          "mail_detected": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the domain receives mail (MX present)"
          },
          "monitoring_groups": {
            "type": "object",
            "properties": {
              "web": {
                "type": "boolean",
                "description": "Website and certificates"
              },
              "mail": {
                "type": "boolean",
                "description": "Mail infrastructure"
              },
              "dns": {
                "type": "boolean",
                "description": "DNS, DNSSEC, domain and blacklists"
              }
            },
            "description": "Monitoring groups switched on or off"
          },
          "notification_overrides": {
            "type": [
              "object",
              "null"
            ],
            "description": "Notification rules for this domain only; null inherits the organization settings",
            "properties": {
              "failure_minutes": {
                "type": "integer",
                "description": "Minutes before a failure is reported (1 to 1440)",
                "minimum": 1,
                "maximum": 1440
              },
              "recovery_minutes": {
                "type": "integer",
                "description": "Minutes before recovery is reported (1 to 1440)",
                "minimum": 1,
                "maximum": 1440
              },
              "min_severity": {
                "type": "string",
                "enum": [
                  "info",
                  "warning",
                  "critical"
                ],
                "description": "Lowest severity that is reported"
              },
              "ignore_quiet_hours": {
                "type": "boolean",
                "description": "Notify during quiet hours as well"
              },
              "notify_on_change": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Change types that are reported"
              }
            }
          },
          "health_status": {
            "type": "string",
            "enum": [
              "healthy",
              "warning",
              "critical",
              "unknown"
            ],
            "description": "Overall health from all monitors"
          },
          "health_computed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time of computation"
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last check"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Domain expiry (registry), not available for .de"
          },
          "expiry_available": {
            "type": "boolean",
            "description": "Whether an expiry date can be determined"
          },
          "monitors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Monitor"
            },
            "description": "Monitors (only on single fetch, create and update)"
          },
          "open_incidents_count": {
            "type": "integer",
            "description": "Open incidents"
          },
          "suggestions_count": {
            "type": "integer",
            "description": "Open hostname suggestions (only on single fetch)"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Creation time"
          }
        }
      },
      "HostnameSuggestion": {
        "type": "object",
        "description": "Hostname under a domain discovered in certificate transparency logs that is not monitored yet",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Suggestion ID"
          },
          "domain_id": {
            "type": "string",
            "format": "uuid",
            "description": "Domain ID"
          },
          "hostname": {
            "type": "string",
            "description": "Suggested hostname"
          },
          "source": {
            "type": "string",
            "enum": [
              "ct_log"
            ],
            "description": "Source of the suggestion"
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "added",
              "dismissed"
            ],
            "description": "new (open), added (monitor created) or dismissed"
          },
          "first_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "First seen"
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last seen"
          }
        }
      },
      "DomainImport": {
        "type": "object",
        "description": "Background import of a confirmed domain list; the counters grow batch by batch until status is done or failed",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Import ID"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "done",
              "failed"
            ],
            "description": "Queued, running, finished or aborted"
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Customer for all created domains"
          },
          "total": {
            "type": "integer",
            "description": "Names in the import (without blank lines, comments and duplicates)"
          },
          "created": {
            "type": "integer",
            "description": "Created (new domains and hostnames of existing domains)"
          },
          "skipped": {
            "type": "integer",
            "description": "Skipped: already monitored or present"
          },
          "failed": {
            "type": "integer",
            "description": "Rejected, reason in errors"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Input"
                },
                "reason": {
                  "type": "string",
                  "description": "Message"
                }
              }
            },
            "description": "Rejected and skipped names with reason"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reason when status is failed"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Processing start"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Processing end"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Created at"
          }
        }
      },
      "DomainBulkOperation": {
        "type": "object",
        "description": "Bulk action on selected domains with a result per domain; in the background, processed and results grow until status is done or failed",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Bulk action ID"
          },
          "action": {
            "type": "string",
            "enum": [
              "pause",
              "resume",
              "assign_customer",
              "set_areas",
              "set_interval",
              "check_now",
              "delete"
            ],
            "description": "Action performed"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "done",
              "failed"
            ],
            "description": "Queued, running, finished or aborted"
          },
          "total": {
            "type": "integer",
            "description": "Requested domains"
          },
          "processed": {
            "type": "integer",
            "description": "Processed so far"
          },
          "succeeded": {
            "type": "integer",
            "description": "Succeeded"
          },
          "skipped": {
            "type": "integer",
            "description": "Skipped, reason in results"
          },
          "failed": {
            "type": "integer",
            "description": "Failed"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Requested domain ID"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Domain name; null if it does not exist in the organization"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "skipped",
                    "failed"
                  ]
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "not_found",
                    "unchanged",
                    "not_paused",
                    "plan_paused",
                    "paused",
                    "no_monitor",
                    "rate_limited",
                    "error",
                    null
                  ],
                  "description": "Reason when skipped or failed"
                }
              }
            },
            "description": "Result per domain in the order of the request"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reason when status is failed"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Processing start"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Processing end"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Created at"
          }
        }
      },
      "MaintenanceWindow": {
        "type": "object",
        "description": "Maintenance window: for one domain, one customer or the whole organization; no incidents or notifications are raised while it is active",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Maintenance window ID"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "kind": {
            "type": "string",
            "enum": [
              "once",
              "weekly"
            ],
            "description": "One-off (starts_at to ends_at) or weekly (weekdays, time_from, time_to)"
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Customer whose domains are affected; null for all"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Customer name"
          },
          "domain_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Single affected domain; null for all"
          },
          "domain_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Domain in Unicode"
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Start (one-off)"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "End (one-off)"
          },
          "weekdays": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 7
            },
            "description": "Weekdays 1 (Monday) to 7 (Sunday), weekly"
          },
          "time_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "Start HH:MM in the time zone of the window (weekly)"
          },
          "time_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "End HH:MM; before time_from the window spans midnight"
          },
          "timezone": {
            "type": "string",
            "description": "Time zone of the window"
          },
          "is_enabled": {
            "type": "boolean",
            "description": "Enabled"
          },
          "is_active": {
            "type": "boolean",
            "description": "Currently in effect"
          },
          "is_expired": {
            "type": "boolean",
            "description": "One-off window whose end has passed"
          }
        }
      },
      "DomainContract": {
        "type": "object",
        "description": "Contract and cost data of a domain (team only). Without a stored contract the same shape comes back with empty fields and exists = false",
        "properties": {
          "domain_id": {
            "type": "string",
            "format": "uuid",
            "description": "Domain ID"
          },
          "exists": {
            "type": "boolean",
            "description": "Whether a contract is stored"
          },
          "registrar": {
            "type": [
              "string",
              "null"
            ],
            "description": "Registrar (free text)"
          },
          "registrar_suggestion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Registrar detected by the domain check (RDAP) as a suggestion"
          },
          "hosting_provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Hosting provider"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Contract end as calendar day (YYYY-MM-DD)"
          },
          "notice_period_days": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Notice period in days"
          },
          "notice_deadline": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Last day to cancel: contract end minus notice period"
          },
          "auto_renews": {
            "type": "boolean",
            "description": "Renews automatically"
          },
          "annual_cost": {
            "type": [
              "number",
              "null"
            ],
            "description": "Annual cost"
          },
          "currency": {
            "type": "string",
            "description": "Currency (ISO 4217), default EUR"
          },
          "cost_reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cost centre or reference"
          },
          "responsible_user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Responsible member"
          },
          "responsible": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID"
              },
              "name": {
                "type": "string",
                "description": "Name"
              }
            },
            "description": "Responsible member"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Note"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last changed"
          }
        }
      },
      "Expiration": {
        "type": "object",
        "description": "One row of the expirations overview: domain expiry, certificate expiry, contract end or last day to cancel",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "domain",
              "certificate",
              "contract_end",
              "notice_deadline"
            ],
            "description": "Kind of date"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Date as calendar day in the organization's time zone"
          },
          "days_left": {
            "type": "integer",
            "description": "Days until the date, negative when past"
          },
          "action_required": {
            "type": "boolean",
            "description": "Someone has to act: cancellation deadline, contract end without renewal, domain expiry, certificate with at most 14 days left"
          },
          "domain": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Domain ID"
              },
              "name": {
                "type": "string",
                "description": "Domain in Unicode"
              }
            }
          },
          "customer": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Customer ID"
              },
              "name": {
                "type": "string",
                "description": "Name"
              }
            },
            "description": "Customer of the domain"
          },
          "responsible": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID"
              },
              "name": {
                "type": "string",
                "description": "Name"
              }
            },
            "description": "Responsible member from the contract"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Registrar, hosting provider or certificate issuer"
          },
          "auto_renews": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Automatic renewal according to the contract"
          },
          "annual_cost": {
            "type": [
              "number",
              "null"
            ],
            "description": "Annual cost according to the contract"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency of the cost"
          },
          "cost_reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cost centre or reference"
          },
          "target": {
            "type": [
              "string",
              "null"
            ],
            "description": "For certificates: host name and port"
          }
        }
      },
      "Incident": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Incident ID"
          },
          "domain_id": {
            "type": "string",
            "format": "uuid",
            "description": "Domain ID"
          },
          "domain": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID"
              },
              "name": {
                "type": "string",
                "description": "Domain"
              },
              "unicode_name": {
                "type": "string",
                "description": "Domain in Unicode"
              },
              "customer_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              }
            },
            "description": "Affected domain"
          },
          "monitor_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Monitor ID"
          },
          "monitor": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID"
              },
              "type": {
                "type": "string",
                "description": "Check type"
              },
              "target": {
                "type": "string",
                "description": "Target"
              }
            },
            "description": "Triggering monitor"
          },
          "type": {
            "type": "string",
            "description": "Type, e.g. http.down, tls.expiring, spf.invalid"
          },
          "severity": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "critical"
            ],
            "description": "Severity"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "acknowledged",
              "resolved"
            ],
            "description": "Status"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "Start"
          },
          "acknowledged_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Acknowledged at"
          },
          "acknowledged_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the person who acknowledged"
          },
          "resolved_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Resolved at"
          },
          "resolved_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Resolution reason, e.g. recovered, monitor_removed"
          },
          "failure_count": {
            "type": "integer",
            "description": "Failed checks"
          },
          "notification_count": {
            "type": "integer",
            "description": "Notifications sent"
          },
          "reminder_count": {
            "type": "integer",
            "description": "Reminders sent"
          },
          "cause": {
            "type": "object",
            "additionalProperties": true,
            "description": "Cause with findings (`findings`) and raw data"
          },
          "report": {
            "type": "object",
            "properties": {
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "hidden": {
                "type": "boolean"
              }
            },
            "description": "Details for the customer report: cause and actions, hidden"
          }
        }
      },
      "MailDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Entry ID"
          },
          "recipient": {
            "type": "string",
            "description": "Recipient, masked (e.g. j***@client.com); the API never returns the address itself"
          },
          "recipient_hash": {
            "type": "string",
            "description": "Identifier of the address for reactivation",
            "pattern": "^[a-f0-9]{64}$"
          },
          "is_member": {
            "type": "boolean",
            "description": "Address belongs to a user account"
          },
          "mail_type": {
            "type": "string",
            "enum": [
              "notification",
              "monthly_report",
              "status_page",
              "invitation",
              "sender_verification",
              "sender_test",
              "trial",
              "email_verification",
              "password_reset",
              "other"
            ],
            "description": "Kind of mail"
          },
          "transport": {
            "type": "string",
            "enum": [
              "system",
              "customer_smtp"
            ],
            "description": "Delivery route: via DomainWarn or your own SMTP server"
          },
          "status": {
            "type": "string",
            "enum": [
              "sent",
              "failed",
              "bounced",
              "complained",
              "suppressed"
            ],
            "description": "sent: sent; failed: rejected by the mail server; bounced: undeliverable afterwards; complained: reported as spam; suppressed: not sent because the address is marked unreachable"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error or reason, addresses masked"
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time sent"
          },
          "event_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time of the bounce or complaint"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time of the attempt"
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Event ID"
          },
          "type": {
            "type": "string",
            "description": "Type, e.g. dns.record_changed, tls.renewed, incident.opened"
          },
          "severity": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "critical"
            ],
            "description": "Severity"
          },
          "domain_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Domain ID"
          },
          "domain": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID"
              },
              "name": {
                "type": "string",
                "description": "Domain"
              },
              "unicode_name": {
                "type": "string",
                "description": "Domain in Unicode"
              }
            },
            "description": "Affected domain"
          },
          "monitor_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Monitor ID"
          },
          "incident_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Related incident"
          },
          "previous_value": {
            "description": "Value before the change (structure depends on the type)"
          },
          "new_value": {
            "description": "Value after the change"
          },
          "context": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Additional details"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time"
          }
        }
      },
      "DnsSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Snapshot ID"
          },
          "fingerprint": {
            "type": "string",
            "description": "Fingerprint of all records"
          },
          "source": {
            "type": "string",
            "description": "Query source"
          },
          "resolver": {
            "type": [
              "string",
              "null"
            ],
            "description": "Resolver used"
          },
          "first_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "First seen"
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last confirmed"
          },
          "previous_snapshot_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Previous snapshot"
          },
          "records": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "string"
                      }
                    ],
                    "minItems": 2,
                    "maxItems": 2,
                    "description": "MX: [priority, host]"
                  }
                ]
              }
            },
            "description": "Records per type (A, AAAA, MX, NS, TXT, …); omitted in the snapshot list"
          },
          "record_count": {
            "type": "integer",
            "description": "Total number of records"
          }
        }
      },
      "ZoneBackup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "State ID"
          },
          "domain_id": {
            "type": "string",
            "format": "uuid",
            "description": "Domain ID"
          },
          "integration_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Integration used for reading (null if it has been removed since)"
          },
          "provider": {
            "type": "string",
            "description": "DNS provider key",
            "example": "cloudflare"
          },
          "provider_name": {
            "type": "string",
            "description": "DNS provider name"
          },
          "zone": {
            "type": "string",
            "description": "Zone at the provider"
          },
          "hash": {
            "type": "string",
            "description": "SHA-256 of the canonically sorted record list"
          },
          "records_count": {
            "type": "integer",
            "description": "Number of records (without SOA)"
          },
          "changes": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "added": {
                "type": "integer"
              },
              "removed": {
                "type": "integer"
              },
              "changed": {
                "type": "integer"
              }
            },
            "description": "Difference to the previous state per name and type; null for the first state"
          },
          "previous_backup_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Previous state"
          },
          "first_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "First seen like this"
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last confirmed unchanged"
          },
          "records": {
            "type": "array",
            "description": "Single fetch only: all records, key = \"name|TYPE\"",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "ttl": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "content": {
                  "type": "string",
                  "description": "Content as in a zone file, TXT without quotes, host names without trailing dot"
                },
                "proxied": {
                  "type": "boolean",
                  "description": "Cloudflare only: behind the proxy"
                }
              }
            }
          },
          "diff": {
            "type": "array",
            "description": "Single fetch only: difference to the previous state per name and type",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "change": {
                  "type": "string",
                  "enum": [
                    "added",
                    "removed",
                    "changed"
                  ]
                },
                "previous": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                },
                "new": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      },
      "CheckResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID"
          },
          "checked_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time"
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "warning",
              "critical",
              "error"
            ],
            "description": "Result; `error` when the check could not run (see `error_code`)"
          },
          "latency_ms": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Response time in milliseconds"
          },
          "http_status": {
            "type": [
              "integer",
              "null"
            ],
            "description": "HTTP status (http only)"
          },
          "error_code": {
            "type": [
              "integer",
              "null"
            ],
            "enum": [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              null
            ],
            "description": "Reason for status error: 0 unknown, 1 resolver unavailable, 2 resolver timeout, 3 fetch unavailable, 4 target rejected by the guard, 5 timeout, 6 internal error, 7 outage disproved by the second location (not counted as downtime), 8 auxiliary probe from a second location (not counted towards availability), 9 domain does not exist (NXDOMAIN), 10 inconclusive (time budget: not all name servers were probed, no verdict)"
          },
          "location": {
            "type": [
              "string",
              "null"
            ],
            "description": "Check location, e.g. primary; null for older results"
          },
          "payload": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Raw data"
          },
          "findings": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Finding"
            },
            "description": "Findings"
          }
        }
      },
      "Uptime": {
        "type": "object",
        "properties": {
          "range": {
            "type": "string",
            "enum": [
              "24h",
              "7d",
              "30d",
              "90d"
            ],
            "description": "Range"
          },
          "source": {
            "type": "string",
            "enum": [
              "raw",
              "check_result_hourly",
              "check_result_daily"
            ],
            "description": "Resolution: single checks (24h), hours (7d, 30d) or days (90d)"
          },
          "summary": {
            "type": "object",
            "properties": {
              "uptime_ratio": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Availability 0 to 1"
              },
              "checks_total": {
                "type": "integer",
                "description": "Checks in the range"
              },
              "latency_p50": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Median response time in ms"
              },
              "latency_p95": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "95th percentile response time in ms"
              },
              "downtime_seconds": {
                "type": "integer",
                "description": "Downtime in seconds (not for 24h)"
              }
            }
          },
          "points": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Data points: per check for 24h (t, status, latency_ms), otherwise per hour or day (t, uptime_ratio, latency_p50, latency_p95, checks_failed, downtime_seconds)"
          }
        }
      },
      "Usage": {
        "type": "object",
        "properties": {
          "plan": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "description": "Plan key"
              },
              "name": {
                "type": "string",
                "description": "Plan name"
              },
              "domains": {
                "type": "integer",
                "description": "Domain limit"
              },
              "hostnames_per_domain": {
                "type": "integer",
                "description": "Hostnames per domain"
              },
              "retention_days": {
                "type": "integer",
                "description": "History in days"
              },
              "members": {
                "type": "integer",
                "description": "Members"
              },
              "channels": {
                "type": "integer",
                "description": "Channels"
              },
              "min_interval": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer"
                },
                "description": "Smallest check interval per check type in minutes"
              },
              "sms_per_month": {
                "type": "integer",
                "description": "SMS per month"
              }
            },
            "additionalProperties": true
          },
          "domains": {
            "type": "integer",
            "description": "Domains"
          },
          "monitors": {
            "type": "integer",
            "description": "Monitors"
          },
          "members": {
            "type": "integer",
            "description": "Members"
          },
          "channels": {
            "type": "integer",
            "description": "Channels"
          },
          "checks_24h": {
            "type": "integer",
            "description": "Checks in the last 24 hours"
          }
        }
      },
      "CustomerReport": {
        "type": "object",
        "description": "Monthly report; times are formatted for display (report language)",
        "properties": {
          "organization": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Agency"
              }
            }
          },
          "customer": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Customer"
              },
              "reference": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "period": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date"
              },
              "to": {
                "type": "string",
                "format": "date"
              },
              "label": {
                "type": "string",
                "description": "Month as text"
              },
              "month": {
                "type": "string",
                "description": "YYYY-MM"
              }
            }
          },
          "generated_at": {
            "type": "string",
            "description": "Generated at (formatted)"
          },
          "locale": {
            "type": "string",
            "description": "Report language"
          },
          "summary": {
            "type": "object",
            "properties": {
              "domains": {
                "type": "integer"
              },
              "healthy": {
                "type": "integer"
              },
              "warning": {
                "type": "integer"
              },
              "critical": {
                "type": "integer"
              },
              "uptime": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Availability in percent"
              },
              "incidents": {
                "type": "integer"
              },
              "critical_incidents": {
                "type": "integer"
              },
              "changes": {
                "type": "integer"
              },
              "downtime_minutes": {
                "type": "integer"
              }
            }
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Domain"
                },
                "health": {
                  "type": "string",
                  "enum": [
                    "healthy",
                    "warning",
                    "critical",
                    "unknown"
                  ]
                },
                "uptime": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "downtime_minutes": {
                  "type": "integer"
                },
                "incidents": {
                  "type": "integer"
                },
                "critical_incidents": {
                  "type": "integer"
                },
                "certificate_valid_to": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "certificate_days_left": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "certificate_issuer": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "domain_expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                },
                "registrar": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "additionalProperties": true
            }
          },
          "incidents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "domain": {
                  "type": "string",
                  "description": "Domain"
                },
                "type": {
                  "type": "string",
                  "description": "Incident type"
                },
                "label": {
                  "type": "string",
                  "description": "Label"
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "info",
                    "warning",
                    "critical"
                  ]
                },
                "started_at": {
                  "type": "string",
                  "description": "Start (formatted)"
                },
                "resolved_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "duration_minutes": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "acknowledged",
                    "resolved"
                  ]
                }
              }
            }
          },
          "changes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "domain": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "type": "string",
                  "description": "Event type"
                },
                "label": {
                  "type": "string",
                  "description": "Label"
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "info",
                    "warning",
                    "critical"
                  ]
                },
                "occurred_at": {
                  "type": "string",
                  "description": "Time (formatted)"
                },
                "previous": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "new": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "expiring_certificates": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Certificates expiring soon"
          },
          "expiring_domains": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Domains expiring soon"
          }
        },
        "additionalProperties": true
      },
      "Dashboard": {
        "type": "object",
        "properties": {
          "domains": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "description": "All domains"
              },
              "healthy": {
                "type": "integer",
                "description": "Healthy"
              },
              "warning": {
                "type": "integer",
                "description": "Warning"
              },
              "critical": {
                "type": "integer",
                "description": "Critical"
              },
              "unknown": {
                "type": "integer",
                "description": "Not checked yet"
              }
            }
          },
          "needs_attention": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Incident"
            },
            "description": "Open incidents, critical first (at most 50)"
          },
          "recent_changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "description": "Detected changes of the last 24 hours (at most 30)"
          },
          "usage": {
            "type": "object",
            "properties": {
              "domains": {
                "type": "integer",
                "description": "Domains in use"
              },
              "domains_limit": {
                "type": "integer",
                "description": "Domain limit of the plan"
              },
              "plan": {
                "type": "string",
                "description": "Plan key"
              },
              "plan_name": {
                "type": "string",
                "description": "Plan name"
              }
            }
          },
          "history": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "format": "date"
                },
                "incidents": {
                  "type": "integer"
                },
                "changes": {
                  "type": "integer"
                },
                "checks_failed": {
                  "type": "integer"
                },
                "checks_total": {
                  "type": "integer"
                }
              }
            },
            "description": "Last 14 days, one entry per day"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Generated at (cached for up to 30 seconds, ETag is set)"
          }
        }
      },
      "PageMeta": {
        "type": "object",
        "description": "Page-based pagination",
        "properties": {
          "current_page": {
            "type": "integer"
          },
          "from": {
            "type": [
              "integer",
              "null"
            ]
          },
          "to": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_page": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "path": {
            "type": "string"
          }
        }
      },
      "CursorMeta": {
        "type": "object",
        "description": "Cursor pagination: pass `next_cursor` as the `cursor` parameter of the next request, null at the end",
        "properties": {
          "path": {
            "type": "string"
          },
          "per_page": {
            "type": "integer"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "prev_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Links": {
        "type": "object",
        "properties": {
          "first": {
            "type": [
              "string",
              "null"
            ]
          },
          "last": {
            "type": [
              "string",
              "null"
            ]
          },
          "prev": {
            "type": [
              "string",
              "null"
            ]
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "description": "Error according to RFC 9457 (Content-Type application/problem+json)",
        "required": [
          "type",
          "title",
          "status"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "Error type, e.g. https://domainwarn.com/errors/not-found"
          },
          "title": {
            "type": "string",
            "description": "Short title"
          },
          "status": {
            "type": "integer",
            "description": "HTTP status"
          },
          "detail": {
            "type": "string",
            "description": "Explanation"
          }
        }
      },
      "PlanProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetails"
          },
          {
            "type": "object",
            "properties": {
              "plan": {
                "type": "string",
                "description": "Effective plan"
              },
              "suspended": {
                "type": "boolean",
                "description": "Suspended by the operator"
              }
            }
          }
        ]
      },
      "ValidationProblem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetails"
          },
          {
            "type": "object",
            "properties": {
              "errors": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "description": "Messages per field"
              }
            }
          }
        ]
      }
    }
  }
}