{
 "components": {
  "schemas": {
   "DomainIn": {
    "properties": {
     "customer_ref": {
      "anyOf": [
       {
        "maxLength": 128,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Ref"
     },
     "metadata": {
      "anyOf": [
       {
        "additionalProperties": {
         "anyOf": [
          {
           "type": "string"
          },
          {
           "type": "integer"
          },
          {
           "type": "number"
          },
          {
           "type": "boolean"
          },
          {
           "type": "null"
          }
         ]
        },
        "propertyNames": {
         "maxLength": 40,
         "minLength": 1
        },
        "type": "object"
       },
       {
        "type": "null"
       }
      ],
      "title": "Metadata"
     },
     "name": {
      "maxLength": 253,
      "minLength": 1,
      "title": "Name",
      "type": "string"
     },
     "origin": {
      "$ref": "#/components/schemas/OriginIn"
     }
    },
    "required": [
     "name",
     "origin"
    ],
    "title": "DomainIn",
    "type": "object"
   },
   "DomainPatch": {
    "properties": {
     "customer_ref": {
      "anyOf": [
       {
        "maxLength": 128,
        "minLength": 1,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Ref"
     },
     "health_checks": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Health Checks"
     },
     "metadata": {
      "anyOf": [
       {
        "additionalProperties": {
         "anyOf": [
          {
           "type": "string"
          },
          {
           "type": "integer"
          },
          {
           "type": "number"
          },
          {
           "type": "boolean"
          },
          {
           "type": "null"
          }
         ]
        },
        "propertyNames": {
         "maxLength": 40,
         "minLength": 1
        },
        "type": "object"
       },
       {
        "type": "null"
       }
      ],
      "title": "Metadata"
     }
    },
    "title": "DomainPatch",
    "type": "object"
   },
   "EndpointIn": {
    "properties": {
     "description": {
      "default": "",
      "maxLength": 200,
      "title": "Description",
      "type": "string"
     },
     "events": {
      "default": [
       "*"
      ],
      "items": {
       "maxLength": 40,
       "type": "string"
      },
      "maxItems": 13,
      "minItems": 1,
      "title": "Events",
      "type": "array"
     },
     "url": {
      "maxLength": 2048,
      "title": "Url",
      "type": "string"
     }
    },
    "required": [
     "url"
    ],
    "title": "EndpointIn",
    "type": "object"
   },
   "EndpointPatch": {
    "properties": {
     "description": {
      "anyOf": [
       {
        "maxLength": 200,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Description"
     },
     "enabled": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Enabled"
     },
     "events": {
      "anyOf": [
       {
        "items": {
         "maxLength": 40,
         "type": "string"
        },
        "maxItems": 13,
        "minItems": 1,
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "title": "Events"
     },
     "url": {
      "anyOf": [
       {
        "maxLength": 2048,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Url"
     }
    },
    "title": "EndpointPatch",
    "type": "object"
   },
   "HTTPValidationError": {
    "properties": {
     "detail": {
      "items": {
       "$ref": "#/components/schemas/ValidationError"
      },
      "title": "Detail",
      "type": "array"
     }
    },
    "title": "HTTPValidationError",
    "type": "object"
   },
   "HostIn": {
    "properties": {
     "name": {
      "maxLength": 253,
      "minLength": 1,
      "title": "Name",
      "type": "string"
     }
    },
    "required": [
     "name"
    ],
    "title": "HostIn",
    "type": "object"
   },
   "HostPatch": {
    "properties": {
     "enabled": {
      "title": "Enabled",
      "type": "boolean"
     }
    },
    "required": [
     "enabled"
    ],
    "title": "HostPatch",
    "type": "object"
   },
   "JobIn": {
    "properties": {
     "items": {
      "items": {},
      "minItems": 1,
      "title": "Items",
      "type": "array"
     },
     "kind": {
      "enum": [
       "create",
       "settings",
       "delete",
       "pause",
       "resume"
      ],
      "title": "Kind",
      "type": "string"
     },
     "settings": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/SettingsIn"
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "required": [
     "kind",
     "items"
    ],
    "title": "JobIn",
    "type": "object"
   },
   "NewOrigin": {
    "properties": {
     "address": {
      "maxLength": 64,
      "title": "Address",
      "type": "string"
     }
    },
    "required": [
     "address"
    ],
    "title": "NewOrigin",
    "type": "object"
   },
   "OrderIn": {
    "properties": {
     "ids": {
      "items": {
       "format": "uuid",
       "type": "string"
      },
      "maxItems": 500,
      "title": "Ids",
      "type": "array"
     }
    },
    "required": [
     "ids"
    ],
    "title": "OrderIn",
    "type": "object"
   },
   "OriginIn": {
    "properties": {
     "address": {
      "maxLength": 64,
      "title": "Address",
      "type": "string"
     },
     "port": {
      "default": 443,
      "maximum": 65535.0,
      "minimum": 1.0,
      "title": "Port",
      "type": "integer"
     },
     "protocol": {
      "default": "https",
      "enum": [
       "http",
       "https"
      ],
      "title": "Protocol",
      "type": "string"
     }
    },
    "required": [
     "address"
    ],
    "title": "OriginIn",
    "type": "object"
   },
   "OriginPatch": {
    "properties": {
     "address": {
      "anyOf": [
       {
        "maxLength": 64,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Address"
     },
     "enabled": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Enabled"
     }
    },
    "title": "OriginPatch",
    "type": "object"
   },
   "RouteIn": {
    "properties": {
     "enabled": {
      "default": true,
      "title": "Enabled",
      "type": "boolean"
     },
     "origin_id": {
      "format": "uuid",
      "title": "Origin Id",
      "type": "string"
     },
     "port": {
      "maximum": 65535.0,
      "minimum": 1.0,
      "title": "Port",
      "type": "integer"
     },
     "protocol": {
      "enum": [
       "http",
       "https"
      ],
      "title": "Protocol",
      "type": "string"
     }
    },
    "required": [
     "origin_id",
     "protocol",
     "port"
    ],
    "title": "RouteIn",
    "type": "object"
   },
   "RuleIn": {
    "properties": {
     "action": {
      "enum": [
       "block",
       "allow",
       "passive",
       "challenge",
       "invisible",
       "confirmation",
       "redirect"
      ],
      "title": "Action",
      "type": "string"
     },
     "enabled": {
      "default": true,
      "title": "Enabled",
      "type": "boolean"
     },
     "expression": {
      "maxLength": 8000,
      "minLength": 1,
      "title": "Expression",
      "type": "string"
     },
     "name": {
      "maxLength": 80,
      "minLength": 1,
      "title": "Name",
      "type": "string"
     },
     "status_code": {
      "default": 302,
      "enum": [
       301,
       302,
       307,
       308
      ],
      "title": "Status Code",
      "type": "integer"
     },
     "target": {
      "default": "",
      "maxLength": 2048,
      "title": "Target",
      "type": "string"
     }
    },
    "required": [
     "name",
     "expression",
     "action"
    ],
    "title": "RuleIn",
    "type": "object"
   },
   "SettingsIn": {
    "properties": {
     "allowlist": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Allowlist"
     },
     "blacklist": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Blacklist"
     },
     "challenge_ttl": {
      "anyOf": [
       {
        "maximum": 86400.0,
        "minimum": 60.0,
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Challenge Ttl"
     },
     "developer": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Developer"
     },
     "gzip": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Gzip"
     },
     "health_checks": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Health Checks"
     },
     "http2": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Http2"
     },
     "https": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Https"
     },
     "security": {
      "anyOf": [
       {
        "enum": [
         "passive",
         "challenge",
         "invisible"
        ],
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Security"
     },
     "sqli": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Sqli"
     },
     "tls": {
      "anyOf": [
       {
        "enum": [
         "1.0",
         "1.1",
         "1.2",
         "1.3"
        ],
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Tls"
     },
     "under_attack": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Under Attack"
     },
     "websockets": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Websockets"
     }
    },
    "title": "SettingsIn",
    "type": "object"
   },
   "ValidationError": {
    "properties": {
     "ctx": {
      "title": "Context",
      "type": "object"
     },
     "input": {
      "title": "Input"
     },
     "loc": {
      "items": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "integer"
        }
       ]
      },
      "title": "Location",
      "type": "array"
     },
     "msg": {
      "title": "Message",
      "type": "string"
     },
     "type": {
      "title": "Error Type",
      "type": "string"
     }
    },
    "required": [
     "loc",
     "msg",
     "type"
    ],
    "title": "ValidationError",
    "type": "object"
   }
  },
  "securitySchemes": {
   "HTTPBearer": {
    "bearerFormat": "hw_live_… or hw_test_…",
    "description": "An API key from the dashboard (Platform API → Keys).",
    "scheme": "bearer",
    "type": "http"
   }
  }
 },
 "info": {
  "description": "Protect your customers' domains with HotWall from your own systems.\n\nAuthenticate with `Authorization: Bearer <key>`: `hw_live_…` keys act on real domains, `hw_test_…` keys on a\nsandbox that behaves the same and never reaches the network. Every answer has an `X-Request-Id`; errors are\n`{\"error\": {\"code\", \"message\", \"detail\", \"request_id\"}}`. Send an `Idempotency-Key` header with a write to make\nretries safe (the first answer is replayed for 24 hours). Limits are per minute, per account and per key\n(`X-RateLimit-*` headers; `429` with `Retry-After`). Lists are pages: pass `next_cursor` back as `cursor`.",
  "title": "HotWall Platform API",
  "version": "1.0.0"
 },
 "openapi": "3.1.0",
 "paths": {
  "/v1/account": {
   "get": {
    "description": "This key and its account: the terms that apply and how much of them is used.",
    "operationId": "account_v1_account_get",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Account V1 Account Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     }
    },
    "security": [
     {
      "HTTPBearer": []
     }
    ],
    "summary": "Account",
    "tags": [
     "account"
    ]
   }
  },
  "/v1/billing": {
   "get": {
    "description": "The balance, what the domains cost now, the contract and whether anything is unpaid.",
    "operationId": "billing_v1_billing_get",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Billing V1 Billing Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "billing:read"
      ]
     }
    ],
    "summary": "Billing",
    "tags": [
     "billing"
    ]
   }
  },
  "/v1/billing/charges": {
   "get": {
    "description": "What was charged (days closed) and is being counted (today, `open_days`), per day, domain or\ncustomer_ref, from `from` to `to` (UTC days, both included, at most 366).",
    "operationId": "charges_v1_billing_charges_get",
    "parameters": [
     {
      "in": "query",
      "name": "from",
      "required": true,
      "schema": {
       "format": "date",
       "title": "From",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "to",
      "required": true,
      "schema": {
       "format": "date",
       "title": "To",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "group_by",
      "required": false,
      "schema": {
       "default": "day",
       "enum": [
        "day",
        "domain",
        "customer_ref"
       ],
       "title": "Group By",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "cursor",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Cursor"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 100,
       "maximum": 1000,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Charges V1 Billing Charges Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "billing:read"
      ]
     }
    ],
    "summary": "Charges",
    "tags": [
     "billing"
    ]
   }
  },
  "/v1/billing/ledger": {
   "get": {
    "description": "Every balance change, newest first; pass `next_cursor` back as `before`.",
    "operationId": "ledger_v1_billing_ledger_get",
    "parameters": [
     {
      "in": "query",
      "name": "before",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Before"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "maximum": 500,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Ledger V1 Billing Ledger Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "billing:read"
      ]
     }
    ],
    "summary": "Ledger",
    "tags": [
     "billing"
    ]
   }
  },
  "/v1/domains": {
   "get": {
    "description": "Oldest first, `limit` a page; pass `next_cursor` back as `cursor` for the next page.",
    "operationId": "list_domains_v1_domains_get",
    "parameters": [
     {
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "enum": [
          "pending",
          "active",
          "paused",
          "suspended"
         ],
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Status"
      }
     },
     {
      "in": "query",
      "name": "customer_ref",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Customer Ref"
      }
     },
     {
      "in": "query",
      "name": "name_prefix",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "maxLength": 253,
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Name Prefix"
      }
     },
     {
      "in": "query",
      "name": "cursor",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Cursor"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response List Domains V1 Domains Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:read"
      ]
     }
    ],
    "summary": "List Domains",
    "tags": [
     "domains"
    ]
   },
   "post": {
    "description": "Starts protecting a domain: it is `pending` until its DNS has the records in `dns.records`.",
    "operationId": "create_domain_v1_domains_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/DomainIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Create Domain V1 Domains Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:write"
      ]
     }
    ],
    "summary": "Create Domain",
    "tags": [
     "domains"
    ]
   }
  },
  "/v1/domains/{domain_id}": {
   "delete": {
    "description": "Stops protecting the domain and all its hosts, at once.",
    "operationId": "delete_domain_v1_domains__domain_id__delete",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "204": {
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:write"
      ]
     }
    ],
    "summary": "Delete Domain",
    "tags": [
     "domains"
    ]
   },
   "get": {
    "operationId": "get_domain_v1_domains__domain_id__get",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Get Domain V1 Domains  Domain Id  Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:read"
      ]
     }
    ],
    "summary": "Get Domain",
    "tags": [
     "domains"
    ]
   },
   "patch": {
    "description": "Only the fields sent change; send \"customer_ref\": null to clear it.",
    "operationId": "update_domain_v1_domains__domain_id__patch",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/DomainPatch"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Update Domain V1 Domains  Domain Id  Patch",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:write"
      ]
     }
    ],
    "summary": "Update Domain",
    "tags": [
     "domains"
    ]
   }
  },
  "/v1/domains/{domain_id}/analytics/events": {
   "get": {
    "operationId": "events_v1_domains__domain_id__analytics_events_get",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "from",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "From"
      }
     },
     {
      "in": "query",
      "name": "to",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "To"
      }
     },
     {
      "in": "query",
      "name": "host",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Host"
      }
     },
     {
      "in": "query",
      "name": "country",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Country"
      }
     },
     {
      "in": "query",
      "name": "action",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Action"
      }
     },
     {
      "in": "query",
      "name": "category",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Category"
      }
     },
     {
      "in": "query",
      "name": "method",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Method"
      }
     },
     {
      "in": "query",
      "name": "path",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Path"
      }
     },
     {
      "in": "query",
      "name": "ja4",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Ja4"
      }
     },
     {
      "in": "query",
      "name": "offset",
      "required": false,
      "schema": {
       "default": 0,
       "maximum": 10000,
       "minimum": 0,
       "title": "Offset",
       "type": "integer"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "maximum": 100,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Events V1 Domains  Domain Id  Analytics Events Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "analytics:read"
      ]
     }
    ],
    "summary": "Events",
    "tags": [
     "analytics"
    ]
   }
  },
  "/v1/domains/{domain_id}/analytics/series": {
   "get": {
    "description": "Log records by UTC interval, category and action; includes all connected hostnames by default.",
    "operationId": "series_v1_domains__domain_id__analytics_series_get",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "from",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "From"
      }
     },
     {
      "in": "query",
      "name": "to",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "To"
      }
     },
     {
      "in": "query",
      "name": "interval",
      "required": false,
      "schema": {
       "default": 60,
       "title": "Interval",
       "type": "integer"
      }
     },
     {
      "in": "query",
      "name": "host",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Host"
      }
     },
     {
      "in": "query",
      "name": "country",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Country"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Series V1 Domains  Domain Id  Analytics Series Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "analytics:read"
      ]
     }
    ],
    "summary": "Series",
    "tags": [
     "analytics"
    ]
   }
  },
  "/v1/domains/{domain_id}/analytics/summary": {
   "get": {
    "operationId": "summary_v1_domains__domain_id__analytics_summary_get",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "from",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "From"
      }
     },
     {
      "in": "query",
      "name": "to",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "To"
      }
     },
     {
      "in": "query",
      "name": "host",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Host"
      }
     },
     {
      "in": "query",
      "name": "country",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Country"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Summary V1 Domains  Domain Id  Analytics Summary Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "analytics:read"
      ]
     }
    ],
    "summary": "Summary",
    "tags": [
     "analytics"
    ]
   }
  },
  "/v1/domains/{domain_id}/analytics/tops/{kind}": {
   "get": {
    "operationId": "tops_v1_domains__domain_id__analytics_tops__kind__get",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "kind",
      "required": true,
      "schema": {
       "title": "Kind",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "from",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "From"
      }
     },
     {
      "in": "query",
      "name": "to",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "To"
      }
     },
     {
      "in": "query",
      "name": "host",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Host"
      }
     },
     {
      "in": "query",
      "name": "country",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Country"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 10,
       "maximum": 100,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Tops V1 Domains  Domain Id  Analytics Tops  Kind  Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "analytics:read"
      ]
     }
    ],
    "summary": "Tops",
    "tags": [
     "analytics"
    ]
   }
  },
  "/v1/domains/{domain_id}/analytics/unique-ips": {
   "get": {
    "operationId": "unique_ips_v1_domains__domain_id__analytics_unique_ips_get",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "from",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "From"
      }
     },
     {
      "in": "query",
      "name": "to",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "To"
      }
     },
     {
      "in": "query",
      "name": "host",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Host"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Unique Ips V1 Domains  Domain Id  Analytics Unique Ips Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "analytics:read"
      ]
     }
    ],
    "summary": "Unique Ips",
    "tags": [
     "analytics"
    ]
   }
  },
  "/v1/domains/{domain_id}/certificate": {
   "get": {
    "description": "The TLS certificate the edge serves for the domain (null until one is issued).",
    "operationId": "get_certificate_v1_domains__domain_id__certificate_get",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Get Certificate V1 Domains  Domain Id  Certificate Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:read"
      ]
     }
    ],
    "summary": "Get Certificate",
    "tags": [
     "domains"
    ]
   }
  },
  "/v1/domains/{domain_id}/hosts": {
   "post": {
    "description": "A subdomain, protected like the domain (its routes, settings and rules are copied).",
    "operationId": "add_host_v1_domains__domain_id__hosts_post",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/HostIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Add Host V1 Domains  Domain Id  Hosts Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:write"
      ]
     }
    ],
    "summary": "Add Host",
    "tags": [
     "hosts"
    ]
   }
  },
  "/v1/domains/{domain_id}/hosts/{host}": {
   "delete": {
    "operationId": "delete_host_v1_domains__domain_id__hosts__host__delete",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "host",
      "required": true,
      "schema": {
       "title": "Host",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Delete Host V1 Domains  Domain Id  Hosts  Host  Delete",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:write"
      ]
     }
    ],
    "summary": "Delete Host",
    "tags": [
     "hosts"
    ]
   },
   "patch": {
    "operationId": "update_host_v1_domains__domain_id__hosts__host__patch",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "host",
      "required": true,
      "schema": {
       "title": "Host",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/HostPatch"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Update Host V1 Domains  Domain Id  Hosts  Host  Patch",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:write"
      ]
     }
    ],
    "summary": "Update Host",
    "tags": [
     "hosts"
    ]
   }
  },
  "/v1/domains/{domain_id}/hosts/{host}/routes": {
   "put": {
    "description": "Where one host sends its traffic: replaces the list (at least one live route).",
    "operationId": "set_routes_v1_domains__domain_id__hosts__host__routes_put",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "host",
      "required": true,
      "schema": {
       "title": "Host",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "items": {
         "$ref": "#/components/schemas/RouteIn"
        },
        "maxItems": 100,
        "title": "Body",
        "type": "array"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Set Routes V1 Domains  Domain Id  Hosts  Host  Routes Put",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "origins:write"
      ]
     }
    ],
    "summary": "Set Routes",
    "tags": [
     "origins"
    ]
   }
  },
  "/v1/domains/{domain_id}/origins": {
   "post": {
    "description": "Another origin server (public IPv4); no traffic goes to it until a host routes to it.",
    "operationId": "add_origin_v1_domains__domain_id__origins_post",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/NewOrigin"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Add Origin V1 Domains  Domain Id  Origins Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "origins:write"
      ]
     }
    ],
    "summary": "Add Origin",
    "tags": [
     "origins"
    ]
   }
  },
  "/v1/domains/{domain_id}/origins/{origin_id}": {
   "delete": {
    "operationId": "delete_origin_v1_domains__domain_id__origins__origin_id__delete",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "origin_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Origin Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Delete Origin V1 Domains  Domain Id  Origins  Origin Id  Delete",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "origins:write"
      ]
     }
    ],
    "summary": "Delete Origin",
    "tags": [
     "origins"
    ]
   },
   "patch": {
    "operationId": "update_origin_v1_domains__domain_id__origins__origin_id__patch",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "origin_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Origin Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/OriginPatch"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Update Origin V1 Domains  Domain Id  Origins  Origin Id  Patch",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "origins:write"
      ]
     }
    ],
    "summary": "Update Origin",
    "tags": [
     "origins"
    ]
   }
  },
  "/v1/domains/{domain_id}/pause": {
   "post": {
    "description": "Traffic goes straight to the origin, unprotected, until resumed.",
    "operationId": "pause_domain_v1_domains__domain_id__pause_post",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Pause Domain V1 Domains  Domain Id  Pause Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:write"
      ]
     }
    ],
    "summary": "Pause Domain",
    "tags": [
     "domains"
    ]
   }
  },
  "/v1/domains/{domain_id}/resume": {
   "post": {
    "operationId": "resume_domain_v1_domains__domain_id__resume_post",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Resume Domain V1 Domains  Domain Id  Resume Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:write"
      ]
     }
    ],
    "summary": "Resume Domain",
    "tags": [
     "domains"
    ]
   }
  },
  "/v1/domains/{domain_id}/rules": {
   "get": {
    "operationId": "list_rules_v1_domains__domain_id__rules_get",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response List Rules V1 Domains  Domain Id  Rules Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:read"
      ]
     }
    ],
    "summary": "List Rules",
    "tags": [
     "protection"
    ]
   },
   "post": {
    "description": "A WAF rule (block, allow, a challenge) or a redirect, on the domain and all its hosts; it runs after\nthe rules before it (priority).\n\n`expression` fields: host, method, path, query, uri_full, referer, ssl, http_version, ip, country, asn,\nuser_agent, header[\"Name\"]. Operators: == != contains in [..]; combine with && || ! and parentheses.\nExamples: `path contains \"/wp-\"`, `method in [\"POST\", \"PUT\"]`, `ip in [\"203.0.113.0/24\", \"2001:db8::/32\"]`,\n`(path contains \"/admin\" && country != \"RU\")`, `header[\"User-Agent\"] contains \"bot\"`.\nAn expression the edge doesn't accept is a 400 invalid_rule.",
    "operationId": "add_rule_v1_domains__domain_id__rules_post",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/RuleIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Add Rule V1 Domains  Domain Id  Rules Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "protection:write"
      ]
     }
    ],
    "summary": "Add Rule",
    "tags": [
     "protection"
    ]
   }
  },
  "/v1/domains/{domain_id}/rules/order": {
   "post": {
    "description": "Every rule id of the domain, in the order they should run.",
    "operationId": "order_rules_v1_domains__domain_id__rules_order_post",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/OrderIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Order Rules V1 Domains  Domain Id  Rules Order Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "protection:write"
      ]
     }
    ],
    "summary": "Order Rules",
    "tags": [
     "protection"
    ]
   }
  },
  "/v1/domains/{domain_id}/rules/{rule_id}": {
   "delete": {
    "operationId": "delete_rule_v1_domains__domain_id__rules__rule_id__delete",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "rule_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Rule Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "204": {
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "protection:write"
      ]
     }
    ],
    "summary": "Delete Rule",
    "tags": [
     "protection"
    ]
   },
   "put": {
    "operationId": "update_rule_v1_domains__domain_id__rules__rule_id__put",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "rule_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Rule Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/RuleIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Update Rule V1 Domains  Domain Id  Rules  Rule Id  Put",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "protection:write"
      ]
     }
    ],
    "summary": "Update Rule",
    "tags": [
     "protection"
    ]
   }
  },
  "/v1/domains/{domain_id}/settings": {
   "get": {
    "operationId": "get_domain_settings_v1_domains__domain_id__settings_get",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Get Domain Settings V1 Domains  Domain Id  Settings Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:read"
      ]
     }
    ],
    "summary": "Get Domain Settings",
    "tags": [
     "protection"
    ]
   },
   "patch": {
    "description": "Only the settings sent change, on the domain and all its hosts.",
    "operationId": "update_settings_v1_domains__domain_id__settings_patch",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/SettingsIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Update Settings V1 Domains  Domain Id  Settings Patch",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "protection:write"
      ]
     }
    ],
    "summary": "Update Settings",
    "tags": [
     "protection"
    ]
   }
  },
  "/v1/domains/{domain_id}/verify": {
   "post": {
    "description": "Checks the DNS now (the worker also checks pending domains by itself) and says what it found.",
    "operationId": "verify_domain_v1_domains__domain_id__verify_post",
    "parameters": [
     {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Domain Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Verify Domain V1 Domains  Domain Id  Verify Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:write"
      ]
     }
    ],
    "summary": "Verify Domain",
    "tags": [
     "domains"
    ]
   }
  },
  "/v1/events": {
   "get": {
    "description": "The last 30 days of events, oldest first after `after` (an event number): poll with the last\none you saw, or catch up after an outage of your webhook receiver.",
    "operationId": "list_events_v1_events_get",
    "parameters": [
     {
      "in": "query",
      "name": "type",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Type"
      }
     },
     {
      "in": "query",
      "name": "after",
      "required": false,
      "schema": {
       "default": 0,
       "title": "After",
       "type": "integer"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 100,
       "maximum": 1000,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response List Events V1 Events Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "domains:read"
      ]
     }
    ],
    "summary": "List Events",
    "tags": [
     "events"
    ]
   }
  },
  "/v1/health": {
   "get": {
    "operationId": "health_v1_health_get",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": {
          "type": "boolean"
         },
         "title": "Response Health V1 Health Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     }
    },
    "summary": "Health",
    "tags": [
     "meta"
    ]
   }
  },
  "/v1/jobs": {
   "get": {
    "description": "Newest first; pass `next_cursor` back as `before`.",
    "operationId": "list_jobs_v1_jobs_get",
    "parameters": [
     {
      "in": "query",
      "name": "before",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date-time",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Before"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 20,
       "maximum": 100,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response List Jobs V1 Jobs Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": []
     }
    ],
    "summary": "List Jobs",
    "tags": [
     "jobs"
    ]
   },
   "post": {
    "description": "Queues the work; follow it with GET /v1/jobs/{id} (and the job.completed webhook).",
    "operationId": "create_job_v1_jobs_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/JobIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Create Job V1 Jobs Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": []
     }
    ],
    "summary": "Create Job",
    "tags": [
     "jobs"
    ]
   }
  },
  "/v1/jobs/{job_id}": {
   "get": {
    "operationId": "get_job_v1_jobs__job_id__get",
    "parameters": [
     {
      "in": "path",
      "name": "job_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Job Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Get Job V1 Jobs  Job Id  Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": []
     }
    ],
    "summary": "Get Job",
    "tags": [
     "jobs"
    ]
   }
  },
  "/v1/jobs/{job_id}/cancel": {
   "post": {
    "description": "Items not started yet are cancelled; the batch in progress finishes.",
    "operationId": "cancel_job_v1_jobs__job_id__cancel_post",
    "parameters": [
     {
      "in": "path",
      "name": "job_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Job Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Cancel Job V1 Jobs  Job Id  Cancel Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": []
     }
    ],
    "summary": "Cancel Job",
    "tags": [
     "jobs"
    ]
   }
  },
  "/v1/jobs/{job_id}/items": {
   "get": {
    "description": "Each item's outcome, in request order: `domain_id` once done, `error` (a code) when it failed.",
    "operationId": "job_items_v1_jobs__job_id__items_get",
    "parameters": [
     {
      "in": "path",
      "name": "job_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Job Id",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "enum": [
          "pending",
          "running",
          "done",
          "failed",
          "cancelled"
         ],
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Status"
      }
     },
     {
      "in": "query",
      "name": "cursor",
      "required": false,
      "schema": {
       "default": -1,
       "title": "Cursor",
       "type": "integer"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 100,
       "maximum": 1000,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Job Items V1 Jobs  Job Id  Items Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": []
     }
    ],
    "summary": "Job Items",
    "tags": [
     "jobs"
    ]
   }
  },
  "/v1/webhooks": {
   "get": {
    "operationId": "list_endpoints_v1_webhooks_get",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response List Endpoints V1 Webhooks Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "webhooks:write"
      ]
     }
    ],
    "summary": "List Endpoints",
    "tags": [
     "webhooks"
    ]
   },
   "post": {
    "description": "`secret` is shown only now (and after rotate-secret): keep it to check signatures. Test keys'\nendpoints get sandbox events, live keys' the real ones.",
    "operationId": "create_endpoint_v1_webhooks_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/EndpointIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Create Endpoint V1 Webhooks Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "webhooks:write"
      ]
     }
    ],
    "summary": "Create Endpoint",
    "tags": [
     "webhooks"
    ]
   }
  },
  "/v1/webhooks/deliveries/{delivery_id}/retry": {
   "post": {
    "description": "Sends a delivery again now (also a dead one).",
    "operationId": "retry_v1_webhooks_deliveries__delivery_id__retry_post",
    "parameters": [
     {
      "in": "path",
      "name": "delivery_id",
      "required": true,
      "schema": {
       "title": "Delivery Id",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Retry V1 Webhooks Deliveries  Delivery Id  Retry Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "webhooks:write"
      ]
     }
    ],
    "summary": "Retry",
    "tags": [
     "webhooks"
    ]
   }
  },
  "/v1/webhooks/{endpoint_id}": {
   "delete": {
    "operationId": "delete_endpoint_v1_webhooks__endpoint_id__delete",
    "parameters": [
     {
      "in": "path",
      "name": "endpoint_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Endpoint Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "204": {
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "webhooks:write"
      ]
     }
    ],
    "summary": "Delete Endpoint",
    "tags": [
     "webhooks"
    ]
   },
   "patch": {
    "description": "Switching an endpoint back on (enabled: true) also clears its failure record.",
    "operationId": "update_endpoint_v1_webhooks__endpoint_id__patch",
    "parameters": [
     {
      "in": "path",
      "name": "endpoint_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Endpoint Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/EndpointPatch"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Update Endpoint V1 Webhooks  Endpoint Id  Patch",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "webhooks:write"
      ]
     }
    ],
    "summary": "Update Endpoint",
    "tags": [
     "webhooks"
    ]
   }
  },
  "/v1/webhooks/{endpoint_id}/deliveries": {
   "get": {
    "operationId": "deliveries_v1_webhooks__endpoint_id__deliveries_get",
    "parameters": [
     {
      "in": "path",
      "name": "endpoint_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Endpoint Id",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Status"
      }
     },
     {
      "in": "query",
      "name": "before",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Before"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 50,
       "maximum": 200,
       "minimum": 1,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Deliveries V1 Webhooks  Endpoint Id  Deliveries Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "webhooks:write"
      ]
     }
    ],
    "summary": "Deliveries",
    "tags": [
     "webhooks"
    ]
   }
  },
  "/v1/webhooks/{endpoint_id}/rotate-secret": {
   "post": {
    "description": "A new signing secret, used from the next delivery on.",
    "operationId": "rotate_secret_v1_webhooks__endpoint_id__rotate_secret_post",
    "parameters": [
     {
      "in": "path",
      "name": "endpoint_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Endpoint Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Rotate Secret V1 Webhooks  Endpoint Id  Rotate Secret Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "webhooks:write"
      ]
     }
    ],
    "summary": "Rotate Secret",
    "tags": [
     "webhooks"
    ]
   }
  },
  "/v1/webhooks/{endpoint_id}/test": {
   "post": {
    "description": "Sends a `ping` event to this endpoint only (within seconds).",
    "operationId": "test_endpoint_v1_webhooks__endpoint_id__test_post",
    "parameters": [
     {
      "in": "path",
      "name": "endpoint_id",
      "required": true,
      "schema": {
       "format": "uuid",
       "title": "Endpoint Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Test Endpoint V1 Webhooks  Endpoint Id  Test Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "security": [
     {
      "HTTPBearer": [
       "webhooks:write"
      ]
     }
    ],
    "summary": "Test Endpoint",
    "tags": [
     "webhooks"
    ]
   }
  }
 }
}
