{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/signupbouncer-com/json-schema/signupbouncer-com-check-request-schema.json",
  "title": "CheckRequest",
  "description": "Send a nonempty email, a nonempty ip, or both. The other fields are optional. Unknown fields are ignored.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/signupbouncer-com-openapi.json#/components/schemas/CheckRequest",
  "type": "object",
  "anyOf": [
    {
      "required": [
        "email"
      ],
      "properties": {
        "email": {
          "minLength": 1
        }
      }
    },
    {
      "required": [
        "ip"
      ],
      "properties": {
        "ip": {
          "minLength": 1
        }
      }
    }
  ],
  "properties": {
    "email": {
      "type": "string",
      "maxLength": 320,
      "description": "The address the person signed up with."
    },
    "ip": {
      "type": "string",
      "maxLength": 64,
      "description": "The client's IPv4 or IPv6 address, from a header your host overwrites. Without it, the IP checks don't run."
    },
    "user_agent": {
      "type": "string",
      "maxLength": 512
    },
    "attempt_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._:-]{1,128}$",
      "description": "Stable signup attempt id, reused on retries. Recommended for IP-only checks. Scoped to this app and address. Without it, the exact email identifies the attempt, or each IP-only call counts separately. Deduplicates signup counters, not billing or responses."
    },
    "app": {
      "type": "string",
      "pattern": "^app_[0-9a-f]{24}$",
      "description": "Leave it out. An API key belongs to one app, and its checks go to that app. If you send it, it must be the key's own app id, and any other value gets 403 app_mismatch. Only older keys, made before keys had an app and labeled \"all apps (older key)\" on the dashboard, use it to pick the app. Without it they use your first app."
    },
    "auth_provider": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._:-]{1,40}$",
      "description": "For OAuth and SSO signups: the provider id as your auth library names it (\"google\", \"github\", \"google.com\", \"microsoft-entra-id\", or an SSO id such as \"sso:<id>\" or \"oidc.<id>\"). Send it with email_verified. When the id is an OAuth or SSO provider we know and email_verified is true, only the IP and signup bursts are scored. Any other id, such as an email or password provider (\"nodemailer\", \"credentials\"), is checked like an email signup."
    },
    "email_verified": {
      "type": "boolean",
      "description": "With auth_provider: true when your auth platform says the provider verified this address (an OIDC email_verified claim, Firebase's emailVerified, Supabase's user_metadata.email_verified). Take it from the platform, never from what the user typed. Missing or false: the email is checked like an email signup."
    }
  }
}