{
  "openapi": "3.1.1",
  "info": {
    "title": "Fraud Blocker API",
    "description": "\n## Introduction\nThis page hosts documentation of the Fraud Blocker Data API. Leverage our API to sync your Fraud Blocker reporting data into the apps you love ❤️ such as dashboards, CRMs, spreadsheets and more.\n<br>\n<br>\n## Authentication\nTo access our APIs you will need our API key. This is available in the Fraud Blocker web app at https://app.fraudblocker.com/account/api\n<br>\n<br>\n## Usage Costs\nAll API requests and usage are available for free to all plan types during a limited-time introductory period. Once this period is over, this section will be updated.\n<br>\n<br>\nEmail verification is metered separately: each verification counts toward your plan's monthly email verification allowance, shared with the bulk verifications you run in the web app.\n<br>\n<br>\n## Resources\n* Fraud Blocker website - https://fraudblocker.com\n* Fraud Blocker web app - https://app.fraudblocker.com/login\n* Help docs - https://help.fraudblocker.com/\n* Zapier API integration (no code option) - https://help.fraudblocker.com/en/articles/10263302-how-to-use-fraud-blocker-s-api\n* Support - https://fraudblocker.com/contact-us\n",
    "version": "0.0.1",
    "contact": {
      "name": "Support at Fraud Blocker",
      "url": "https://fraudblocker.com",
      "email": "info@fraudblocker.com"
    },
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/license/MIT"
    }
  },
  "servers": [
    {
      "url": "https://backend.fraudblocker.com/api",
      "description": "Responds with your reqFest data",
      "variables": {
        "protocol": {
          "enum": [
            "https"
          ],
          "default": "https"
        },
        "path": {
          "default": ""
        }
      }
    }
  ],
  "security": [
    {
      "apiKeyHeader": []
    }
  ],
  "tags": [
    {
      "name": "Authentication",
      "description": "All endpoints require authentication via the `api_key` header value. To obtain your api key please visit your FraudBlocker account."
    },
    {
      "name": "Reports",
      "description": "Aggregate account reports available"
    },
    {
      "name": "Domains",
      "description": "Manage the websites (domains) on your account. Each website is identified by its `sid` (site ID), which is returned when the website is added."
    },
    {
      "name": "IP Blocking",
      "description": "Read the IP exclusion list Fraud Blocker is enforcing in Google Ads for a website, and manage the website's own blocklist and allowlist."
    },
    {
      "name": "Email Verification",
      "description": "Verify the deliverability and quality of email addresses. Each verification counts toward your plan's monthly email verification allowance."
    }
  ],
  "paths": {
    "/user/zapier/me": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Test API Authentication",
        "description": "Returns `{\"message\": \"ok\"}` when the API is reachable. Note this endpoint does not check your API key — a successful response confirms connectivity, not that your key is valid. To verify a key, call `GET /domains`, which returns `401` for an invalid key.\n",
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Status message",
                      "example": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bigquery/click-report": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Create a Report for Domain-Level Data",
        "description": "You can pull data for a specific domain in your account OR you can fetch an account wide report. Do not pass the `domain` param if the `all` parameter is set to `true`, the opposite also applies.",
        "operationId": "getAllData",
        "security": [
          {}
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DomainParam"
          },
          {
            "$ref": "#/components/parameters/RangeParam"
          },
          {
            "$ref": "#/components/parameters/StartDateParam"
          },
          {
            "$ref": "#/components/parameters/EndDateParam"
          },
          {
            "$ref": "#/components/parameters/AllDomainsParam"
          }
        ],
        "x-parameter-rules": [
          {
            "oneOf": [
              {
                "required": [
                  "domain"
                ],
                "not": {
                  "required": [
                    "all"
                  ]
                }
              },
              {
                "required": [
                  "all"
                ],
                "properties": {
                  "all": {
                    "enum": [
                      true
                    ]
                  }
                },
                "not": {
                  "required": [
                    "domain"
                  ]
                }
              }
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                }
              }
            }
          }
        }
      }
    },
    "/domains": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "List Websites",
        "description": "Returns the websites (domains) on your account, each with its `sid` (site ID). By default only active websites are returned; set `include_archived=true` to also include archived (soft-deleted) websites.\n",
        "operationId": "listDomains",
        "security": [
          {}
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IncludeArchivedParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Add a Website",
        "description": "Adds a website (domain) to your account and returns its `sid` (site ID). The domain is normalised to its canonical form (lower-cased, without a scheme or a leading `www.`). If the website already exists and is active, `409 domain_exists` is returned. If it exists but was previously archived, it is automatically restored and its original `sid` is returned. Adding (or restoring) a website counts toward your plan's website allowance; when the allowance is reached the request returns `402 domain_limit_reached`.\n",
        "operationId": "addDomain",
        "security": [
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDomainRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainCreated"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/DomainLimitReached"
          },
          "409": {
            "$ref": "#/components/responses/DomainConflict"
          }
        }
      }
    },
    "/domains/{sid}": {
      "delete": {
        "tags": [
          "Domains"
        ],
        "summary": "Archive a Website",
        "description": "Archives (soft-deletes) the website identified by `sid`. Archiving is not a permanent delete: archived websites stop counting toward your plan's website allowance and can be restored later from the web app or by adding the same domain again. An account must always keep at least one active website, so archiving your only active website returns `409 last_active_domain`.\n",
        "operationId": "archiveDomain",
        "security": [
          {}
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SidParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainArchived"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/DomainConflict"
          }
        }
      }
    },
    "/ips": {
      "get": {
        "tags": [
          "IP Blocking"
        ],
        "summary": "List Blocked and Allowed IPs",
        "description": "Returns the IP exclusion list Fraud Blocker last sent to Google Ads for this website, together with the website's allowlist.\n\n`blocked` is what is actually being enforced, read back from the last sync rather than recalculated — so it already reflects your blocking settings, the 7-day detection window, and the 500-entry limit Google Ads applies per campaign. It is refreshed every 2 hours; `synced_at` tells you when. A `synced_at` of `null` means this website has never been synced, usually because no Google Ads account is connected or the tracker has not been verified yet. IP blocking applies to Google Ads campaigns only.\n\nRanges are returned exactly as they were sent to Google — a wildcard entry such as `196.10.252.*` appears as the single entry `196.10.252.0/24`, never as an expanded list of addresses.\n\n`allowed` is your allowlist and is always current, not tied to the sync.\n",
        "operationId": "listIps",
        "security": [
          {}
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DomainQueryParam"
          },
          {
            "$ref": "#/components/parameters/SidQueryParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/ips/block": {
      "post": {
        "tags": [
          "IP Blocking"
        ],
        "summary": "Block IPs",
        "description": "Adds addresses to the website's blocklist — the same list shown under Manage IP Blocking in the web app, so entries added here appear there and vice versa. Blocks reach Google Ads on the next sync, within about 2 hours.\n\nAccepts single addresses (`203.0.113.44`), last-octet wildcards (`196.10.252.*`), CIDR ranges (`218.100.46.0/23`) and IPv6. Ranges are stored and sent as written; they are never expanded into individual addresses.\n\nBlocking an address that is already on the list is not an error — it is reported as `already_present` and creates no duplicate.\n",
        "operationId": "blockIps",
        "security": [
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IpWriteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpWriteResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/IpListLimit"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/ips/unblock": {
      "post": {
        "tags": [
          "IP Blocking"
        ],
        "summary": "Unblock IPs",
        "description": "Removes addresses you previously added. By default it removes them from the blocklist; set `list` to `allow` to remove allowlist entries instead.\n\nThis removes your own entry only. If an address is also being blocked automatically because it looks fraudulent, it will be blocked again on the next sync — use `POST /ips/allow` to keep an address off the list permanently.\n\nRemoving an address that is not on the list is not an error; it is reported as `not_found`.\n",
        "operationId": "unblockIps",
        "security": [
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IpUnblockRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpWriteResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/ips/allow": {
      "post": {
        "tags": [
          "IP Blocking"
        ],
        "summary": "Allow IPs (never block)",
        "description": "Adds addresses to the website's allowlist, the same list shown under Manage IP Blocking in the web app. Allowed addresses are removed from the block list before it is sent to Google Ads, so this is how you stop an address being blocked automatically — for example an office IP that keeps triggering detection.\n\nAllowing a range covers every address inside it. Accepts the same address formats as `POST /ips/block`.\n",
        "operationId": "allowIps",
        "security": [
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IpWriteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpWriteResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/IpListLimit"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/email-validations/verify": {
      "get": {
        "tags": [
          "Email Verification"
        ],
        "summary": "Verify an Email Address",
        "description": "Verifies the deliverability of a single email address and returns its validation status. Each verification counts toward your plan's monthly email verification allowance and appears in your account alongside the bulk verifications you run in the web app. Auto-verifications from your lead forms draw from the same monthly allowance. When your monthly limit is reached, requests return `402` until your plan renews or additional credits are added.\n",
        "operationId": "verifyEmail",
        "security": [
          {}
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/EmailParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailVerification"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "api_key",
        "description": "API key request header"
      }
    },
    "parameters": {
      "DomainParam": {
        "name": "domain",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "description": "Website domain to query. Required unless `all=true` is set; the two are mutually exclusive."
        }
      },
      "RangeParam": {
        "name": "range",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "1d",
            "7d",
            "30d"
          ],
          "description": "Predefined time range. Leave blank if using start_date/end_date — the two are mutually exclusive."
        }
      },
      "StartDateParam": {
        "name": "start_date",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date",
          "example": "2016-05-01",
          "description": "The start date for a custom range (YYYY-MM-DD)."
        }
      },
      "EndDateParam": {
        "name": "end_date",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date",
          "example": "2016-05-31",
          "description": "The end date for a custom range (YYYY-MM-DD)."
        }
      },
      "AllDomainsParam": {
        "name": "all",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false,
          "description": "Set to true to query all domains"
        }
      },
      "EmailParam": {
        "name": "email",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "format": "email",
          "example": "john@example.com",
          "description": "The email address to verify."
        }
      },
      "SidParam": {
        "name": "sid",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "description": "The site ID (sid) of the website.",
          "example": "V1StGXR8_Z5jdHi6B-myT"
        }
      },
      "DomainQueryParam": {
        "name": "domain",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "description": "The website domain. Provide either this or `sid`.",
          "example": "example.com"
        }
      },
      "SidQueryParam": {
        "name": "sid",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "description": "The site ID (sid) of the website. Provide either this or `domain`.",
          "example": "V1StGXR8_Z5jdHi6B-myT"
        }
      },
      "IncludeArchivedParam": {
        "name": "include_archived",
        "in": "query",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": false,
          "description": "Set to true to include archived (soft-deleted) websites in the response."
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BadRequestError"
            }
          },
          "application/xml": {
            "schema": {
              "$ref": "#/components/schemas/BadRequestError"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ForbiddenError"
            }
          },
          "application/xml": {
            "schema": {
              "$ref": "#/components/schemas/ForbiddenError"
            }
          }
        }
      },
      "NotFound": {
        "description": "NotFound",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NotFoundError"
            }
          },
          "application/xml": {
            "schema": {
              "$ref": "#/components/schemas/NotFoundError"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UnauthorizedError"
            }
          },
          "application/xml": {
            "schema": {
              "$ref": "#/components/schemas/UnauthorizedError"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "Payment Required — the account's monthly email verification allowance has been reached.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LimitReachedError"
            }
          }
        }
      },
      "DomainLimitReached": {
        "description": "Payment Required — the account's plan website allowance has been reached, or there is no active plan.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/DomainLimitReachedError"
            }
          }
        }
      },
      "DomainConflict": {
        "description": "Conflict — the request conflicts with the current state of the account's websites.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/DomainConflictError"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too Many Requests — the API key has exceeded its hourly request allowance.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RateLimitedError"
            }
          }
        }
      },
      "IpListLimit": {
        "description": "Unprocessable — the request would put too many addresses on the list, or sends more than 100 addresses at once.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/IpListLimitError"
            }
          }
        }
      },
      "Conflict": {
        "description": "Conflict",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Conflict"
            }
          },
          "application/xml": {
            "schema": {
              "$ref": "#/components/schemas/Conflict"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "Unprocessable Entity",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UnprocessableEntity"
            }
          },
          "application/xml": {
            "schema": {
              "$ref": "#/components/schemas/UnprocessableEntity"
            }
          }
        }
      }
    },
    "schemas": {
      "Report": {
        "description": "Analytics report containing click data, savings, and fraud metrics",
        "type": "object",
        "xml": {
          "name": "report"
        },
        "properties": {
          "sid": {
            "type": "string",
            "description": "Site identifier",
            "examples": [
              "[your site id]"
            ]
          },
          "domain_name": {
            "type": "string",
            "description": "Website domain, or \"all\" for an account-wide report",
            "examples": [
              "yourdomain.com"
            ]
          },
          "total_clicks": {
            "type": "integer",
            "description": "Total number of clicks recorded",
            "examples": [
              398
            ]
          },
          "total_savings": {
            "type": "number",
            "format": "float",
            "description": "Total amount saved",
            "examples": [
              38.19
            ]
          },
          "total_savings_currency": {
            "type": "string",
            "description": "Currency code for savings amount",
            "examples": [
              "USD"
            ]
          },
          "total_savings_pretty": {
            "type": "string",
            "description": "Formatted savings amount with currency symbol",
            "examples": [
              "$38.19"
            ]
          },
          "fraud_score": {
            "type": "number",
            "format": "float",
            "description": "Overall fraud score rating",
            "examples": [
              7.29
            ]
          },
          "invalid_clicks": {
            "type": "integer",
            "description": "Number of invalid clicks detected",
            "examples": [
              87
            ]
          },
          "invalid_clicks_pct": {
            "type": "number",
            "format": "float",
            "description": "Percentage of invalid clicks out of total clicks",
            "examples": [
              0.22
            ]
          },
          "google_clicks": {
            "type": "integer",
            "description": "Total tracked clicks from Google Ads",
            "examples": [
              373
            ]
          },
          "meta_clicks": {
            "type": "integer",
            "description": "Total tracked clicks from Meta platforms",
            "examples": [
              25
            ]
          },
          "mobile_device_clicks": {
            "type": "integer",
            "description": "Number of invalid clicks from mobile devices",
            "examples": [
              27
            ]
          },
          "desktop_device_clicks": {
            "type": "integer",
            "description": "Number of invalid clicks from desktop devices",
            "examples": [
              60
            ]
          },
          "excessive_clicks_inv_clicks": {
            "type": "number",
            "format": "float",
            "description": "Share of invalid clicks attributed to excessive clicking, weighted by each fraud signal's contribution to the overall fraud score",
            "examples": [
              0.56
            ]
          },
          "accidental_inv_clicks": {
            "type": "number",
            "format": "float",
            "description": "Share of invalid clicks attributed to accidental clicking, weighted by each fraud signal's contribution to the overall fraud score",
            "examples": [
              0.09
            ]
          },
          "abusive_inv_clicks": {
            "type": "number",
            "format": "float",
            "description": "Share of invalid clicks attributed to blacklist / abuse / poor IP history signals, weighted by each fraud signal's contribution to the overall fraud score",
            "examples": [
              0.28
            ]
          },
          "vpn_inv_clicks": {
            "type": "number",
            "format": "float",
            "description": "Share of invalid clicks attributed to VPN / datacenter / Tor signals, weighted by each fraud signal's contribution to the overall fraud score",
            "examples": [
              0.02
            ]
          },
          "risky_geo_inv_clicks": {
            "type": "number",
            "format": "float",
            "description": "Share of invalid clicks attributed to risky geographical locations, weighted by each fraud signal's contribution to the overall fraud score",
            "examples": [
              0.03
            ]
          },
          "risky_device_inv_clicks": {
            "type": "number",
            "format": "float",
            "description": "Share of invalid clicks attributed to risky devices, weighted by each fraud signal's contribution to the overall fraud score",
            "examples": [
              0.01
            ]
          },
          "risky_mouse_inv_clicks": {
            "type": "number",
            "format": "float",
            "description": "Share of invalid clicks attributed to risky mouse dynamics, weighted by each fraud signal's contribution to the overall fraud score",
            "examples": [
              0.02
            ]
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "First day covered by the report, in the account owner's timezone",
            "examples": [
              "2026-07-22"
            ]
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Last day covered by the report, in the account owner's timezone",
            "examples": [
              "2026-08-20"
            ]
          },
          "timezone": {
            "type": "string",
            "description": "The account owner's timezone, which the report window is measured in",
            "examples": [
              "America/New_York"
            ]
          }
        },
        "Credentials": {
          "description": "Credentials to authenticate a user",
          "type": "object",
          "required": [
            "email",
            "password"
          ],
          "properties": {
            "email": {
              "type": "string",
              "format": "email",
              "examples": [
                "marc@scalar.com"
              ]
            },
            "password": {
              "type": "string",
              "writeOnly": true,
              "examples": [
                "i-love-scalar",
                "i-love-OSS",
                "i-love-code"
              ]
            }
          }
        }
      },
      "AddDomainRequest": {
        "description": "Request body for adding a website.",
        "type": "object",
        "required": [
          "domain_name"
        ],
        "properties": {
          "domain_name": {
            "type": "string",
            "description": "The website domain to add. Normalised to its canonical form (lower-cased, no scheme, no leading \"www.\").",
            "examples": [
              "example.com"
            ]
          }
        }
      },
      "Domain": {
        "description": "A website (domain) on your account.",
        "type": "object",
        "properties": {
          "sid": {
            "type": "string",
            "description": "The site ID (sid) — the unique identifier for this website.",
            "examples": [
              "V1StGXR8_Z5jdHi6B-myT"
            ]
          },
          "domain_name": {
            "type": "string",
            "description": "The website domain.",
            "examples": [
              "example.com"
            ]
          },
          "is_archived": {
            "type": "boolean",
            "description": "Whether the website is archived (soft-deleted).",
            "examples": [
              false
            ]
          },
          "created_on": {
            "type": "string",
            "description": "Timestamp when the website was added.",
            "examples": [
              "2026-07-14 18:03:11.043"
            ]
          }
        }
      },
      "DomainList": {
        "description": "The websites on your account.",
        "type": "object",
        "properties": {
          "domains": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Domain"
            }
          }
        }
      },
      "DomainCreated": {
        "description": "The website that was added, or the archived website that was restored.",
        "type": "object",
        "properties": {
          "sid": {
            "type": "string",
            "description": "The site ID (sid) of the website.",
            "examples": [
              "V1StGXR8_Z5jdHi6B-myT"
            ]
          },
          "domain_name": {
            "type": "string",
            "examples": [
              "example.com"
            ]
          },
          "status": {
            "type": "string",
            "description": "Whether a new website was created or a previously archived one was restored.",
            "enum": [
              "created",
              "restored"
            ],
            "examples": [
              "created"
            ]
          }
        }
      },
      "DomainArchived": {
        "description": "Confirmation that a website was archived.",
        "type": "object",
        "properties": {
          "sid": {
            "type": "string",
            "examples": [
              "V1StGXR8_Z5jdHi6B-myT"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "archived"
            ],
            "examples": [
              "archived"
            ]
          },
          "message": {
            "type": "string",
            "examples": [
              "Website has been archived. You can restore it from your account."
            ]
          }
        }
      },
      "BlockedIp": {
        "description": "One entry on the exclusion list sent to Google Ads.",
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "description": "The address or range, exactly as sent to Google Ads.",
            "examples": [
              "203.0.113.44",
              "196.10.252.0/24"
            ]
          },
          "reason": {
            "type": "string",
            "description": "Why the entry is on the list. `manual` is one of your own blocklist entries; the rest are added automatically.\n",
            "enum": [
              "manual",
              "high_risk",
              "excessive_clicks",
              "country_blocked",
              "country_not_allowed",
              "abusive_backfill"
            ],
            "examples": [
              "high_risk"
            ]
          },
          "fraud_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "For `high_risk` entries, the strongest fraud signal against this address, using the same labels as the Clicks Report. `null` for every other reason. This describes why the address was blocked at sync time, so it can occasionally differ from the label on a Clicks Report run over a different date range.\n",
            "enum": [
              "Bot / Datacenter",
              "Blacklist / Abuse / Poor IP History",
              "Excessive Clicks",
              "Accidental Clicks",
              "Risky Geo",
              "Risky Device",
              "Risky Mouse Dynamics",
              null
            ],
            "examples": [
              "Bot / Datacenter"
            ]
          },
          "risk_score": {
            "type": [
              "number",
              "null"
            ],
            "description": "The address's risk score (0-10) at the time of the sync, where available.",
            "examples": [
              10
            ]
          }
        }
      },
      "AllowedIp": {
        "description": "One entry on the website's allowlist.",
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "examples": [
              "192.0.2.15"
            ]
          },
          "added_on": {
            "type": "string",
            "description": "When the entry was added.",
            "examples": [
              "2026-07-02 09:11:00.000"
            ]
          }
        }
      },
      "IpList": {
        "description": "The exclusion list currently enforced for a website, plus its allowlist.",
        "type": "object",
        "properties": {
          "domain_name": {
            "type": "string",
            "examples": [
              "example.com"
            ]
          },
          "sid": {
            "type": "string",
            "examples": [
              "V1StGXR8_Z5jdHi6B-myT"
            ]
          },
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When this list was last sent to Google Ads. `null` means the website has never been synced — usually no connected Google Ads account, or the tracker is not verified yet.\n",
            "examples": [
              "2026-08-21T14:45:12.000Z"
            ]
          },
          "monitoring_only": {
            "type": "boolean",
            "description": "When true the website is in monitoring mode: clicks are scored and reported but nothing is blocked, so `blocked` is empty by design.\n",
            "examples": [
              false
            ]
          },
          "blocked": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockedIp"
            }
          },
          "allowed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllowedIp"
            }
          }
        }
      },
      "IpWriteRequest": {
        "description": "Addresses to add to a website's blocklist or allowlist.",
        "type": "object",
        "required": [
          "ips"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "description": "The website domain. Provide either this or `sid`.",
            "examples": [
              "example.com"
            ]
          },
          "sid": {
            "type": "string",
            "description": "The site ID (sid). Provide either this or `domain`.",
            "examples": [
              "V1StGXR8_Z5jdHi6B-myT"
            ]
          },
          "ips": {
            "type": "array",
            "description": "Up to 100 addresses per request. Accepts single addresses, last-octet wildcards (`196.10.252.*`), CIDR ranges (`218.100.46.0/23`) and IPv6.\n",
            "maxItems": 100,
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "203.0.113.44",
                "196.10.252.*"
              ]
            ]
          }
        }
      },
      "IpUnblockRequest": {
        "description": "Addresses to remove from a website's blocklist or allowlist.",
        "allOf": [
          {
            "$ref": "#/components/schemas/IpWriteRequest"
          },
          {
            "type": "object",
            "properties": {
              "list": {
                "type": "string",
                "description": "Which list to remove from. Defaults to `block`.",
                "enum": [
                  "block",
                  "allow"
                ],
                "examples": [
                  "block"
                ]
              }
            }
          }
        ]
      },
      "IpResult": {
        "description": "What happened to one address in the request.",
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "examples": [
              "203.0.113.44"
            ]
          },
          "status": {
            "type": "string",
            "description": "`added` and `removed` mean the list changed. `already_present` and `not_found` mean it was already in the state you asked for — neither is an error. `invalid` means the address could not be understood and was skipped.\n",
            "enum": [
              "added",
              "already_present",
              "removed",
              "not_found",
              "invalid"
            ],
            "examples": [
              "added"
            ]
          }
        }
      },
      "IpWriteResult": {
        "description": "The outcome of a blocklist or allowlist change. Individual addresses are reported separately, so one bad address does not discard the rest of the batch.\n",
        "type": "object",
        "properties": {
          "domain_name": {
            "type": "string",
            "examples": [
              "example.com"
            ]
          },
          "sid": {
            "type": "string",
            "examples": [
              "V1StGXR8_Z5jdHi6B-myT"
            ]
          },
          "list": {
            "type": "string",
            "description": "Which list was changed (returned by `/ips/unblock`).",
            "examples": [
              "block"
            ]
          },
          "applies_within_minutes": {
            "type": "integer",
            "description": "How long the change takes to reach Google Ads. Reads from `GET /ips` will not show the change until the next sync.\n",
            "examples": [
              120
            ]
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IpResult"
            }
          },
          "summary": {
            "type": "object",
            "description": "Count of each status in `results`.",
            "examples": [
              {
                "added": 2,
                "invalid": 1
              }
            ]
          }
        }
      },
      "RateLimitedError": {
        "description": "Returned when the API key exceeds its hourly request allowance.",
        "type": "object",
        "properties": {
          "error": {
            "type": "boolean",
            "examples": [
              true
            ]
          },
          "code": {
            "type": "string",
            "examples": [
              "rate_limited"
            ]
          },
          "message": {
            "type": "string",
            "examples": [
              "Too many requests. You can make 1000 requests per hour. Try again in 240 seconds."
            ]
          }
        }
      },
      "IpListLimitError": {
        "description": "Returned when a request would push a list past its limit, or sends more than 100 addresses at once.\n",
        "type": "object",
        "properties": {
          "error": {
            "type": "boolean",
            "examples": [
              true
            ]
          },
          "code": {
            "type": "string",
            "description": "`list_limit_reached` when the website already holds the maximum manual entries; `too_many_ips` when a single request carries more than 100 addresses.\n",
            "enum": [
              "list_limit_reached",
              "too_many_ips"
            ],
            "examples": [
              "list_limit_reached"
            ]
          },
          "message": {
            "type": "string",
            "examples": [
              "This website can hold 500 manual entries on this list and currently has 500."
            ]
          },
          "used": {
            "type": "integer",
            "examples": [
              500
            ]
          },
          "limit": {
            "type": "integer",
            "examples": [
              500
            ]
          }
        }
      },
      "EmailVerification": {
        "description": "Result of verifying a single email address.",
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "The email address that was verified.",
            "examples": [
              "john@example.com"
            ]
          },
          "status": {
            "type": "string",
            "description": "Primary deliverability status.",
            "enum": [
              "valid",
              "invalid",
              "catch-all",
              "unknown",
              "spamtrap",
              "abuse",
              "do_not_mail"
            ],
            "examples": [
              "valid"
            ]
          },
          "sub_status": {
            "type": "string",
            "description": "Additional detail about the status (empty string when not applicable). Examples include `mailbox_not_found`, `role_based`, `disposable`, `alias_address`, `possible_typo`, and `greylisted`.",
            "examples": [
              ""
            ]
          },
          "free_email": {
            "type": "boolean",
            "description": "Whether the address belongs to a free email provider (e.g. Gmail, Yahoo).",
            "examples": [
              false
            ]
          },
          "did_you_mean": {
            "type": [
              "string",
              "null"
            ],
            "description": "A suggested correction when the address looks like a likely typo, otherwise null.",
            "examples": [
              null
            ]
          },
          "domain": {
            "type": "string",
            "description": "The domain portion of the email address.",
            "examples": [
              "example.com"
            ]
          },
          "mx_found": {
            "type": "boolean",
            "description": "Whether MX (mail exchange) records were found for the domain.",
            "examples": [
              true
            ]
          },
          "processed_at": {
            "type": "string",
            "description": "Timestamp when the verification was processed.",
            "examples": [
              "2026-07-14 18:03:11.043"
            ]
          },
          "usage": {
            "type": "object",
            "description": "Your account's monthly email verification usage after this request.",
            "properties": {
              "used": {
                "type": "integer",
                "description": "Verifications used in the current calendar month.",
                "examples": [
                  1241
                ]
              },
              "limit": {
                "type": "integer",
                "description": "Your plan's monthly email verification allowance.",
                "examples": [
                  5000
                ]
              },
              "remaining": {
                "type": "integer",
                "description": "Verifications remaining this month.",
                "examples": [
                  3759
                ]
              }
            }
          }
        }
      },
      "LimitReachedError": {
        "description": "Returned when the account's monthly email verification allowance is exhausted.",
        "type": "object",
        "properties": {
          "error": {
            "type": "boolean",
            "examples": [
              true
            ]
          },
          "code": {
            "type": "string",
            "examples": [
              "monthly_limit_reached"
            ]
          },
          "message": {
            "type": "string",
            "examples": [
              "Monthly email verification limit reached."
            ]
          },
          "used": {
            "type": "integer",
            "examples": [
              5000
            ]
          },
          "limit": {
            "type": "integer",
            "examples": [
              5000
            ]
          }
        }
      },
      "DomainLimitReachedError": {
        "description": "Returned when the account's plan website allowance is exhausted, or there is no active plan.",
        "type": "object",
        "properties": {
          "error": {
            "type": "boolean",
            "examples": [
              true
            ]
          },
          "code": {
            "type": "string",
            "description": "`domain_limit_reached` when the plan's website allowance is exhausted; `no_active_plan` when the account has no active/billable plan.",
            "enum": [
              "domain_limit_reached",
              "no_active_plan"
            ],
            "examples": [
              "domain_limit_reached"
            ]
          },
          "message": {
            "type": "string",
            "examples": [
              "Your plan's website limit has been reached. Please upgrade your plan to add another website."
            ]
          },
          "used": {
            "type": "integer",
            "description": "Number of active websites currently on the account (present for `domain_limit_reached`).",
            "examples": [
              5
            ]
          },
          "limit": {
            "type": "integer",
            "description": "The plan's active-website allowance (present for `domain_limit_reached`).",
            "examples": [
              5
            ]
          }
        }
      },
      "DomainConflictError": {
        "description": "Returned when a website request conflicts with the account's current state.",
        "type": "object",
        "properties": {
          "error": {
            "type": "boolean",
            "examples": [
              true
            ]
          },
          "code": {
            "type": "string",
            "description": "`domain_exists` (an active website with this domain already exists), `last_active_domain` (cannot archive the only active website), or `already_archived` (the website is already archived).",
            "enum": [
              "domain_exists",
              "last_active_domain",
              "already_archived"
            ],
            "examples": [
              "domain_exists"
            ]
          },
          "message": {
            "type": "string",
            "examples": [
              "This website already exists on your account."
            ]
          },
          "sid": {
            "type": "string",
            "description": "The site ID of the existing website (present for `domain_exists` and `already_archived`).",
            "examples": [
              "V1StGXR8_Z5jdHi6B-myT"
            ]
          }
        }
      },
      "BadRequestError": {
        "x-scalar-ignore": true,
        "description": "RFC 7807 (https://datatracker.ietf.org/doc/html/rfc7807)",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "examples": [
              "https://example.com/errors/bad-request"
            ]
          },
          "title": {
            "type": "string",
            "examples": [
              "Bad Request"
            ]
          },
          "status": {
            "type": "integer",
            "format": "int64",
            "examples": [
              400
            ]
          },
          "detail": {
            "type": "string",
            "examples": [
              "The request was invalid."
            ]
          }
        }
      },
      "ForbiddenError": {
        "x-scalar-ignore": true,
        "description": "RFC 7807 (https://datatracker.ietf.org/doc/html/rfc7807)",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "examples": [
              "https://example.com/errors/forbidden"
            ]
          },
          "title": {
            "type": "string",
            "examples": [
              "Forbidden"
            ]
          },
          "status": {
            "type": "integer",
            "format": "int64",
            "examples": [
              403
            ]
          },
          "detail": {
            "type": "string",
            "examples": [
              "You are not authorized to access this resource."
            ]
          }
        }
      },
      "NotFoundError": {
        "x-scalar-ignore": true,
        "description": "RFC 7807 (https://datatracker.ietf.org/doc/html/rfc7807)",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "examples": [
              "https://example.com/errors/not-found"
            ]
          },
          "title": {
            "type": "string",
            "examples": [
              "Not Found"
            ]
          },
          "status": {
            "type": "integer",
            "format": "int64",
            "examples": [
              404
            ]
          },
          "detail": {
            "type": "string",
            "examples": [
              "The resource you are trying to access does not exist."
            ]
          }
        }
      },
      "UnauthorizedError": {
        "x-scalar-ignore": true,
        "description": "RFC 7807 (https://datatracker.ietf.org/doc/html/rfc7807)",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "examples": [
              "https://example.com/errors/not-found"
            ]
          },
          "title": {
            "type": "string",
            "examples": [
              "Unauthorized"
            ]
          },
          "status": {
            "type": "integer",
            "format": "int64",
            "examples": [
              401
            ]
          },
          "detail": {
            "type": "string",
            "examples": [
              "You are not authorized to access this resource."
            ]
          }
        }
      },
      "Conflict": {
        "x-scalar-ignore": true,
        "description": "RFC 7807 (https://datatracker.ietf.org/doc/html/rfc7807)",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "examples": [
              "https://example.com/errors/conflict"
            ]
          },
          "title": {
            "type": "string",
            "examples": [
              "Conflict"
            ]
          },
          "status": {
            "type": "integer",
            "format": "int64",
            "examples": [
              409
            ]
          },
          "detail": {
            "type": "string",
            "examples": [
              "The resource you are trying to access is in conflict."
            ]
          }
        }
      },
      "UnprocessableEntity": {
        "x-scalar-ignore": true,
        "description": "RFC 7807 (https://datatracker.ietf.org/doc/html/rfc7807)",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "examples": [
              "https://example.com/errors/unprocessable-entity"
            ]
          },
          "title": {
            "type": "string",
            "examples": [
              "Unprocessable Entity"
            ]
          },
          "status": {
            "type": "integer",
            "format": "int64",
            "examples": [
              422
            ]
          },
          "detail": {
            "type": "string",
            "examples": [
              "The request was invalid."
            ]
          }
        }
      }
    }
  },
  "x-ext-urls": {}
}