{
  "openapi": "3.1.0",
  "info": {
    "title": "Kawaa API",
    "version": "1.0.0",
    "summary": "Email verification, list hygiene and deliverability, over HTTP.",
    "description": "The core Kawaa REST API: verify an address or a list, follow the job, read the results, and check how a domain is set up to send mail.\n\nThis document describes the endpoints a customer integration uses. It is not the whole surface: profile and security settings (password, two-factor, sessions), billing and subscription changes and team management are reachable but not modelled here, because a specification is only worth having if every line of it is kept true, and they have no page at https://kawaa.com/docs/ yet either. Some operations that do have a page there are not modelled here either, and that page is their only reference: the white-label API (`POST /v1/white-label/sub-accounts`, `GET /v1/white-label/sub-accounts`, `GET /v1/white-label/sub-accounts/{subAccountId}`, `PUT /v1/white-label/sub-accounts/{subAccountId}`, `DELETE /v1/white-label/sub-accounts/{subAccountId}`, `POST /v1/white-label/sub-accounts/{subAccountId}/allocate`, `POST /v1/white-label/sub-accounts/{subAccountId}/reset-key`, `GET /v1/white-label/usage`, `GET /v1/white-label/usage/{subAccountId}`, `GET /v1/white-label/custom-domain`, `POST /v1/white-label/custom-domain`, `POST /v1/white-label/custom-domain/verify` and `DELETE /v1/white-label/custom-domain`) at https://kawaa.com/docs/api/white-label/, the domain activity lookup (`GET /v1/activity/domain/{domain}`) at https://kawaa.com/docs/api/activity/#domain-activity, and the tracking links (`POST /v1/tracking/links` and `PUT /v1/tracking/links/{id}`), whose limits are at https://kawaa.com/docs/api/activity/#tracking-link-limits. The HubSpot, Salesforce and Mailchimp integrations are not available yet: their authorize routes answer 503 `INTEGRATION_NOT_CONFIGURED`, so no account can connect one. The guides at https://kawaa.com/docs/ cover verification, batch jobs, account and API keys, webhooks, activity, deliverability and the white-label API; the email finder (`POST /v1/find`, `POST /v1/find/bulk`), the domain lookup (`GET /v1/domain/{domain}`) and the billing catalogue (`GET /v1/billing/plans`, `GET /v1/billing/credit-packages`) are described only in this document.\n\n\n\n**API key scopes.** A key can be limited to a list of scopes. Each operation below carries `x-kawaa-scopes` naming every scope it requires (more than one where a route genuinely touches two areas). `x-kawaa-unscoped-only: true` marks an operation a scoped key may not use at all, whatever it holds: it mints a credential, or it acts across every tenant. An operation with neither extension needs no credential. An unrestricted key (which is what every key is unless it was created with scopes) reaches everything. An OAuth access token is always scoped: an operation it can call lists the `OAuth2` scheme in its `security`, with the scopes it requires, and an authenticated operation that does not list it refuses one whatever scopes it holds.\n\n**Rate-limit headers.** Once a request's credential is accepted and its rate limit measured, every response to it, success or error, carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`, `X-RateLimit-Window` and `X-RateLimit-Policy` (described under `components/headers`). They are declared on the success and `429` responses below rather than repeated on every status.\n\n**Answers that do not come from Kawaa.** A few failures are answered by the gateway in front of the API rather than by Kawaa, and carry no error envelope, so there is no `error.code` to branch on: read the status. A request still running when its route's time limit at the gateway runs out (about 29 to 30 seconds on most routes, every route that charges credits included; 15 seconds on `GET /v1/account`, the `/v1/api-keys` routes, `GET /v1/jobs`, `GET /v1/jobs/{id}` and `POST /v1/jobs/{id}/cancel`; 5 seconds on `GET /health`), or one the gateway could not hand over, is a `503` whose whole body is `{\"message\":\"Service Unavailable\"}`; the request may still have run, so repeat a charging call only with the same `Idempotency-Key`. A request body over about 6 MB is a `413` whose whole body is `{\"message\":\"Request Entity Too Large\"}`, and a path with malformed percent-encoding (such as `%E0%A4%A`) is a `400` whose whole body is `{\"message\":\"Bad Request\"}`; neither of those two is run or charged. An error whose body is not JSON at all (an HTML page) also comes from infrastructure in front of the API: handle it by its status.\n\n**AI agents.** The same product is served over the Model Context Protocol at `https://api.kawaa.com/mcp`, authenticated with the same API key as an HTTP bearer token, or with an OAuth access token an agent obtains by signing in (the `OAuth2` security scheme). Twelve tools cover verification, bulk jobs (including stopping one), results and deliverability; every tool call is a call to a route described here, so the scopes, rate limits, credit accounting and idempotency below apply to it unchanged. An agent is not a separate entitlement: it is a caller. Setup for Claude Code, Codex, Cursor and Antigravity is at https://kawaa.com/docs/mcp/, and the protocol surface itself is not modelled in this document: this describes the REST API the tools call.",
    "termsOfService": "https://kawaa.com/terms/",
    "contact": {
      "name": "Kawaa support",
      "url": "https://kawaa.com/support/",
      "email": "support@kawaa.com"
    },
    "license": {
      "name": "Proprietary",
      "identifier": "LicenseRef-Kawaa-Terms"
    }
  },
  "servers": [
    {
      "url": "https://api.kawaa.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Guides and reference",
    "url": "https://kawaa.com/docs/"
  },
  "security": [
    {
      "ApiKeyHeader": []
    },
    {
      "BearerToken": []
    }
  ],
  "tags": [
    {
      "name": "Verification",
      "description": "Check whether an address can receive mail."
    },
    {
      "name": "Jobs",
      "description": "Follow asynchronous work and read its results."
    },
    {
      "name": "Search",
      "description": "Find an address, or look at a domain."
    },
    {
      "name": "Activity",
      "description": "Engagement your own account's tracking has recorded for an address. Never another account's data."
    },
    {
      "name": "Deliverability",
      "description": "How a domain is set up to send mail."
    },
    {
      "name": "Account",
      "description": "Plan, credits and usage."
    },
    {
      "name": "API keys",
      "description": "The credentials that reach this API."
    },
    {
      "name": "Webhooks",
      "description": "Be told when work finishes instead of polling.\n\n**Verifying a delivery.** Every signed delivery carries `X-Kawaa-Signature-V2: t=<unix seconds>,v1=<hex>`. `t` is when that request was sent and `v1` is the hex HMAC-SHA256 of `<t>.<raw body>` (the `t` string, a period, then the raw request body bytes), keyed with the webhook's secret: a registered endpoint's `secret`, or a job's `webhook_secret`. Recompute it over the raw body, compare it with a constant-time comparison, and refuse the request when `t` is more than 300 seconds from your clock in either direction (the recommended tolerance): a captured delivery then cannot be replayed later. A header may carry several `v1` entries (any match verifies); ignore entries with other names.\n\nEach attempt is signed when it is sent, so an automatic retry, a manual retry (`POST /v1/webhooks/{id}/logs/{logId}/retry`) and a test delivery each carry a fresh `t`. Check the window against `t` only: the body's `timestamp` keeps the time of the original delivery, and `X-Kawaa-Timestamp` is informational and not signed.\n\n`X-Kawaa-Signature: sha256=<hex HMAC-SHA256 of the raw body>` is the legacy signature, still sent unchanged for existing receivers. It signs no time, so a captured delivery verifies against it forever; verify `X-Kawaa-Signature-V2` instead. A per-job callback sent without a `webhook_secret` carries neither."
    },
    {
      "name": "Catalogue",
      "description": "Public plan and credit-pack prices."
    },
    {
      "name": "Health",
      "description": "Is the API up."
    },
    {
      "name": "Exports",
      "description": "Owned exports and scheduled-export requests."
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "tags": [
          "Health"
        ],
        "operationId": "getHealth",
        "summary": "Liveness probe",
        "description": "Answers without authentication. Not a status page: https://status.kawaa.com reports component health.",
        "security": [],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The API is serving, but **read `status` in the body before concluding it is healthy**. A degraded dependency does not always change the status code: a worker dead-letter-queue probe that fails or reads above its threshold sets `status: \"degraded\"` and the response is still 200. A monitor that watches only the status code misses worker degradation entirely.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "examples": [
                        "healthy"
                      ]
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "service": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "timestamp",
                    "service",
                    "version"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "A dependency probe failed: the SAME JSON shape as 200, with `status: \"degraded\"`. A monitor that treats only 200 as a valid response stops reading precisely when the endpoint has something to say. A 503 whose whole body is `{\"message\":\"Service Unavailable\"}` is not this report: the gateway in front of the API answered it (`GatewayError`), and it has no `status` field.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "degraded",
                          "description": "Always `degraded` on a 503; this response exists to report one.",
                          "examples": [
                            "degraded"
                          ]
                        },
                        "timestamp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "service": {
                          "type": "string"
                        },
                        "version": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "timestamp",
                        "service",
                        "version"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/verify": {
      "post": {
        "tags": [
          "Verification"
        ],
        "operationId": "verifyEmail",
        "summary": "Verify one address",
        "description": "Verifies a single address and answers with the verdict. Charges 1 credit, or 0.5 when the result is served from cache. The verdict does not change the price: an `unknown`, `risky` or `catch_all` result costs 1 credit, and is never served from cache.\n\nIf verification does not finish inside the request window the response is still `200`, with `status: \"pending\"` and a `job_id` instead of a result. Poll `GET /v1/jobs/{id}` for the result. Calling this again while that check is still running joins it rather than charging again (below); once it has its answer, a repeat is a new request at the usual price.\n\n**Without a key, an identical request that arrives while the first is still in flight is not charged again.** The same account asking for the same normalized address with the same `deep_verify`, `include_ai`, `enrich`, `skip_cache` and `include_activity` (`timeout_ms` does not count) joins the earlier request's verification: it is answered with that verification's result when it is ready inside this request's wait, or with the pending shape carrying the same `job_id`, and either way with `credits_used: 0` and `idempotent_replay: true`. If that attempt ends without an answer while this request waits (it was refunded), this request gets a retryable `503` with `nothing_charged: true` instead. A concurrent pair is charged once. A verification counts as in flight until its answer exists, and for at most 15 minutes after its charge (the age at which job reconciliation refunds an unanswered one). A request that arrives after the answer existed is priced exactly as before: 0.5 credits from cache, or 1 for a fresh check. Another account's verification is never joined.\n\nSend `Idempotency-Key` to make a retry safe at any time.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyRequest"
              },
              "examples": {
                "simple": {
                  "summary": "Just the address",
                  "value": {
                    "email": "user@example.com"
                  }
                },
                "deep": {
                  "summary": "With options",
                  "value": {
                    "email": "user@example.com",
                    "options": {
                      "deep_verify": true,
                      "include_ai": true
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "A verdict, or `status: \"pending\"` when the check is still running.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/VerificationResult"
                        },
                        {
                          "$ref": "#/components/schemas/PendingVerification"
                        }
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "One of two codes, and this answer adds no charge in either case. `IDEMPOTENCY_KEY_CONFLICT`: the `Idempotency-Key` was used before for a different request on this route. Repeat the original request exactly, or use a new key. `CONFLICT` with `retryable: true` and a `Retry-After`: a copy of this same request under the same key is being queued right now. Repeat it with the SAME key after that delay, and the repeat returns the job (`idempotent_replay: true`, `credits_used: 0`). A new key buys the verification a second time.",
            "headers": {
              "Retry-After": {
                "description": "Present with `CONFLICT`: seconds until the copy's dispatch lease runs out.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "410": {
            "$ref": "#/components/responses/IdempotentJobExpired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Temporarily unable to serve; `error.retryable` says whether waiting cures it. All but one of these charged nothing: a balance contended by concurrent spending, a concurrent request that changed this `Idempotency-Key`'s charge or refunded an earlier attempt under it, a request that ran out of time before its charge could start, or, without a key, a verification that could not be started, or an identical request this one joined that ended without a result, could not be queued or could not be read. Retry as the message says, with the SAME `Idempotency-Key` if you sent one.\n\n**One is charged**, never carries `nothing_charged: true`, and its message says it was charged: the check was charged, but its verification could not be queued yet. Repeat the request within 15 minutes of sending it, with the SAME `Idempotency-Key` (or, without a key, the identical request): the repeat takes the verification over and is not charged again. The message says when to repeat it: with a key, a few seconds from now; when an earlier refund attempt may still hold the verification, two minutes from now, which `Retry-After` (120) also says. A verification that is never queued is refunded automatically.\n\nA `503` whose body is only `{\"message\":\"Service Unavailable\"}` is not one of these: the gateway in front of the API answered it (see the description at the top of this document), the request may still have run, and only a repeat with the SAME `Idempotency-Key` is safe.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Something failed after the request was accepted, and **the message says what that means for the money**. A keyed dispatch whose lease could not be confirmed asks you to retry with the SAME `Idempotency-Key`: the work may already be running, and a fresh key buys it again. A batch that was charged and could not create its job attempts a refund and says whether that succeeded. A debit whose outcome could not be confirmed (it was cancelled at the request's time limit, or timed out, and its write may still land) says so: with an `Idempotency-Key` the answer carries `retryable: true`, and a repeat with the SAME key returns this verification if it was charged or charges it once if it was not. Without a key, it depends on how the verification was being answered, and the message says which: when it was a fresh check, an identical repeat within 15 minutes of sending the original joins that verification, queues it once and answers `credits_used: 0` with `idempotent_replay: true`, so the debit is made once; when it was a cache answer (0.5 credits), a repeat may be charged 0.5 again. Neither the balance nor the absence of a debit proves it was not charged, since a timed-out debit can still land after you look and other spending moves the balance: only a matching debit in `GET /v1/usage/credits/transactions` confirms the first charge. A key sent only on the retry is a new request and does not cover the original attempt: send an `Idempotency-Key` from the first attempt to make every retry safe. Do not retry blind, and do not assume the debit was restored. Read `error.message`, and check `GET /v1/jobs` before resubmitting.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "verification:write"
        ]
      }
    },
    "/v1/verify/batch": {
      "post": {
        "tags": [
          "Verification"
        ],
        "operationId": "verifyEmailBatch",
        "summary": "Verify a list of addresses",
        "description": "Submits up to your account's batch size in unique, well-formed addresses (Free 100, or 1,000 once a Free account has bought any credit pack; Starter 1,000, Professional and Business 5,000, Enterprise 10,000; more is a 413, and the raw list may hold at most 10,000 entries) and answers immediately with a `job_id`. Charges about 1 credit per address at the moment the job is accepted, not when it finishes.\n\nFollow it with `GET /v1/jobs/{id}`, or supply `webhook_url` and be told. Send `Idempotency-Key` to make a retry safe.\n\n**Without a key, an identical batch inside 15 minutes is the same purchase.** The same account sending the identical batch (the same list, options, `include_activity` and webhook) within 15 minutes of the first one's charge gets that job back, whether it is still running or already finished, with `idempotent_replay: true` and `credits_used: 0`, and is charged nothing. After those 15 minutes, or once that batch was fully refunded, the same batch is a new purchase. Only a key keeps a later retry free.\n\n`options.timeout_ms` is refused: it bounds the synchronous wait on `POST /v1/verify` and nothing on this path honours it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyBatchRequest"
              },
              "examples": {
                "poll": {
                  "summary": "Poll for the result",
                  "value": {
                    "emails": [
                      "a@example.com",
                      "b@example.com"
                    ]
                  }
                },
                "webhook": {
                  "summary": "Be called when it finishes",
                  "value": {
                    "emails": [
                      "a@example.com"
                    ],
                    "webhook_url": "https://YOUR-ENDPOINT.example.com/kawaa"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "202": {
            "description": "Accepted and charged. The verdicts arrive on the job.\n\n**A replay is also a 202, and it charged nothing.** Repeating the submission under the same `Idempotency-Key`, or, without a key, sending the identical batch within 15 minutes of its charge, returns the ORIGINAL job with `idempotent_replay: true` and `credits_used: 0`. Read those two fields before reconciling a debit from this status: the 202 alone does not distinguish a new paid job from a recovered one. A repeat that arrives while another request under the key is still queueing the batch is a replay too, with `dispatch_in_progress: true` and a `Retry-After` header: repeat after the delay, or poll the job.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "Retry-After": {
                "description": "Present with `dispatch_in_progress`: how long to wait before retrying the identical request.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/BatchAccepted"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "410": {
            "$ref": "#/components/responses/IdempotentJobExpired"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Temporarily unable to serve; `error.retryable` says whether waiting cures it. All but one of these charged nothing (among them a contended balance, a batch that could not reserve its job, an earlier attempt under the key refunded while this one ran, or a request that ran out of time before its charge could start): retry as the message says. **One is charged**, never carries `nothing_charged: true`, and its message says it was charged: the batch was charged, but some of its emails could not be confirmed as queued before the request had to answer. The message says how many and names the job. Repeat the request after its `Retry-After` (3 seconds) and within 15 minutes of sending it, with the SAME `Idempotency-Key` (or, without a key, the identical batch): the repeat queues them and is not charged again. Without a key the error also carries `retry_may_charge_again: true` and the message adds that a repeat sent later may be charged again: past its window the identical batch is a new purchase. A repeat sooner is told the batch is still being queued (`202`, `dispatch_in_progress`) and queues nothing. Any email that is never verified is refunded automatically.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Something failed after the request was accepted, and **the message says what that means for the money**. A keyed dispatch whose lease could not be confirmed asks you to retry with the SAME `Idempotency-Key`: the work may already be running, and a fresh key buys it again. A batch that was charged and could not create its job attempts a refund and says whether that succeeded. A batch that was charged but whose state could not be read before the answer was due says so and names its job id: read it with `GET /v1/jobs/{job_id}` instead of sending the batch again. A debit whose outcome could not be confirmed (it was cancelled at the request's time limit, or timed out, and its write may still land) says so: with an `Idempotency-Key` the answer carries `retryable: true`; repeat it with the SAME key (without one, the identical batch within 15 minutes), and the repeat returns the batch if it was charged or charges it once if it was not. Do not retry blind, and do not assume the debit was restored. Read `error.message`, and check `GET /v1/jobs` before resubmitting.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "verification:write"
        ]
      }
    },
    "/v1/verify/file": {
      "post": {
        "tags": [
          "Verification"
        ],
        "operationId": "verifyFile",
        "summary": "Verify a CSV, TSV or TXT upload",
        "description": "Two steps. `action: \"get_upload_url\"`, with the file's `filename` and its `file_size` in bytes, returns a presigned URL and a `file_key`; PUT the file to that URL, then call again with `action: \"process\"` and the `file_key`. The URL accepts exactly `file_size` bytes, up to 50 MB.\n\n**CSV, TSV and TXT only.** An `.xlsx` filename is refused at the handshake with `400 Only CSV, TSV and TXT files are supported`, before any upload, and a workbook uploaded under a text name is refused by `process` with `400 This looks like an Excel file. Save it as CSV UTF-8 and upload again.` The name also says how the file is read: a `.csv` or `.tsv` as delimited records whatever `Content-Type` it was PUT with, and a `.txt` one address per line unless it was PUT with a CSV `Content-Type` such as `text/csv`. Text in UTF-8, UTF-16 (with or without a byte-order mark) or Windows-1252 (Excel's plain CSV on Windows) is read as such.\n\n**Addresses come from one column**, which the response names in `email_column`: the column whose header names it (`Email`, `E-mail`, `E-Mail-Adresse`, `Correo electr\u00f3nico`, `Courriel` and other languages), else the first header that mentions email with addresses under it, preferring one that is not a manager's, owner's, CC or second address, else the column with the most addresses. The full rule is at https://kawaa.com/docs/api/batch/#file-upload.\n\n**What `process` charges: one credit per address**, counted after invalid entries and duplicates are removed, and debited up front: a 50,000-row file with 9,300 distinct valid addresses is a 9,300-credit debit before any verification starts. Check the balance first; the plan's batch ceiling also applies. An address that definitively fails to enqueue is refunded; one whose dispatch is ambiguous is reported in `enqueue_unknown` with its credits in `credits_held` until reconciliation settles it.\n\nThe `process` action accepts `Idempotency-Key`. Any field the chosen action does not read is a 400 rather than silently ignored. A `webhook_secret` alongside `webhook_url` signs the completion callback, as on `POST /v1/verify/batch`; without one the callback is delivered **unsigned**, so treat its body as a hint to go and read `GET /v1/jobs/{job_id}` rather than as evidence.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/FileUploadUrlRequest"
                  },
                  {
                    "$ref": "#/components/schemas/FileProcessRequest"
                  }
                ]
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "A presigned upload URL and the key to submit with it (for `get_upload_url`). Nothing is charged by this step.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "upload_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "PUT the file here, unchanged, with no extra headers. It accepts exactly the `file_size` declared: a body of any other length is refused with `403 SignatureDoesNotMatch`. It is a presigned S3 URL: anyone holding it can write that one object, so treat it as a credential."
                        },
                        "file_key": {
                          "type": "string",
                          "description": "Pass this back as `file_key` on the `process` call. It is scoped to your account: a key from another account is refused with 403.",
                          "examples": [
                            "uploads/usr_123/2026-09-17/list.csv"
                          ]
                        },
                        "expires_in_seconds": {
                          "type": "integer",
                          "description": "How long `upload_url` stays valid. Ask for a new one rather than retrying an expired PUT.",
                          "examples": [
                            900
                          ]
                        },
                        "next_step": {
                          "type": "string",
                          "description": "The same instruction in prose, for a caller reading the response rather than this document."
                        }
                      },
                      "required": [
                        "upload_url",
                        "file_key",
                        "expires_in_seconds"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "202": {
            "description": "The file was accepted and charged (for `process`). Poll `GET /v1/jobs/{job_id}`; the counts here describe what was accepted, not what was verified.\n\n**A replay is also a 202, and it charged nothing.** Repeating the submission under the same `Idempotency-Key` returns the ORIGINAL job with `idempotent_replay: true` and `credits_used: 0`. Read those two fields before reconciling a debit from this status: the 202 alone does not distinguish a new paid job from a recovered one.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "Retry-After": {
                "description": "Present with `dispatch_in_progress`: how long to wait before retrying the identical request.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "job_id": {
                          "type": "string",
                          "description": "The job to poll. The only way back to work that has been charged for."
                        },
                        "status": {
                          "type": "string",
                          "description": "Where the job starts: `processing`, or `enqueue_unknown` when some addresses' dispatch could not be confirmed. `completed` when some addresses could not be queued (they are refunded) and every other one already had a result before this answer was sent."
                        },
                        "total_submitted": {
                          "type": "integer",
                          "description": "Rows read from the file, including the invalid ones."
                        },
                        "duplicates_removed": {
                          "type": "integer"
                        },
                        "invalid_emails_skipped": {
                          "type": "integer",
                          "description": "Rows that were not addresses. Skipped, not charged for, and not in the job."
                        },
                        "unique_emails": {
                          "type": "integer",
                          "description": "Addresses the job will verify: what `credits_used` was charged for, except where dispatch was ambiguous (see `credits_held`)."
                        },
                        "email_column": {
                          "type": "object",
                          "description": "The column the addresses were read from. Check it when the file has more than one column of addresses: only this one was verified and charged for. Absent on a replay of a job accepted before this field existed.",
                          "properties": {
                            "index": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Its position, from 0 for the leftmost column."
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Its header as written (trimmed, and cut to 200 characters), or null when the file has no header row."
                            }
                          },
                          "required": [
                            "index",
                            "name"
                          ]
                        },
                        "credits_used": {
                          "type": "number",
                          "description": "Debited when the file was accepted, before any verification ran."
                        },
                        "credits_remaining": {
                          "type": "number",
                          "description": "Omitted when the balance could not be read. Its absence is not a zero balance."
                        },
                        "credits_refunded": {
                          "type": "number",
                          "description": "Returned for addresses that definitively failed to enqueue."
                        },
                        "credits_held": {
                          "type": "number",
                          "description": "Charged but not yet settled: addresses whose dispatch is unconfirmed, pending reconciliation. Neither spent nor refunded yet."
                        },
                        "enqueue_unknown": {
                          "type": "integer",
                          "description": "Addresses whose dispatch could not be confirmed. They may or may not be verified; `credits_held` covers them until reconciliation decides."
                        },
                        "dispatch_in_progress": {
                          "type": "boolean",
                          "description": "A request under this same `Idempotency-Key` is still being dispatched. Nothing more was charged. Retry after `Retry-After`, or just poll the job."
                        },
                        "dispatch_settlement_pending": {
                          "type": "boolean",
                          "description": "Dispatch finished but its credit adjustment has not settled. Nothing more was charged."
                        },
                        "idempotent_replay": {
                          "type": "boolean",
                          "description": "This returned an earlier submission under the same key and charged nothing."
                        },
                        "message": {
                          "type": "string",
                          "description": "Prose for whichever of the above happened."
                        }
                      },
                      "required": [
                        "job_id",
                        "status",
                        "unique_emails",
                        "credits_used"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "410": {
            "$ref": "#/components/responses/IdempotentJobExpired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "413": {
            "description": "`BATCH_SIZE_EXCEEDED`: the file is more than one job takes: more distinct addresses than the plan allows, more than 100,000 distinct addresses on any plan, or over 50 MB (`get_upload_url` refuses a `file_size` over 50 MB the same way, before the upload). Also a file that could not be read within 20 seconds of the request arriving, such as millions of blank or repeated rows: it is refused rather than charged after the connection would have timed out. (When the 20 seconds ran out before the file was read at all, the answer is the 503 below, not this.) The message quotes the limit that applies; counting stops there, so it says \"more than\" the limit rather than the file's total. A capacity refusal, not malformed input, answered the same way as a batch over its limit. Nothing was charged. Split the file and submit the parts as separate jobs.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "`retryable: true`. All but one of these charged nothing; the one that charged never carries `nothing_charged: true`, and its message says it was charged. Among the reasons:\n\n- The retry protection for this `Idempotency-Key` could not be resolved: its receipt was unreadable, a concurrent attempt is still confirming, or an earlier attempt was refunded. Nothing was charged for this request. **Retry with the SAME key**: a fresh one starts a new paid job.\n- A request without an `Idempotency-Key` could not reserve its job before the charge. Nothing was charged: send the same request again.\n- **Charged:** with an `Idempotency-Key`, the file was charged, but some of its emails could not be confirmed as queued before the request had to answer. The message says how many and names the job. Repeat the request with the SAME key and the uploaded file unchanged, after its `Retry-After` (3 seconds) and within 15 minutes of sending it: the repeat queues them and is not charged again. A repeat sooner is told the file is still being queued (`202`, `dispatch_in_progress`) and queues nothing. Any email that is never verified is refunded automatically.\n- The request used up its 20-second charge budget before the file was read at all (authentication, the key's receipt, the webhook's DNS check, a slow start or the first read of the uploaded file took it), so no job was started. The file was not the cause: send the same request again, with the same `Idempotency-Key` if it had one. A file that is itself too slow to read is the 413 instead.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          },
          "500": {
            "description": "Something failed after the file was charged for, and **the message says what that means for the money**. A keyed attempt that could not be recovered asks you to retry with the SAME `Idempotency-Key`. A file job that was charged but whose state could not be read before the answer was due says so and names its job id: read it with `GET /v1/jobs/{job_id}` instead of sending the file again. A debit whose outcome could not be confirmed (it was cancelled at the request's time limit, or timed out, and its write may still land) says so: with an `Idempotency-Key` the answer carries `retryable: true`, and a repeat with the SAME key returns the job if it was charged or charges it once if it was not; without a key a repeat may be charged again, so check the balance or credit history first. Do not retry with a fresh key, and do not assume the debit was restored. Read `error.message` and check `GET /v1/jobs`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "`action: \"process\"` named a `file_key` with no object behind it: the presigned PUT was never completed, or the upload failed. Recoverable and free: nothing was charged, because the charge happens after the file is read. Get a fresh URL with `action: \"get_upload_url\"`, upload again, and process the new key. Distinct from the 500 below, which happens AFTER the debit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "verification:write"
        ]
      }
    },
    "/v1/jobs": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "operationId": "listJobs",
        "summary": "List verification jobs",
        "description": "Newest first. `total` counts every job matching the listing, not just the page. Paginate on `has_more` and `next_offset`.\n\n**A page can hold fewer jobs than `limit`, or none at all, while `has_more` is true.** The `status` and `type` filters, and the retention window, are applied as the job index is read, and one request reads a bounded part of it. `type=batch` reads an index of batch and file jobs only, so it does not walk past single verifications; its pages are short only where `status` or the retention window also filter them. Keep sending `next_offset` back until `has_more` is false; stopping at a short or empty page misses older jobs.\n\n`total_is_approximate: true` means the count stopped at its scan bound, so `total` is a floor.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Return only jobs in this state. `cancelled` is a real equality filter like any other value, and now returns the jobs stopped through `POST /v1/jobs/{id}/cancel`.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "processing",
                "completed",
                "failed",
                "cancelled",
                "enqueue_unknown"
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The `next_offset` from the previous page. Opaque; do not construct one. A value that does not decode or is not in the shape this endpoint issues is a 400 with code `INVALID_CURSOR`; start again without it. So is an empty `offset=`, as on every other list route; leave the parameter out for the first page. Until 2026-10-24 an empty `offset=` was read as the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Return batch and uploaded-file jobs, including legacy bulk and file job labels. Omit this filter to include single-address verifications. Any other present value returns HTTP 400.",
            "schema": {
              "type": "string",
              "enum": [
                "batch"
              ]
            }
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "A page of jobs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/JobPage"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "verification:read"
        ]
      }
    },
    "/v1/jobs/{id}": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "operationId": "getJob",
        "summary": "Job progress and results",
        "description": "Progress counts, and the per-address results when the job has produced any.\n\nPass `include_results=false` while polling: dragging a 10,000-row result set through every poll to learn a percentage is expensive for both sides. Results page with `limit` and `next_key`.\n\n**A job id is matched case-insensitively.** Every id is issued lower-case; an upper-cased copy reads the same job (it used to pass the UUID check and then 404).\n\n**A cached result row states the cache price once it has been billed at it.** The worker copies a cached result's original `credits_used: 1`. When the job's cache discount has been applied (a batch refunds the difference per cached row only after it reaches `completed` or `cancelled`; a single verification settles the same discount), a row with `from_cache: true` reads `credits_used: 0.5`. Before that (a job still running, or a finished one whose discount attempt failed and reports `cache_discount_pending`), or for a legacy verification with no job row to discount it, the row keeps the full credit that is still being held. Reconcile the charge from the job's `status`, `credits_used` and `credits_refunded`; the absence of `cache_discount_pending` alone does not mean the discount was applied.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "name": "include_results",
            "in": "query",
            "description": "`false` (or `0`) leaves the results array out; `true` (or `1`), or leaving the parameter out, includes it. Case-insensitive: `FALSE` and `False` are `false`. **Anything else is a 400**, including an empty value and `no`: it is refused before the job is read, rather than guessed at. Until 2026-09-25 only the exact string `false` turned results off, so `0`, `no` and `FALSE` silently returned the whole page.",
            "schema": {
              "type": "string",
              "pattern": "^(?:[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee]|1|0)$",
              "default": "true"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Results per page, 1 to 1000 (default 100). A malformed, fractional, zero, negative or larger value is a 400 rather than clamped, the same rule `GET /v1/jobs` applies to its own `limit`. Until 2026-09-25 `limit=1001` was silently clamped to 1,000.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            }
          },
          {
            "name": "next_key",
            "in": "query",
            "description": "The `next_key` from the previous page. Opaque. It is read only for a batch or file job when results are returned (`include_results` on and the job has processed rows), and ignored otherwise. A single verification's job (the `job_id` from `POST /v1/verify`) has one result and never reads it, so any value there answers 200 with that result. When it is read, a value that does not decode or is not in the shape this endpoint issues is a 400 with code `INVALID_CURSOR`; start again without it. So is an empty `next_key=`; leave the parameter out for the first page. Until 2026-10-24 an empty `next_key=` was read as the first page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The job.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Job"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Only with `include_results`. `RESULT_SUPERSEDED`, `retryable: false`: a result in this job was produced by an older version of the verification classifier (for example a free-mail address stored as `disposable` before the provider exception), and the API withholds the whole page rather than publish a verdict the current classifier would not give, or silently drop the row. A completed job's rows are final, so the same request is refused the same way after any wait, and it carries no `Retry-After`. Verify those addresses again (a new job, charged as usual) to get current verdicts. Until 2026-10-02 this was `SERVICE_UNAVAILABLE` with `retryable: true`, and clients retried it as an outage. Any other 503 here is the shared one (`error.retryable` says whether waiting cures it).",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "verification:read"
        ]
      }
    },
    "/v1/jobs/{id}/download": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "operationId": "downloadJobResults",
        "summary": "Download a job's results",
        "description": "The whole result set as CSV or JSON, optionally filtered to one status. A large result set is answered with a short-lived presigned URL rather than inline.\n\n**Check `complete` before treating the file as the job's results.** The export is read from an eventually-consistent index, so a job that has just flipped to `completed` can be exported before its last rows are visible. Every JSON response here (the inline one and the presigned-link one) carries `complete`, `expected_rows` and `rows_missing`, measured against the job's own `processed_emails`. A short JSON export is reported, not refused: the index normally catches up within seconds, so request it again.\n\n**A `format=csv` export that is known to be short is refused with `409` (`retryable: true`), not served.** The bytes of a CSV have nowhere to carry the verdict, and a file that looks complete and is not is worse than no file. The refusal names the shortfall and offers `format=json`, which returns the rows that do exist together with the shortfall, inline. Note the size of a *filtered* export does not bound this: a selective filter on a large job can produce a handful of rows from a read that was badly short.\n\n**An empty read is not automatically a 404.** If the job counts addresses it finished and none of their rows are readable, the route answers `409` with `retryable: true` rather than `404 No results found for this job`. Retrying is the right next action and also distinguishes the two possible causes: the index catching up, which clears in seconds, or the rows having passed the plan's data-retention window, in which case they are gone. A job that genuinely produced no rows still answers 404.\n\nThe presigned URL is bound to the exact object version this request wrote, so the `complete` it arrives with describes the bytes it serves, even when two requests for the same export overlap. If that version cannot be bound, the route answers `503` rather than hand out an unbound link.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^(?:[Cc][Ss][Vv]|[Jj][Ss][Oo][Nn])$",
              "default": "csv"
            },
            "description": "Case-insensitive: the API lower-cases the query value before validating it, so `CSV` and `csv` are the same request. Expressed as a pattern rather than an enum, which can only list casings. Accepted values: `csv`, `json`."
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Export only part of the job. FOUR OF THESE ARE SUMMARY BUCKETS, not exact verdicts, because they mirror the counts in the job summary: `invalid` also returns disposable addresses; `risky` also returns catch_all, role and spam_trap; `unknown` also returns rows with no stored status at all. `valid` is exact, and so are the finer four: `catch_all`, `disposable`, `role` and `spam_trap` each return only themselves. Building a suppression list from `invalid` therefore gets the disposable addresses too, which is usually what is wanted; ask for the exact verdict when it is not. `all` is accepted and is the explicit no-op: the API treats it as \"no filter\" and names it in the 400 it returns for anything else, so it is spelled out here rather than left to `VerificationStatus`, which does not contain it. Case-insensitive: the API lower-cases the query value before validating it, so `ALL` and `all` are the same request. Expressed as a pattern rather than an enum, which can only list casings. Accepted values: `all`, `valid`, `invalid`, `risky`, `unknown`, `catch_all`, `disposable`, `role`, `spam_trap`. An empty `filter=` is a 400 like any other value outside them; leave the parameter out, or send `all`, for every result. Until 2026-10-24 an empty `filter=` downloaded every result.",
            "schema": {
              "type": "string",
              "pattern": "^(?:[Aa][Ll][Ll]|[Vv][Aa][Ll][Ii][Dd]|[Ii][Nn][Vv][Aa][Ll][Ii][Dd]|[Rr][Ii][Ss][Kk][Yy]|[Uu][Nn][Kk][Nn][Oo][Ww][Nn]|[Cc][Aa][Tt][Cc][Hh]_[Aa][Ll][Ll]|[Dd][Ii][Ss][Pp][Oo][Ss][Aa][Bb][Ll][Ee]|[Rr][Oo][Ll][Ee]|[Ss][Pp][Aa][Mm]_[Tt][Rr][Aa][Pp])$",
              "default": "all"
            }
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The rows themselves, or a link to them when the set is large. Neither form is wrapped in the standard `{success, data}` envelope, so a deserializer expecting one rejects every successful download. `format=csv` answers with `text/csv`, not JSON.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/JobResultsInline"
                    },
                    {
                      "$ref": "#/components/schemas/JobResultsLink"
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Raw CSV, with a Content-Disposition attachment filename."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The export could not be given to you as asked, for one of two reasons. Both are `retryable: true`, and the message says which.\n\n**The job counts results and none of their rows are readable.** Either the results index has not caught up, which clears within seconds, or the rows have passed the data-retention window for the job's plan, in which case they are gone and retrying will keep returning this. The route cannot tell those apart; retrying distinguishes them at no cost, which is why it is marked retryable, but do **not** present this to a user as \"nothing was lost\".\n\n**A `format=csv` export is known to be short.** A CSV body has nowhere to report a shortfall, so it is refused rather than handed over looking complete. The message names the missing row count; ask for `format=json` to read the rows that do exist right now, with the shortfall alongside.\n\nNothing is charged for either.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Told apart by `error.code`.\n\n**`RESULT_SUPERSEDED`** (`retryable: false`): a result in this job was produced by an older version of the verification classifier (for example a free-mail address stored as `disposable` before the provider exception), and the API withholds the whole export rather than publish a verdict the current classifier would not give, or silently drop the row. A completed job's rows are final, so the same request is refused the same way after any wait, and it carries no `Retry-After`. Verify those addresses again (a new job, charged as usual) to get current verdicts. Until 2026-10-02 this was `SERVICE_UNAVAILABLE` with `retryable: true`, and clients retried it as an outage.\n\n**`SERVICE_UNAVAILABLE`** (`retryable: true`): for example, a large export was written but could not be linked to the exact version this request produced, so no link was handed out. Try again.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "verification:read"
        ]
      }
    },
    "/v1/jobs/{id}/cancel": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "operationId": "cancelJob",
        "summary": "Cancel a running batch",
        "description": "Stop a running batch. Unprocessed addresses are not verified, and the credits held for them are refunded.\n\n**The stop is immediate; the refund is not.** The job is `cancelled` the moment this returns, and no message still queued for it will be verified. The refund waits for the addresses already in a worker's hands to finish (the longest an in-flight check can take, plus a margin), because paying back an address that was in fact checked would be wrong in the customer's favour and would leave the job's counters behind its own results. So expect `billing_status: \"charged\"` on a `cancelled` job for a few minutes, then `\"refunded\"`. Nothing is required of you in between: reading the job, or the platform's own reconciliation sweep, completes it.\n\n**`charged` does not always become `refunded`.** A cancel that arrives just after the last address was checked owes nothing, and the job keeps `charged` permanently, and correctly, because those credits were spent. Do not wait on the billing status; wait for `completed_at`. A cancel writes the status immediately and leaves `completed_at` null, and every path that closes the books (the refund, and the settle for a job that owed nothing) sets it. While it is null a refund is still on its way; once it is set the books are closed however they closed. The counters agree in the ordinary case but not always, and a job the platform reconciled without moving them would keep a counter-based poller waiting for ever.\n\n**This is about the money only.** The verdicts are final the moment the job reads `cancelled`: every result is written together with the job's progress counter in one conditional write that requires the job to still be running, so once the cancel lands nothing further can be recorded. Read the results, and the export, straight away. A refund that could not be applied ends at `refund_failed`, which is also final and needs support rather than patience.\n\n**What the job keeps.** Every address checked before the cancel stays, and stays billed. `GET /v1/jobs/{id}` returns those results immediately. `GET /v1/jobs/{id}/download` exports them without waiting for the refund: the worker writes each result together with the job's progress counter in one conditional write that requires the job to still be running, so the cancel closes the result set as it lands. Index propagation is a separate, much shorter wait: the results index is eventually consistent, so a first download can still answer `409` (`retryable: true`) or carry `complete: false`. Retry it. `total_emails` collapses onto the addresses actually checked and billed, so `requested_emails` is what you submitted. Read progress as `processed_emails` of `requested_emails`.\n\n**Repeating the request succeeds.** Cancelling an already-cancelled job returns `200` with the job and tries any outstanding refund again; that does not guarantee it lands. `completed_at` says when it has, and `refund_failed` is final and needs support. A job that has already `completed` or `failed` answers `409`: there is nothing left to stop, and its results are unaffected.\n\nBatch and file jobs only. A single verification answers `400`: it finishes in seconds and its credit settles when the result lands.\n\nA cancel and a completion cannot both commit: the worker finishes a job on a condition over the running statuses, so whichever of the two writes first makes the other impossible.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The job, now cancelled. `billing_status` is `refunded` once the remainder has been paid back, `charged` while in-flight addresses are still draining, and also `charged` for good when the cancel arrived after the last address, so nothing was owed. Compare `total_emails` with `processed_emails` to tell those two apart.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Job"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The job cannot be cancelled: it has already `completed` or `failed`, or it has not started yet. The second case carries `retryable: true`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "verification:write"
        ]
      }
    },
    "/v1/find": {
      "post": {
        "tags": [
          "Search"
        ],
        "operationId": "findEmail",
        "summary": "Find a business address",
        "description": "Works out a person's work address from their name and their company's mail domain, and checks the candidates with the domain's mail server. Charges 5 credits.\n\n**Only `verified: true` is a confirmed address.** It is set on a `valid` verdict alone: the mail server accepted the mailbox, and the domain does not accept mail for every address. A result with `verified: false` can still carry an `email` (`catch_all`, `risky`, `role`): that is the best guess for this person, the candidate the finder ranked highest. On `catch_all` the domain accepts every address, so nothing was confirmed, and the `message` says whether the guess follows a pattern an address at this domain was confirmed with before or is only the most common pattern; on `risky` the server showed the mailbox exists (it accepted it, or reported it full), but risk signals remain. A `role` address (such as `info@`) can be a mailbox the server accepted, but it reaches a shared inbox, so it is not confirmed as this person's. Do not count it as found.\n\n**Needs the Starter plan or higher.** On the Free plan the request is refused with `403 PLAN_UPGRADE_REQUIRED` before anything is charged.\n\n`status` is the verdict on the address it settled on: `valid`, `risky`, `role`, `catch_all` or `not_found`. `unknown` is no longer returned (an inconclusive check is the `503` below), nor is `invalid_name` (an unusable name is a `400`). A `catch_all` outcome still charges, and it is INCONCLUSIVE rather than negative: the domain accepts every recipient, so no address could be confirmed either way. It may come back with a best-guess `email` (unverified) or with `email: null` (both shapes occur), so branch on `status`, never on whether `email` is present.\n\nA name over 64 characters is a 400 before the charge: RFC 5321 caps a local part at 64 octets, so no candidate could exist. So is a name that spells to more than 64 letters in a-z (`\u00df` is written `ss`).\n\n**Names are spelled in a-z before the candidates are built.** Accents are dropped, and letters with no accent to drop are written the usual way: `\u00f8` as `o`, `\u00e6` as `ae`, `\u00df` as `ss`, `\u0142` as `l`, `\u0111` and `\u00f0` as `d`, `\u00fe` as `th`, `\u0131` as `i`, `\u0153` as `oe`, so S\u00f8ren is searched as `soren`. A name that also contains a letter with no single a-z spelling (such as `\u0259`, `\u0292` or `\u0283`, or a letter from another script next to Latin ones) is a `400` with nothing charged, rather than a search for a misspelled name.\n\n**A `catch_all` status does not guarantee an address.** When the domain accepts every recipient and no candidate clears the confidence threshold, the paid result comes back with `email: null` and `confidence: 0`: you have bought the search and learned that no address can be confirmed.\n\n**A special-use domain is a 400 before the charge.** `.example`, `.test`, `.invalid`, `.localhost`, `.local`, `.onion`, `.alt`, `.internal`, `.corp`, `.home`, `.mail`, and `home.arpa` with the other special-use `.arpa` names are never answered for in the public DNS, so no address under them can exist and every candidate could only fail. So are RFC 2606's documentation domains `example.com`, `example.net` and `example.org` and any name under them: they resolve, but publish a null MX, and the worker refuses them before SMTP. They used to be searched and billed (5 credits) for a `not_found` that was certain before the search began.\n\n**A domain that cannot receive mail is a 400 before the charge.** Its mail servers are read the way `GET /v1/domain/{domain}` reads them: a domain that does not exist, publishes a null MX (RFC 7505), or has neither an MX record nor an A or AAAA address is a `400` saying which, with nothing searched and nothing charged. A domain with only an address record receives mail there (RFC 5321's implicit MX) and is searched. A lookup that fails is a `503` with `retry_after_seconds`, also uncharged.\n\n**A public mailbox provider is a 400 before the charge.** gmail.com, yahoo.com, outlook.com and the other domains `POST /v1/verify` reports `free_provider: true` for hold addresses their owners chose, not ones built from a name, so a person's address there cannot be found from their name: any address returned could belong to someone else.\n\nBoth refusals apply to new work only: a repeat under an `Idempotency-Key` whose earlier attempt was paid for is still answered from its receipt.\n\n**An incomplete negative search is a 503, not a `not_found`.** When the search produces no usable candidate and some generated addresses remain unanswered (a probe timed out or the search budget ended), it cannot establish that the other addresses are absent. This includes searches where some candidates were rejected and others could not be checked, and probes that settled nothing about the mailbox: `unknown`, a policy block of the sending server, greylisting, a temporary or connection failure, or `risky` without evidence that the mailbox exists. Such a probe is never returned as the address. It answers a retryable `503 SERVICE_UNAVAILABLE` and charges nothing; with an `Idempotency-Key` the charge is refunded, so a retry under the same key is a new paid search rather than a replay. A `not_found` is billed only when every generated candidate was answered.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindRequest"
              },
              "examples": {
                "basic": {
                  "value": {
                    "first_name": "Ada",
                    "last_name": "Lovelace",
                    "domain": "YOUR_TARGET_DOMAIN"
                  },
                  "summary": "Replace YOUR_TARGET_DOMAIN with the company mail domain to search"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The search. Branch on `status`, not on whether `email` is present, and treat an address as found only when `verified` is true.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "first_name": {
                          "type": "string"
                        },
                        "last_name": {
                          "type": "string"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email",
                          "description": "The address settled on, or `null`. Null is NOT the same as 'no address exists': on a catch-all domain nothing could be confirmed either way. And an address is not the same as a find: with `verified: false` it is a best guess, not an address confirmed as this person's."
                        },
                        "confidence": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "pattern": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The pattern `email` was built from, e.g. `first.last`. It says something about the domain only when `verified` is true. On a best guess (`verified: false`) it is just the pattern of the candidate the finder ranked highest, not one the domain was seen to use. `null` when there is no `email`."
                        },
                        "verified": {
                          "type": "boolean",
                          "description": "True only on a `valid` verdict: the mail server accepted this mailbox, and the domain does not accept mail for every address. False on every other status, including those that still return an `email`: on a catch-all result the server accepts everything, so nothing was confirmed; on `unknown` the check could not conclude; on `risky` the address may receive mail but risk signals or incomplete proof remain; a `role` address reaches a shared mailbox (the server may have accepted it), so it is not confirmed as this person's. An `email` with `verified: false` is a best guess for this person."
                        },
                        "status": {
                          "type": "string",
                          "examples": [
                            "valid",
                            "risky",
                            "role",
                            "unknown",
                            "catch_all",
                            "not_found",
                            "invalid_name"
                          ],
                          "description": "The verdict on the address returned: `valid`, `risky` (the mail server showed the mailbox exists, with risk signals), `role`, `catch_all` (inconclusive rather than negative), or `not_found`. An inconclusive check is never a status here: it is a `503`."
                        },
                        "message": {
                          "type": "string"
                        },
                        "credits_used": {
                          "type": "number",
                          "description": "5 for a search. Still 5 on a de-duplicated repeat; read `idempotent_replay` to tell a second charge from a free one."
                        },
                        "credits_remaining": {
                          "type": "number"
                        },
                        "idempotent_replay": {
                          "type": "boolean",
                          "description": "Present and true when this repeated a search already charged for, and therefore charged nothing. With an `Idempotency-Key`, the repeat replays the stored result during the plan's retention period; the receipt stays at least 30 days and refuses an expired result with 410. Without a key, an identical search is still settled on the original charge inside a fixed two-minute bucket."
                        }
                      },
                      "required": [
                        "first_name",
                        "last_name",
                        "email",
                        "confidence",
                        "status",
                        "credits_used"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request cannot be searched, and nothing was charged. A malformed request or a field this endpoint does not accept; a name with no a-z letter, with a letter that has no single a-z spelling, or longer than 64 characters or letters once spelled; a special-use or RFC 2606 domain; a domain that cannot receive mail (it does not exist in DNS, publishes a null MX, or has no MX record and no A or AAAA address); or a public mailbox provider. The message says which, and `nothing_charged` is true. Retrying it unchanged will fail identically.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "One of two codes, and this answer adds no charge in either case. `IDEMPOTENCY_KEY_CONFLICT`: the `Idempotency-Key` was used before for a different search on this route. A repeat whose names spell the same in a-z letters (differing only in case, accents, letters such as ø or ß, punctuation or spaces), at the same domain apart from case or a leading `www.`, is the same search and is replayed, not refused. Repeat the original request, or use a new key. `CONFLICT` with `retryable: true`: a copy of this same request under the same key was charged and is still searching. Wait, then repeat it with the SAME key, which replays that search's stored result (`idempotent_replay: true`) without charging again. A new key buys the search a second time. The bulk finder answers the same state the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "410": {
            "$ref": "#/components/responses/IdempotentJobExpired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "The domain's mail servers could not be looked up (nothing was searched or charged; retry after `retry_after_seconds`), the credit debit could not be completed because the balance was being changed concurrently, or the search produced no usable candidate and some generated addresses remained unanswered or answered only inconclusively (a policy block, greylisting, a temporary failure). Even if other candidates were rejected, this incomplete search is not a `not_found`. The debit refusal charges nothing; an incomplete keyed search is refunded. If that refund itself fails, the message says the charge is still unsettled, and a retry under the same `Idempotency-Key` within 15 minutes finishes the paid search without charging again. A charge that stored no result and is not retried within 15 minutes is refunded automatically, and a later retry runs, and is charged, as a new search. Treat the request as uncharged only when the response confirms it. Retry; a refusal for lack of credits is `402`, which is permanent until the balance changes.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The search failed in a way the API could not classify. This answer covers a failure in the cached pattern lookup, the search itself or the credit debit, so **the billing state is genuinely unknown**: an exception during the debit can leave the charge applied with no answer to show for it.\n\nRetry the SAME search with the SAME `Idempotency-Key`: a repeat under it replays the stored result, or, within 15 minutes of the charge, finishes the paid search, without charging again. A charge that stored no result is refunded automatically after 15 minutes, and a repeat after that is charged once, as a new search. The receipt lasts at least 30 days; after the result expires, a repeat returns 410 without another charge. Without a key, an identical repeat is settled on the original charge only inside a fixed two-minute bucket, and the answer carries `idempotent_replay: true` when it was. Check `GET /v1/usage` before waiting.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "verification:write"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/find/bulk": {
      "post": {
        "tags": [
          "Search"
        ],
        "operationId": "findEmailBulk",
        "summary": "Find business addresses for several people",
        "description": "The same lookup for several people at one domain. Needs the Starter plan or higher, like `POST /v1/find`: on the Free plan it is refused with `403 PLAN_UPGRADE_REQUIRED` before anything is charged. Retry-safe for FIFTEEN MINUTES: the receipt a completed lookup writes has a 15-minute TTL, so a repeat inside that window replays the summary (rather than the individual results) and charges nothing, and a repeat after it is a new paid lookup. A delayed retry is not free. A matching request that is still in flight answers a retryable `409`, and once its first attempt has stopped a repeat takes it over without another charge, until it has been left alone for 60 minutes. After that, what the stopped request did not deliver is refunded automatically (all of the charge less anything already refunded) and the request is released, so a repeat is a new paid lookup.\n\n**What it charges, before it starts.** 5 credits per person (the single finder's price) multiplied by the number of different people whose names are usable, debited up front. **A person listed more than once is searched and charged once**: rows whose first name and last name spell the same in a-z (case, accents, letters such as `\u00f8` or `\u00df`, spaces, hyphens and apostrophes aside) are one person, share one search and one charge, and each get that person's answer, a repeat marked with `duplicate_of`. Names in the other order, or that differ by a letter, are different people. The balance check counts people the same way, so a request is never refused for credits its repeated rows would have cost. Up to 50 rows per request (repeated and unusable rows count toward the 50), so up to **250 credits** on one call. Until November 2026 each row was charged: the same person on three rows cost 15 credits.\n\n\"Usable\" is the same rule as `POST /v1/find`: both names must contain at least one letter after normalization (spelled in a-z: accents dropped, `\u00f8` as `o`, `\u00df` as `ss` and so on, then only `a-z` kept), and no letter without a single a-z spelling. A person who fails it comes back as an `invalid_name` row, with a `message` saying why, and is **not** charged for, so the debit is 5 x the number of different chargeable people (`unique_people` in the response) rather than 5 x the list length. Count them yourself before submitting if the difference matters: nothing in the request tells you which rows will be free.\n\n**A special-use domain is a 400 before the charge.** `.example`, `.test`, `.invalid`, `.localhost`, `.local`, `.onion`, `.alt`, `.internal`, `.corp`, `.home`, `.mail`, and `home.arpa` with the other special-use `.arpa` names are never answered for in the public DNS, so no address under them can exist and every candidate could only fail. So are RFC 2606's documentation domains `example.com`, `example.net` and `example.org` and any name under them: they resolve, but publish a null MX, and the worker refuses them before SMTP. They used to be searched and billed (5 credits per usable name) for a `not_found` that was certain before the search began. A name over 64 characters, or one that spells to more than 64 letters, is a 400 for the whole request.\n\n**A domain that cannot receive mail, or a public mailbox provider, is a 400 for the whole request before the charge**, exactly as on `POST /v1/find`, and a failed mail-server lookup is an uncharged `503`. An earlier attempt of the same request that was already charged, replayed or recorded is still answered from its retry protection instead.\n\n**A person whose probes settled nothing is `not_checked` and refunded**: a probe that is `unknown`, a policy block, greylisting, a temporary failure or `risky` without evidence that the mailbox exists is never that person's address.\n\n**Only a row with `verified: true` is a confirmed address**, exactly as on `POST /v1/find`. A row with an `email` and `verified: false` is a best guess, and `found` counts it; `verified_found` counts only the confirmed rows.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindBulkRequest"
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The searches that were run, one row per input row in request order (`results[i]` answers `people[i]`), with a repeated person's rows sharing one answer. **Not necessarily one result per person**: when the request approaches its time limit the API stops, refunds the chargeable tail it did not process, and still answers 200 with `processed` below `total` and a shorter `results` array. Compare `processed` with `total` before treating a missing person as not found, and read `credits_used` for what was actually charged after the refund.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "domain": {
                          "type": "string",
                          "description": "The domain the searches ran against, normalized (lower-cased, one leading `www.` stripped)."
                        },
                        "pattern": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The address pattern this run's confirmed rows (`verified: true`) use, the most common one among them (each person counted once however many rows name them), or `null` when the run confirmed none. It is not a pattern remembered from earlier searches or the pattern of a best guess. On a replay it is the original run's value."
                        },
                        "results": {
                          "type": "array",
                          "description": "One entry per row PROCESSED, in request order, so `results[i]` answers `people[i]` (see the description above); a row absent from this array was not searched for, which is not the same as not found. Rows that name the same person carry the same answer.",
                          "items": {
                            "type": "object",
                            "required": [
                              "first_name",
                              "last_name",
                              "email",
                              "confidence",
                              "pattern",
                              "verified",
                              "status"
                            ],
                            "properties": {
                              "first_name": {
                                "type": "string"
                              },
                              "last_name": {
                                "type": "string"
                              },
                              "email": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "confidence": {
                                "type": "number"
                              },
                              "pattern": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The pattern `email` was built from, e.g. `first.last`. It says something about the domain only when `verified` is true. On a best guess (`verified: false`) it is just the pattern of the candidate the finder ranked highest, not one the domain was seen to use. `null` when there is no `email`."
                              },
                              "verified": {
                                "type": "boolean",
                                "description": "As on `POST /v1/find`: true only on a `valid` verdict. A row with an `email` and `verified: false` is a best guess, not an address confirmed as this person's."
                              },
                              "status": {
                                "type": "string",
                                "description": "`catch_all` is inconclusive rather than negative: the domain accepts every recipient, so nothing could be confirmed either way. `not_checked` means the search produced no usable candidate and did not receive a definite answer for every generated address (a probe that timed out, or one that settled nothing: `unknown`, a policy block, greylisting, a temporary failure, `risky` without mailbox evidence). Some candidates may have been rejected; the remaining addresses are unmeasured, so no negative conclusion can be drawn about the person. This person is refunded. `invalid_name` means no candidate could be generated from the name; its `message` says why, and the person is not charged."
                              },
                              "message": {
                                "type": "string"
                              },
                              "duplicate_of": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Present only on a row that names the same person as an earlier row: the index in `people` (counting from 0) of the first row that names them. This row shares that row's search and charge, so everything but `first_name` and `last_name`, which echo this row as it was sent, is that row's answer."
                              }
                            }
                          }
                        },
                        "total": {
                          "type": "integer",
                          "description": "Rows in the request (the length of `people`), repeated people and unusable names included."
                        },
                        "processed": {
                          "type": "integer",
                          "description": "Rows answered in `results`. Below `total` means the run stopped early: the rows from the first row whose person it did not search onward are left out, and those people were refunded. `not_checked` rows count as processed, and their people are refunded too."
                        },
                        "unique_people": {
                          "type": "integer",
                          "description": "Different people with a usable name in the request: rows that name the same person count once. The request was charged 5 x this before any refund. Absent only on a replay (`replayed: true`) of a summary stored before this field existed: count nothing in that case rather than reading it as zero."
                        },
                        "duplicate_rows": {
                          "type": "integer",
                          "description": "Rows that name a person an earlier row already named. Each carries `duplicate_of` and was not charged again. Absent only on a replay of a summary stored before this field existed."
                        },
                        "found": {
                          "type": "integer",
                          "description": "Rows that carry an address, best guesses (`verified: false`) included, so a person on three rows counts three times. Not a count of confirmed addresses: count the rows with `verified: true` for that."
                        },
                        "verified_found": {
                          "type": "integer",
                          "description": "Rows whose address a mail server confirmed (`verified: true`). Never more than `found`. Absent only on a replay (`replayed: true`) of a summary stored before this field existed: count nothing in that case rather than reading it as zero."
                        },
                        "credits_used": {
                          "type": "number",
                          "description": "What was charged after any refund for an unprocessed tail or for `not_checked` people: 5 \u00d7 `unique_people` less those refunds, not 5 \u00d7 `total`. **On `replayed: true` this is the ORIGINAL request's cost, not what this call charged**: a replay within the 15-minute window charges nothing and returns the first response's summary verbatim. Summing this across responses without checking `replayed` counts the same debit twice."
                        },
                        "credits_remaining": {
                          "type": "number"
                        },
                        "replayed": {
                          "type": "boolean",
                          "description": "Present and true when this returned an earlier identical request's summary under the same retry protection. `results_available: false` accompanies it: the counts replay, the individual rows do not."
                        },
                        "results_available": {
                          "type": "boolean",
                          "description": "False on a replay, where only the summary was kept."
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "domain",
                        "results",
                        "total",
                        "processed",
                        "found",
                        "credits_used"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request cannot be searched, and nothing was claimed or charged. A malformed request, a field this endpoint does not accept, more than 50 people, or a person whose name is longer than 64 characters or letters once spelled; a special-use or RFC 2606 domain; a domain that cannot receive mail (it does not exist in DNS, publishes a null MX, or has no MX record and no A or AAAA address); or a public mailbox provider. The message says which. Retrying it unchanged will fail identically.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "409": {
            "description": "A matching request is already using this retry key or is being reset. Wait and retry the identical request: it is the retry protection working, not a rejection of the payload. Or, when an `Idempotency-Key` was sent: the same key was used for a different request (`IDEMPOTENCY_KEY_CONFLICT`). Repeat the original request exactly, or choose a new key. Nothing was charged and nothing was started in either case. One more `409 CONFLICT` is final (`retryable: false`): a matching request failed after it was charged and its refund could not be confirmed. That charge may stand: look for its refund in `GET /v1/usage/credits/transactions`, and ask support to reconcile it if there is none. The identical request is refused for a day after the failure (the message gives the time); after that it runs, and is charged, as a new search.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "The domain's mail servers could not be looked up (nothing was claimed or charged; retry after `retry_after_seconds`), the retry-protection record could not be read, a credit reservation for a matching request is still confirming, or the search finished but could not be finalized safely. Retry the identical request rather than a new one: these are the states where a fresh payload risks buying the same search twice. It also answers a search in which every chargeable person had an incomplete candidate search and no usable address was established, including partial rejected-candidate evidence. After the whole charge is refunded, nothing was charged and a retry of the identical request runs a new search.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The bulk search failed after it was charged for. Several branches answer this (job setup, processing, the refund of an unprocessed tail, and finalizing the retry protection), and some of them say outright that credits could not be refunded and need reconciliation. **Money may still be debited.** Read the message, check `GET /v1/usage`, and do not send the same payload again until you know which happened.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "verification:write"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/domain/{domain}": {
      "get": {
        "tags": [
          "Search"
        ],
        "operationId": "searchDomain",
        "summary": "Look at a domain",
        "description": "Which common addresses at a domain its mail server accepted (or reported full), and whether the domain accepts mail for every address. The domain's mail servers are read to decide whether a search can start, but they are not returned.\n\n**This GET starts work and charges.** The first call for an uncached domain claims the domain, deducts **10 credits**, enqueues every candidate to the verification worker, and returns immediately with `status: \"processing\"` and an **empty `emails` array**. That empty array is not the answer: it means the search has just begun.\n\nRepeat the same GET to poll. Each poll assembles whatever this search's own checks have finished (results other checks left in the shared cache are not used, and an address is listed only when a mail server accepted it or reported its mailbox full); when every candidate has a definite answer, the domain turns out to be catch-all, or the job ages out (about 30 seconds), it returns `status: \"completed\"`. A complete search is cached for 7 days. A candidate counts as checked only on a definite answer: a found mailbox, or a definite no (`invalid`, `disposable`, `spam_trap`). An answer that settles nothing (`unknown`, `risky` without mailbox evidence, a `policy_block`, `greylisted`, `temporary_failure`, `connection_failure` or `dns_only` result, or no answer at all) does not, so a search where some candidates got no definite answer ends as `completion_reason: \"time_limit_reached\"` with `patterns_checked` below the total. That partial result is kept for 15 minutes, not 7 days; the next search after that runs (and charges) afresh. **The poll that completes a partial search refunds the unchecked share of the 10 credits** to the account that started it, in half credits rounded in the customer's favour (nothing checked refunds all 10), and reports it as `credits_refunded`. **Polling never charges again** (the owner paid at the first call), and a search served from that 7-day cache charges nothing at all: it answers `credits_used: 0` for the owner and for anyone else.\n\n**This route does not read `Idempotency-Key`.** A repeat is settled by the domain's own search record, as above: while the search runs a repeat polls it for free, and the result is then served free for 7 days (15 minutes for a partial one). After that, the next call starts, and is charged for, a new search.\n\n**A domain that cannot receive mail is answered before anything is charged.** Before a new search is started, the domain's mail servers are read the way the verifier reads them: an MX record with a real host, or, with no MX at all, the domain's own A or AAAA address (RFC 5321's implicit MX). A domain that does not exist, publishes a null MX (RFC 7505), or has neither an MX nor an address is a `400` saying which, with nothing searched and no credits charged: no mailbox can exist there. Such a search used to be queued and billed 10 credits for 46 answers known in advance. A lookup that fails (no answer, SERVFAIL) is a `503`, also uncharged; retry it. A domain under a special-use top-level name (`.example`, `.test`, `.invalid`, `.localhost`, `.local`, `.internal` and the other special-use names listed under `POST /v1/find`) is a `400` before anything is read.\n\n**A public mailbox provider is a 400 before anything is charged.** gmail.com, yahoo.com, outlook.com and the other domains `POST /v1/verify` reports `free_provider: true` for hold mailboxes of unrelated individuals, not one organization, so their common addresses would only list strangers' mailboxes. A cached result for one is not served; a search already running for one still finishes for the account that paid for it.\n\n**Searches that are not paid for in full are limited to 20 per account per UTC day.** A search counts from the moment it starts until its result is collected. One that completes with every mailbox answered, or as a catch-all domain, keeps its charge and stops counting; one that ends `time_limit_reached` (and is refunded the unchecked share) counts for the rest of the day, and so does one nobody has polled to completion yet. At the limit a new search is a `429` with `retry_after_seconds` (and `Retry-After`) up to midnight UTC, and nothing is claimed, queued or charged. Polling a search, and a domain served from the cache, never count and are never refused by it. Without it an account could start search after refunded search at no cost while each one still ran its 46 checks against mail servers it picked.\n\nTreating the first response as the finished result is the mistake this endpoint invites: you have paid for a search and read none of it.",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "example.com"
              ]
            },
            "description": "A bare registrable domain name. **Normalized before it is validated**, which is why no `format: hostname` or `pattern` is declared here: the API trims, lower-cases, punycodes an internationalized domain and then strips ONE leading `www.`, in that order, because IDNA maps the Unicode label separators (`\u3002`, `\uff0e`, `\uff61`) to `.`, so `www\u3002m\u00fcnchen.de` only grows its ASCII dot during the fold. Only then is the format checked. So `\" WWW.Example.COM \"` and `m\u00fcnchen.de` are both accepted; the latter is checked as `xn--mnchen-3ya.de`, the same fold `/v1/verify` applies to the domain half of an address. A scheme, a path or a port is NOT stripped and is a `400 Invalid domain format`; send the host on its own. At least two labels are required, each label 1\u201363 characters, and the TLD either letters only and at least two (`com`, `de`) or a decodable `xn--` A-label of an internationalized one (`\u043f\u0440\u0438\u043c\u0435\u0440.\u0440\u0444` is checked as `xn--e1afmkfd.xn--p1ai`). The A-label must decode AND be the canonical spelling of what it decodes to, not merely carry the prefix: `example.xn--abc` decodes to nothing, and `example.xn---7a` decodes to `\u00a1` whose one canonical form is `xn--7a`. Neither can name a TLD any root zone holds, so both are refused rather than charged for."
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The search, in whichever state it is in. `status` is the field to branch on: `processing` means the work has started and `emails` is empty because nothing has finished yet, NOT that the domain has no addresses.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "domain": {
                          "type": "string",
                          "description": "The domain as normalized: lower-cased, one leading `www.` stripped."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "processing",
                            "completed"
                          ],
                          "description": "`processing`: the work is under way and `emails` is EMPTY BECAUSE NOTHING HAS FINISHED. Repeat the same GET to poll; polling is free. `completed`: this is the answer."
                        },
                        "emails": {
                          "type": "array",
                          "description": "Addresses found, and empty until `status` is `completed`. Also empty on a completed search of a catch-all domain, where no individual address could be confirmed, so read `catch_all_domain` before concluding there are none.",
                          "items": {
                            "type": "object",
                            "description": "One discovered address. It carries no `confidence`; `quality_score` is the number to sort or threshold on.",
                            "properties": {
                              "email": {
                                "type": "string",
                                "format": "email"
                              },
                              "status": {
                                "$ref": "#/components/schemas/VerificationStatus"
                              },
                              "quality_score": {
                                "type": "integer",
                                "description": "The verification quality score for this address, 0-100. Rows are returned sorted by it. `0` where the stored verification carried none, not a measurement of nothing."
                              },
                              "is_role_account": {
                                "type": "boolean",
                                "description": "An address that reaches a function rather than a person (`info@`, `support@`). True when the verification flagged it OR the status is `role`. Most common-prefix hits on a small domain are these, which is why it is on every row rather than left to be inferred from the local part."
                              },
                              "is_catch_all": {
                                "type": "boolean",
                                "description": "The mailbox could not be confirmed because the domain accepts every recipient. NOT a negative result, and not the same as `catch_all_domain`, which says the whole search ended that way."
                              },
                              "from_cache": {
                                "type": "boolean",
                                "description": "This row came out of the verification cache rather than being probed during this search. Per row, and distinct from the response-level `from_cache`, which is about the whole completed search."
                              }
                            },
                            "required": [
                              "email",
                              "status",
                              "quality_score",
                              "is_role_account",
                              "is_catch_all",
                              "from_cache"
                            ]
                          }
                        },
                        "email_count": {
                          "type": "integer",
                          "description": "`emails.length`, for a client that only needs the count."
                        },
                        "job_id": {
                          "type": "string",
                          "description": "The search this poll belongs to. Present on the polls of the account that started the search while work is in flight. Another account polling the same domain gets the progress only, without the job id or any addresses."
                        },
                        "progress": {
                          "type": "object",
                          "description": "How far the search has got. `percent` is capped at 99 until the search completes, so 100 only ever means finished.",
                          "properties": {
                            "checked": {
                              "type": "integer"
                            },
                            "total": {
                              "type": "integer"
                            },
                            "percent": {
                              "type": "integer"
                            }
                          }
                        },
                        "progress_percent": {
                          "type": "integer",
                          "description": "The same number as `progress.percent`, flattened."
                        },
                        "patterns_checked": {
                          "type": "integer",
                          "description": "Candidate addresses with a definite answer: a found mailbox or a definite no. An inconclusive answer, or none, is not counted. Present once the search completes."
                        },
                        "completion_reason": {
                          "type": "string",
                          "enum": [
                            "all_candidates_checked",
                            "time_limit_reached",
                            "catch_all_domain"
                          ],
                          "description": "Why the search stopped. `time_limit_reached` means the answer is partial: some candidates got no definite answer (no reply in time, deferred, refused, or a policy block of our sending address), so fewer were checked than exist. A partial result is kept for 15 minutes rather than 7 days, and its unchecked share of the charge is refunded. `catch_all_domain` means no individual address could be confirmed at all."
                        },
                        "catch_all_domain": {
                          "type": "boolean",
                          "description": "True when the domain accepts every recipient, so an empty `emails` says nothing about which addresses exist."
                        },
                        "from_cache": {
                          "type": "boolean",
                          "description": "True when this came from the completed cache: 7 days for a complete search, 15 minutes for a partial one (`time_limit_reached`). Free, for the owner and for anyone else."
                        },
                        "credits_used": {
                          "type": "number",
                          "description": "10 on the call that starts the search, 0 on every poll and on a cache hit. Read it rather than assuming."
                        },
                        "credits_refunded": {
                          "type": "number",
                          "description": "Present only on the poll, by the account that started the search, that completes a partial search (`time_limit_reached`) it paid for: the credits given back for the candidates it could not check, in half credits. `credits_remaining` already includes them. A later read of the cached result does not repeat it."
                        },
                        "credits_remaining": {
                          "type": "number"
                        },
                        "message": {
                          "type": "string",
                          "description": "Prose for the state above, including why a search stopped early."
                        },
                        "cached_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the cached answer was measured. Present on a cache hit whose stored row carries the timestamp. `from_cache: true` alone cannot tell a result measured minutes ago from one about to fall out of the 7-day cache; this can."
                        }
                      },
                      "required": [
                        "domain",
                        "status",
                        "emails",
                        "email_count",
                        "credits_used"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The domain cannot be searched, and nothing was charged. `Invalid domain format` (see the `domain` parameter); a special-use name the public DNS never answers for (such as `.example`, `.test` or `.local`); or a domain that cannot receive mail, so no mailbox can exist there: it does not exist in DNS, it publishes a null MX (RFC 7505), or it has no MX record and no A or AAAA address to deliver to; or a public mailbox provider such as gmail.com, whose mailboxes belong to unrelated individuals. The message says which. Retrying it unchanged will fail identically until the domain's DNS changes.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "description": "Too many requests, or this account's daily limit on searches that are not paid for in full: 20 per UTC day that ended `time_limit_reached` (refunded) or have not been polled to completion yet. Neither starts, queues or charges anything. The limit's message says so, and `retry_after_seconds` (with `Retry-After`) is the time to midnight UTC. A search still running stops counting once a poll completes it with every mailbox answered, or as a catch-all domain, so repeat the GET for those to collect them. Domains in the cache are still served, free.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "The search could not start or could not be resumed: the cache read was unavailable, the domain's mail servers could not be looked up, the account's daily search limit could not be read, a legacy search could not be refreshed, or the credit debit hit transient contention. These fail BEFORE the charge, so retry the same GET. Because polling is the same request as starting, a retry either resumes the search already paid for or starts one; it does not buy a second.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The search could not be started, or it failed in a way the API could not classify. Four failures answer this: reserving the search, queueing its candidates (none were queued), a credit deduction that failed, and any other unexpected error.\n\n**The envelope says when nothing was charged.** Reserving and queueing come before the debit. A deduction that failed is settled before answering: if it was charged after all, the search is kept and answered `200` with `status: \"processing\"` instead of this error, and if it was not, the search is dropped, nothing can charge for it any more, and the message says `No credits were charged`. None of these carries `retry_may_charge_again`. When the deduction's outcome could not be established, or the failure was an unexpected one, the answer is ambiguous on money and the envelope carries `retry_may_charge_again: true`: check `GET /v1/usage/credits/transactions` before searching the same domain again. Calling the same GET again is still the cheaper first move: a search still in flight is polled free, and a domain in the 7-day completed cache is served free (look at `from_cache`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "verification:write"
        ]
      }
    },
    "/v1/activity/{email}": {
      "get": {
        "tags": [
          "Activity"
        ],
        "operationId": "getEmailActivity",
        "summary": "Engagement history for an address",
        "description": "Opens and clicks that your own account's Kawaa tracking pixels and tracked links have recorded for the address. Only your account's tracking counts: engagement another Kawaa customer's tracking observed for the same address is never returned. Charges 0.5 credits.\n\nThis is engagement history, not a verification: it says nothing about whether the mailbox exists. An address your tracking has recorded nothing for comes back with `level: \"unknown\"` and `confidence: 0`, which means \"we have nothing\", not \"this address is inactive\".\n\n**Without a key, an identical repeat inside 15 minutes is not charged again.** Without an `Idempotency-Key`, the same account asking for the same address (spelled exactly the same way) within 15 minutes of the lookup that was charged gets that lookup's stored answer back, with `credits_used: 0` and `idempotent_replay: true`, so a GET that an HTTP client, proxy or browser resends on its own costs nothing more. Concurrent copies are charged once. The window counts from the charge and a replay does not extend it: the first repeat after it is a new 0.5-credit lookup with a fresh read. Engagement recorded inside the window therefore shows up after it; to buy a fresh read sooner, send a new `Idempotency-Key`. A key keeps its own 24-hour receipt, separate from this window. A lookup that was charged but never answered (its request failed after the charge) is finished free by the next identical repeat, even after the window. Another account's lookup is never replayed to you.",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A syntactically valid email address with no surrounding whitespace. It is checked the way `POST /v1/verify` checks an address: lower-cased, with an internationalized domain converted to its ASCII `xn--` form, and only then validated. So `user@m\u00fcnchen.de`, `user@xn--mnchen-3ya.de` and `User@M\u00dcNCHEN.de` are all accepted and all find the same records. No `format: email` is declared because a standard format validator refuses the Unicode spelling, which this route accepts. The shared email validator and the explicit whitespace check run before idempotency state or credits move; malformed input is `400` and costs nothing. The successful response echoes this value unchanged."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "What is known about the address.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/EmailActivity"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "503": {
            "description": "The retry protection for this lookup could not be resolved, a concurrent attempt was refunded, or this copy's read failed while the request that paid for the same lookup was still running (its charge is left to that request, which stores its answer or refunds). Nothing was charged for this request. **With a key, retry with the SAME key**: a new one buys the lookup again. Without one, repeat the identical request: it is answered from the charge that stands, if one does, rather than bought again.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The lookup was charged for and then failed, or its result could not be stored. The refund is attempted and can itself fail, leaving the charge unsettled, which is what makes this materially different from the 503 beside it, where nothing was charged. Check `GET /v1/usage` before paying for another attempt. While a charge stands, an identical repeat (with the same key, or without a key) finishes that lookup instead of buying another. A charge that stored no answer stands for 15 minutes: after that it is refunded automatically, and a repeat is charged as a new lookup.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "verification:write"
        ]
      }
    },
    "/v1/activity/batch": {
      "post": {
        "tags": [
          "Activity"
        ],
        "operationId": "getEmailActivityBatch",
        "summary": "Engagement history for several addresses",
        "description": "The same lookup for a list. A POST because the addresses go in the body, but it is NOT free and NOT side-effect-free: every non-empty batch debits `0.25 credits per address` BEFORE the lookup runs, whatever it finds. Note the rate: the single-address form costs 0.5, so a hundred addresses here is 25 credits, not 50. Send `Idempotency-Key` and reuse it on a retry. Without one, an identical batch (same account, same `emails` in the same order) that the API reads while the first is still being looked up joins it and is not charged, but one read after the first has completed is a new charge, even if it was sent while the first was running: a retry after the first has finished buys the batch again.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 254,
                      "description": "Syntax is checked after trimming surrounding whitespace, lower-casing and converting an internationalized domain to its ASCII `xn--` form, as `POST /v1/verify` does, but the original string is kept and echoed in the response. No `format: email` is declared because a standard format validator rejects a whitespace-padded address, or one with a Unicode domain such as `user@münchen.de`, that this route accepts. The 254-character limit is on the raw string, as the API enforces it."
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Up to 100 addresses, each at most 254 raw characters. Syntax is checked after trimming surrounding whitespace, lower-casing and converting an internationalized domain to its `xn--` form, so `user@münchen.de` and `user@xn--mnchen-3ya.de` find the same records; the response still echoes each address as it was sent. The API refuses the request with 400 before any lookup if the list is longer, or if ANY address is malformed or over-long: one bad entry rejects the whole batch rather than being skipped. Every address in the list is charged for, including one with no recorded activity: the charge is for the lookup, not for a hit."
                  }
                },
                "required": [
                  "emails"
                ],
                "additionalProperties": false,
                "description": "`emails` is the only field. Any other top-level key is refused with `400 Unknown request field` before anything is charged, as on every other paid route."
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "verification:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "One row per address, in the order they were sent.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "array",
                          "description": "One entry per address submitted, in order, so a caller can zip it back to its input.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "email": {
                                "type": "string",
                                "description": "The address exactly as it was sent, including surrounding whitespace. The API trims it only to validate it and look it up, so this response deliberately has no `format: email`: a paid successful response can contain a whitespace-padded value that a standard format validator would reject."
                              },
                              "email_hash": {
                                "type": "string",
                                "description": "SHA-256 of the lower-cased, trimmed address. The key the data is stored under."
                              },
                              "activity": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/ActivityData"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "`null` means NOTHING IS RECORDED for this address, which says nothing about whether it is deliverable, only that your own account's tracking has recorded no engagement for it. It is not a verdict and not a failure."
                              }
                            },
                            "required": [
                              "email",
                              "email_hash",
                              "activity"
                            ]
                          }
                        },
                        "total": {
                          "type": "integer",
                          "description": "`results.length`."
                        },
                        "credits_used": {
                          "type": "number",
                          "description": "0.25 per address submitted, charged whether or not a row was found. **On a replay this is 0.** Repeating the request under the same `Idempotency-Key` returns the earlier result with `credits_used: 0` and `idempotent_replay: true`; the per-address rate describes a NEW lookup only."
                        },
                        "credits_remaining": {
                          "type": "number"
                        },
                        "idempotent_replay": {
                          "type": "boolean",
                          "description": "Present and true when this replayed an earlier call under the same `Idempotency-Key`, or, without a key, joined an identical batch that was still being looked up when this request read it, and charged nothing."
                        }
                      },
                      "required": [
                        "results",
                        "total",
                        "credits_used"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "503": {
            "description": "The retry protection for this `Idempotency-Key` could not be resolved, or a concurrent attempt was refunded. Nothing was charged. **Retry with the SAME key**: a new one buys the lookup again.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The lookup was charged for and then failed, or its result could not be stored. The refund is attempted and can itself fail, leaving the charge unsettled, which is what makes this materially different from the 503 beside it, where nothing was charged. Check `GET /v1/usage` before paying for another attempt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "verification:write"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/deliverability/check": {
      "post": {
        "tags": [
          "Deliverability"
        ],
        "operationId": "checkDeliverability",
        "summary": "Check a domain's email authentication",
        "description": "Ten credits for a fresh check. A repeat for the same domain with the same `sending_ip` (an omitted one matches only an omitted one) within 24 hours of a check your account stored is served from that check and costs nothing, unless it sends `refresh: true`, which skips the cache.\n\n**Send `Idempotency-Key`.** The DNS work can run for up to 120 seconds while the API stops waiting at about 29, so a client that times out cannot tell whether it paid. With a key, the identical request replays the original result for 30 days and charges nothing. Without one, a retry is free only once the first check has been stored (the 24-hour cache above, without `refresh: true`): a retry sent while the first is still running finds nothing stored and is a new 10-credit check. A key already in flight answers 409, and a receipt that cannot be read answers 503. In both cases retry the identical request rather than starting a fresh one.\n\n**A lookup that fails is not a missing record.** Only NXDOMAIN or NODATA counts as \"no record\". An SPF, DKIM, DMARC, MX or PTR lookup that fails (SERVFAIL, REFUSED, a timeout) is named in `not_measured`, shown as `not_measured` in `authentication`, and left out of `score` rather than scored as missing.\n\n**No grade without SPF, DKIM and DMARC.** When any of those three is not measured, `grade` and `spam_assessment.spam_likelihood` are null and `score` is a partial figure over what did answer: a letter over the rest would grade records nobody read. A check where only MX or reverse DNS failed is still graded, over the rest. Either way the check is charged, because it measured something; it is refunded (503) only when every lookup timed out or nothing at all could be scored.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "examples": [
                      "example.com"
                    ],
                    "description": "A bare registrable domain name. **Normalized before it is validated**, which is why no `format: hostname` or `pattern` is declared here: the API trims, lower-cases, punycodes an internationalized domain and then strips ONE leading `www.`, in that order, because IDNA maps the Unicode label separators (`\u3002`, `\uff0e`, `\uff61`) to `.`, so `www\u3002m\u00fcnchen.de` only grows its ASCII dot during the fold. Only then is the format checked. So `\" WWW.Example.COM \"` and `m\u00fcnchen.de` are both accepted; the latter is checked as `xn--mnchen-3ya.de`, the same fold `/v1/verify` applies to the domain half of an address. A scheme, a path or a port is NOT stripped and is a `400 Invalid domain format`; send the host on its own. At least two labels are required, each label 1\u201363 characters, and the TLD either letters only and at least two (`com`, `de`) or a decodable `xn--` A-label of an internationalized one (`\u043f\u0440\u0438\u043c\u0435\u0440.\u0440\u0444` is checked as `xn--e1afmkfd.xn--p1ai`). The A-label must decode AND be the canonical spelling of what it decodes to, not merely carry the prefix: `example.xn--abc` decodes to nothing, and `example.xn---7a` decodes to `\u00a1` whose one canonical form is `xn--7a`. Neither can name a TLD any root zone holds, so both are refused rather than charged for. A special-use name the public DNS never answers for, such as `.example`, `.test`, `.invalid`, `.localhost`, `.local`, `.onion`, `.alt`, `.internal`, `.corp`, `.home`, `.mail`, or `home.arpa` and the other special-use `.arpa` names, is also a `400` before any charge: every lookup could only fail."
                  },
                  "sending_ip": {
                    "type": "string",
                    "description": "The IPv4 address mail is actually sent from, when that is not the domain's own mail host. Leading and trailing whitespace is trimmed before the IPv4 rule is applied, so the raw request string deliberately has no `format` or `pattern` constraint. **IPv4 only**: after trimming, an IPv6 literal or a hostname is a `400` before the check runs, not a fallback. **Only the blocklist lookup falls back to an MX-derived address.** Reverse DNS is looked up for the normalized `sending_ip` alone and reports `status: \"skipped\"` when there is none, so without one reverse DNS is not measured at all and `server.reverse_dns` is null. **It must be a public address: the one receiving mail servers actually see.** Private (`10/8`, `172.16/12`, `192.168/16`), loopback (`127/8`), link-local (`169.254/16`), shared/CGNAT (`100.64/10`), documentation (`192.0.2/24`, `198.51.100/24`, `203.0.113/24`), `0/8`, benchmarking (`198.18/15`), the deprecated 6to4 relay anycast block (`192.88.99/24`), multicast (`224/4`) and reserved (`240/4`) addresses are a `400` before the cache lookup or any charge: no public reverse-DNS or blocklist zone answers for them, and the resolver this check runs behind answers reverse DNS for private space itself, which once graded a private network name as a PTR pass. Documentation ranges included: an address copied from an example is refused, not checked."
                  },
                  "refresh": {
                    "type": "boolean",
                    "default": false,
                    "description": "Ignore the 24-hour cache and measure again. Costs the full 10 credits, like any other fresh check. Without it a customer who has just fixed their SPF or DMARC record gets the identical old grade back and reasonably concludes the fix did not work. There is no other way to ask for current evidence."
                  }
                },
                "required": [
                  "domain"
                ],
                "additionalProperties": false,
                "description": "Closed: only `domain`, `sending_ip` and `refresh` are allowed, and anything else is refused with 400 before the cache lookup, the DNS work or any credit movement, so a misspelling like `refesh` costs nothing but also achieves nothing."
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "deliverability:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The check. `cached` and `idempotent_replay` say whether it was measured now or reused; `credits_used` is what was actually charged.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeliverabilityCheck"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "409": {
            "description": "Another request is already using this `Idempotency-Key`. Nothing was charged. Retry the identical request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "The check could not be completed. Several paths answer this, and **they differ on money**: an unreadable idempotency receipt, an unavailable cache/history read and transient credit contention all fail BEFORE the debit, so nothing was charged. But a check whose DNS lookups all time out fails AFTER it, and so does one in which nothing could be scored (every scored lookup failed and too few blocklists answered to score): the API attempts a refund, and its message says `No credits were charged` only when that refund succeeded. Read the message rather than assuming, and check the balance if it does not say so. Retry with the SAME `Idempotency-Key` either way; a fresh one can buy the check again.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The check failed AFTER the 10 credits were debited (storing the completed result, for instance). A refund is attempted, and **it can itself fail**: the API records that the credits were lost and still answers 500. A keyed check also answers 500 when it cannot confirm whether its debit committed (the debit timed out or lost its connection, and could still land a moment later): the message says the charge could not be confirmed, `retryable` is `true`, and a repeat with the SAME `Idempotency-Key` runs the check without charging again if the debit landed, and charges it once if it did not. This is not the same as the 503 beside it, but do not read that one as free either: most of its paths fail BEFORE the debit, and the all-DNS-timeout path fails after it. Read the 503's own description rather than assuming. Check `GET /v1/usage` before buying the check again; retrying with the SAME `Idempotency-Key` is safe and is the cheaper thing to try first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "deliverability:write"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/deliverability/checks": {
      "get": {
        "tags": [
          "Deliverability"
        ],
        "operationId": "listDeliverabilityChecks",
        "summary": "Past deliverability checks",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Page size: 1 to 100, defaulting to 20. Unlike the strict `limit` on other list routes, this one CLAMPS rather than refusing: it reads the raw query value as a number (so `1e2` is 100, not 1), truncates a fraction, caps anything above 100 at 100, and falls back to 20 for a malformed, zero or negative value.\n\nTyped as a plain string with no numeric constraint for that reason: `limit=abc` is a request this route accepts and normalizes, and `type: number` made a generated client refuse it locally. Compare `GET /v1/jobs/{id}`, which also accepts numeric notation such as `1e2` but refuses malformed, zero, fractional, negative, or out-of-range values instead of clamping. The two routes differ and the schemas say so.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "deliverability:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "Previous checks, newest first.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "checks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "check_id": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              },
                              "sending_ip": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "score": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "0-100 over what was measured. Partial when `grade` is null; read the check itself (`GET /v1/deliverability/checks/{id}`) for `not_measured`."
                              },
                              "grade": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The check's letter, or null when it has none: SPF, DKIM or DMARC could not be looked up (the rule `POST /v1/deliverability/check` applies), including on a check stored before that rule."
                              },
                              "checked_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            }
                          }
                        },
                        "count": {
                          "type": "integer",
                          "description": "Rows in `checks`, at most the applied page size."
                        },
                        "total": {
                          "type": "integer",
                          "description": "Rows SCANNED, not the account's total history. Equal to the history only when `truncated` is false."
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "True when the scan stopped at its page bound. `checks` is then the newest of what was read, which is not the newest of what exists. There is no way to page past it on this route."
                        }
                      },
                      "required": [
                        "checks",
                        "count",
                        "total",
                        "truncated"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "deliverability:read"
        ],
        "description": "Past checks for this account, newest first, **within what was scanned**. Each request reads a bounded part of the account's history, in storage order rather than by date, and sorts only what it read, so on an account with a long history these are not necessarily the newest checks overall. `truncated: true` says that happened."
      }
    },
    "/v1/deliverability/checks/{id}": {
      "get": {
        "tags": [
          "Deliverability"
        ],
        "operationId": "getDeliverabilityCheck",
        "summary": "One past deliverability check",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "deliverability:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The stored check.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeliverabilityCheck"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "deliverability:read"
        ],
        "description": "A check that was already run and paid for. Free: this is a read of stored evidence, not a new check."
      }
    },
    "/v1/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "getAccount",
        "summary": "Account, credits and recent activity",
        "description": "Profile, credit balance, usage this period, API keys and recent jobs.\n\nTwo fields say when part of the answer is missing, and they mean different things. `partial` names a section that could not be loaded; its value is a placeholder, not a fact. `withheld` names a section this API key's scopes do not cover; those sections come back empty, and an empty `api_keys` beside `withheld.api_keys` never means the account has no keys.\n\nTwo shapes, decided by the credential. A key on an ordinary account gets `Account`; a white-label sub-account's key gets `SubAccount`, which reports `credits.allocated` and `credits.credits_used` instead of an allowance and carries `account.parent_user_id`. Branch on `account.plan === \"sub_account\"`.",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The account.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/Account"
                        },
                        {
                          "$ref": "#/components/schemas/SubAccount"
                        }
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "account:read"
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "getUsage",
        "summary": "Usage and limits",
        "description": "The older usage shape, kept for existing consumers. `GET /v1/usage/summary` is the one to build against.\n\nTwo figures here are deliberately not what they look like: `verifications.daily.used` is `null` when today's count could not be read (never 0, which would read as a measured idle day), and `verifications.daily.percent` is ALWAYS `null`: there is no enforced daily quota to be a percentage of, and `used` counts emails while `limit` counts credits, which are not the same unit.",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "analytics:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "Usage this billing period.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "plan": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "description": "`{id: \"sub_account\", name: \"Sub-account\"}` for a white-label sub-account, which has no plan of its own."
                        },
                        "credits": {
                          "type": "object",
                          "properties": {
                            "remaining": {
                              "type": "number"
                            },
                            "used": {
                              "type": "number"
                            },
                            "total": {
                              "type": "number"
                            },
                            "allowance_basis": {
                              "type": "string",
                              "enum": [
                                "billing_period",
                                "no_billing_period",
                                "one_time_grant",
                                "provider_allocation"
                              ]
                            }
                          }
                        },
                        "verifications": {
                          "type": "object",
                          "properties": {
                            "monthly": {
                              "type": "object",
                              "properties": {
                                "used": {
                                  "type": "number"
                                },
                                "limit": {
                                  "type": "number"
                                },
                                "remaining": {
                                  "type": "number",
                                  "description": "The spendable WALLET, not `limit - used`: the balance is the only thing enforcement checks, and purchased packs sit outside the plan grant."
                                },
                                "percent": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "resets_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "description": "When the allowance refills: the end of the billing period. `null` with no billing period, and `null` when the plan is set to end at the close of this period, since nothing refills it then. A time already past means a renewal is due; the refill lands when its payment is recorded."
                                }
                              }
                            },
                            "daily": {
                              "type": "object",
                              "properties": {
                                "used": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "`null` when today's count could not be read. Not zero: a fabricated idle day is worse than an honest unknown."
                                },
                                "limit": {
                                  "type": "number",
                                  "description": "The plan's published daily credit number. NOT enforced anywhere; do not size work from it."
                                },
                                "remaining": {
                                  "type": "number",
                                  "description": "The wallet again, for the same reason as the monthly figure."
                                },
                                "percent": {
                                  "type": "null",
                                  "description": "Always null. There is no enforced daily quota, and `used` (emails) and `limit` (credits) are different units."
                                },
                                "resets_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                }
                              }
                            }
                          }
                        },
                        "api": {
                          "type": "object",
                          "properties": {
                            "rate_limit": {
                              "type": "number",
                              "description": "Requests per minute the limiter holds this credential to. When no live window describes the request, the plan's limit, or for a white-label sub-account its own limit (never its parent's plan's)."
                            },
                            "rate_limit_window": {
                              "type": "string"
                            },
                            "rate_limit_enforced": {
                              "type": "boolean",
                              "description": "False means the number beside it is the configured limit rather than something being applied."
                            }
                          }
                        },
                        "billing_period": {
                          "type": "object",
                          "description": "The period `credits.used` and `verifications.monthly.used` cover. For a short time after a renewal, until its payment is recorded, the counter has not been reset: it holds the previous period's spend and anything spent since, and this covers the same stretch, from when the counter was last reset up to now.",
                          "properties": {
                            "start": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "end": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            }
                          }
                        }
                      },
                      "required": [
                        "plan",
                        "credits",
                        "verifications"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "analytics:read"
        ]
      }
    },
    "/v1/usage/summary": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "getUsageSummary",
        "summary": "Usage summary",
        "description": "Credits, API calls, verifications and bulk-job concurrency for the current billing period.",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "analytics:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The summary.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "description": "The canonical usage shape: the dashboard reads the same one.",
                      "properties": {
                        "credits": {
                          "type": "object",
                          "properties": {
                            "balance": {
                              "type": "number",
                              "description": "Spendable now. Fractional: a cached verification costs 0.5."
                            },
                            "used_this_month": {
                              "type": "number",
                              "description": "What it measures depends on `allowance_basis`: the current billing period for `billing_period`, and a cumulative figure for every other basis (a paid plan with no billing period on file, Free, a sub-account)."
                            },
                            "monthly_allowance": {
                              "type": "number"
                            },
                            "allowance_basis": {
                              "type": "string",
                              "enum": [
                                "billing_period",
                                "no_billing_period",
                                "one_time_grant",
                                "provider_allocation"
                              ],
                              "description": "Only `billing_period` renews. `no_billing_period` (a paid plan with no billing period on file), `one_time_grant` (Free) and `provider_allocation` (a white-label sub-account) are not reset on a schedule, so the figure beside it is cumulative."
                            },
                            "rollover_credits": {
                              "type": "number"
                            },
                            "bonus_credits": {
                              "type": "number"
                            },
                            "expires_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "balance",
                            "used_this_month",
                            "monthly_allowance"
                          ]
                        },
                        "api_calls": {
                          "type": "object",
                          "description": "Verification REQUESTS, not addresses. One 5,000-address batch is 1 request and 5,000 verifications.",
                          "properties": {
                            "today": {
                              "type": "integer"
                            },
                            "this_week": {
                              "type": "integer"
                            },
                            "this_month": {
                              "type": "integer"
                            },
                            "daily_credits": {
                              "type": "number"
                            },
                            "monthly_credits": {
                              "type": "number"
                            },
                            "daily_limit": {
                              "type": "number",
                              "deprecated": true,
                              "description": "Misnamed: carries the CREDIT allowance, not a call ceiling. Nothing meters API calls. Read `daily_credits`."
                            },
                            "monthly_limit": {
                              "type": "number",
                              "deprecated": true,
                              "description": "Misnamed in the same way. Read `monthly_credits`."
                            }
                          }
                        },
                        "verifications": {
                          "type": "object",
                          "properties": {
                            "today": {
                              "type": "integer"
                            },
                            "this_week": {
                              "type": "integer"
                            },
                            "this_month": {
                              "type": "integer"
                            },
                            "total": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Always `null`: a lifetime verification count is not tracked. The only all-time figure is credit spend, and publishing that as a verification count produced fractional 'verifications'."
                            }
                          }
                        },
                        "bulk_jobs": {
                          "type": "object",
                          "properties": {
                            "active": {
                              "type": "integer"
                            },
                            "completed_this_month": {
                              "type": "integer"
                            },
                            "max_concurrent": {
                              "type": "integer",
                              "deprecated": true,
                              "description": "Not enforced. A per-plan number (1, 2, 5, 10 or 20) that nothing checks: no route counts running bulk jobs or refuses one over it, so do not throttle against it or present it as a limit. Kept for existing clients; `active` beside it is the measured count."
                            }
                          }
                        },
                        "coverage": {
                          "type": "object",
                          "description": "How much of the billing-period window the job-derived counts (`api_calls`, `verifications`, `bulk_jobs`) actually cover. Job rows expire at the plan's result retention, so on Free `this_month` covers the last 7 days, not the month. The shorter windows (today, this week) fit inside retention on every plan. Optional: when it is absent, treat coverage as not stated.",
                          "properties": {
                            "requested_days": {
                              "type": "integer",
                              "description": "Days from the window's start to now, rounded up (what was asked for)."
                            },
                            "covered_days": {
                              "type": "integer",
                              "description": "Days the figures actually cover."
                            },
                            "covered_from": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Start of the covered window."
                            },
                            "covered_to": {
                              "type": "string",
                              "format": "date-time",
                              "description": "End of the covered window. Usually the present; a window whose billing period ended in the past ends then instead."
                            },
                            "retention_days": {
                              "type": "integer",
                              "description": "How long the account's current plan keeps verification results."
                            },
                            "complete": {
                              "type": "boolean",
                              "description": "True when the figures cover the whole requested window."
                            },
                            "reason": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "plan_retention",
                                null
                              ],
                              "description": "Why the window was shortened, or null when it was not."
                            }
                          },
                          "required": [
                            "requested_days",
                            "covered_days",
                            "covered_from",
                            "covered_to",
                            "retention_days",
                            "complete",
                            "reason"
                          ]
                        },
                        "billing_period": {
                          "type": "object",
                          "properties": {
                            "start": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "end": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "days_remaining": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            }
                          },
                          "description": "All three are `null` on a plan with no period, and also when a paid plan's period could not be resolved, which is unknown rather than absent. For a short time after a renewal, until its payment is recorded, `credits.used_this_month` has not been reset: it holds the previous period's spend and anything spent since, and this covers the same stretch, from when the counter was last reset up to now, with `days_remaining` 0."
                        },
                        "partial": {
                          "type": "object",
                          "description": "Names the sections whose counts could NOT BE READ. Their numbers are zero-filled placeholders, not measurements. Render them as unavailable, not as zero.",
                          "properties": {
                            "api_calls": {
                              "const": true
                            },
                            "verifications": {
                              "const": true
                            },
                            "bulk_jobs": {
                              "const": true
                            }
                          }
                        }
                      },
                      "required": [
                        "credits",
                        "api_calls",
                        "verifications",
                        "bulk_jobs",
                        "billing_period"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "analytics:read"
        ]
      }
    },
    "/v1/usage/credits/transactions": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "listCreditTransactions",
        "summary": "Credit transactions",
        "description": "The account's credit ledger, newest first: the charges and refunds on the balance, each with the balance it left. After a failure that carries `retry_may_charge_again` it shows whether a debit of that amount landed around that moment, which `GET /v1/usage` (the balance alone) cannot. A row carries no request id and no address, so that settles the question only when nothing else on the account was spending at the same time; on a route that accepts one, an `Idempotency-Key` is the reliable answer. Entries before 2 September 2026 show usage and refunds only: credits added before then, from a plan or a credit pack, have no row, so `type=purchase` is empty for that period even for an account that bought credits then. From that date every paid-plan allowance and credit-pack purchase has a `purchase` row; the one-time Free signup grant is the exception, credited to the balance directly with no row.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Rows per page, 1 to 100 (default 50). A malformed, fractional, zero, negative or larger value is a 400 rather than clamped, the same rule as `GET /v1/analytics/credit-history` and the other list routes. Until 2026-10-02 it was clamped, and `limit=0` meant 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "How many rows to skip, default 0. A negative or unreadable value means 0. Above 10000 is refused with 400: the ledger is read row by row up to the offset, so the offset is what the request costs.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Return only rows of this type. `transfer` is credits moved between a white-label account and one of its sub-accounts: an allocation, a reclaim, or the balance a deleted sub-account returned. Any other non-empty value is a 400 naming the seven.",
            "schema": {
              "type": "string",
              "enum": [
                "purchase",
                "usage",
                "refund",
                "bonus",
                "rollover",
                "adjustment",
                "transfer"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The previous page's `next_cursor`, to read the page after it. Reaches any depth, where `offset` stops at 10000, and costs one page however deep. Not combined with a non-zero `offset` (400). A cursor that does not decode, is not in the shape this route issues, or is another account's is a 400 `INVALID_CURSOR`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "analytics:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "One page of the ledger.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "transactions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The same value as `transaction_id`."
                              },
                              "transaction_id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "purchase",
                                  "usage",
                                  "refund",
                                  "bonus",
                                  "rollover",
                                  "adjustment",
                                  "transfer"
                                ]
                              },
                              "amount": {
                                "type": "number",
                                "description": "Negative for a debit, positive for credit coming back. Fractional: a cached verification is -0.5."
                              },
                              "balance_after": {
                                "type": "number",
                                "description": "The balance this row left."
                              },
                              "description": {
                                "type": "string",
                                "description": "What the credits were for, written by the feature that moved them. A generic label for the row's type when `detail_withheld` is true."
                              },
                              "reference_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "detail_withheld": {
                                "const": true,
                                "description": "Present only when a scoped credential lacks one of `verification:read`, `integrations:read`, `white_label:read` and `billing:read`, which together cover every kind of material a description can name; `description` is then generic and `reference_id` is null."
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "transaction_id",
                              "type",
                              "amount",
                              "balance_after",
                              "description",
                              "reference_id",
                              "created_at"
                            ]
                          }
                        },
                        "total": {
                          "type": "integer",
                          "description": "Rows matching the request, across every page."
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer",
                          "description": "The `offset` the request sent; 0 for a page read from `cursor`."
                        },
                        "has_more": {
                          "type": "boolean",
                          "description": "True when another row exists after this page."
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass it back as `cursor` to read the page after this one; null on the last page. Unlike `offset`, it reaches past the 10000th row."
                        }
                      },
                      "required": [
                        "transactions",
                        "total",
                        "limit",
                        "offset",
                        "has_more",
                        "next_cursor"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "analytics:read"
        ]
      }
    },
    "/v1/api-keys": {
      "get": {
        "tags": [
          "API keys"
        ],
        "operationId": "listApiKeys",
        "summary": "List API keys",
        "description": "Every active key on the account, with the scope vocabulary beside them so a caller that can list keys can also see what a narrower one could be limited to. Never returns a secret: `key_preview` is the stored masked form, and a key created before previews were stored shows `ev_\u2022\u2022\u2022\u2022`.",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "security:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The keys, and the scope vocabulary.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "api_keys": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiKeySummary"
                          }
                        },
                        "available_scopes": {
                          "type": "array",
                          "description": "The whole scope vocabulary, in the order a UI should present it.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "scope": {
                                "type": "string",
                                "enum": [
                                  "verification:read",
                                  "verification:write",
                                  "lists:read",
                                  "lists:write",
                                  "deliverability:read",
                                  "deliverability:write",
                                  "compose:read",
                                  "compose:write",
                                  "exports:read",
                                  "exports:write",
                                  "webhooks:read",
                                  "webhooks:write",
                                  "integrations:read",
                                  "integrations:write",
                                  "analytics:read",
                                  "analytics:write",
                                  "account:read",
                                  "account:write",
                                  "account:delete",
                                  "billing:read",
                                  "billing:write",
                                  "team:read",
                                  "team:write",
                                  "security:read",
                                  "security:write",
                                  "white_label:read",
                                  "white_label:write"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "sensitive": {
                                "type": "boolean",
                                "description": "Marks a scope that spends money, destroys data or changes who has access. Present these differently from a read scope."
                              }
                            },
                            "required": [
                              "scope",
                              "description",
                              "sensitive"
                            ]
                          }
                        },
                        "recommended_agent_scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "verification:read",
                              "verification:write",
                              "lists:read",
                              "lists:write",
                              "deliverability:read",
                              "deliverability:write",
                              "compose:read",
                              "compose:write",
                              "exports:read",
                              "exports:write",
                              "webhooks:read",
                              "webhooks:write",
                              "integrations:read",
                              "integrations:write",
                              "analytics:read",
                              "analytics:write",
                              "account:read",
                              "account:write",
                              "account:delete",
                              "billing:read",
                              "billing:write",
                              "team:read",
                              "team:write",
                              "security:read",
                              "security:write",
                              "white_label:read",
                              "white_label:write"
                            ]
                          },
                          "description": "What to give an AI agent doing list hygiene: verify, watch the job, read the result, see what it cost. Nothing that spends money outside verification credits, nothing that changes access, nothing destructive. Published here so the safe default is the discoverable one."
                        }
                      },
                      "required": [
                        "api_keys",
                        "available_scopes",
                        "recommended_agent_scopes"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "security:read"
        ]
      },
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/CreateIdempotencyKey"
          }
        ],
        "tags": [
          "API keys"
        ],
        "operationId": "createApiKey",
        "summary": "Create an API key",
        "description": "The secret is returned once and never again: `data.api_key.key` is the only place it ever appears.\n\nAccepts `name` and, optionally, `scopes`; any other field is a 400 rather than silently ignored. A new key is refused with a 400 (`Maximum of 10 API keys allowed per account`) while the account already has 10 active keys, on every plan (dashboard sign-in sessions and connected apps do not count); revoke one first. The cap is checked only here: keys suspended when a subscription ended are not counted, and resubscribing restores them, so an account can hold more than 10 that way and then cannot create another until it is under 10. `GET /v1/usage/limits` publishes the cap as `limits.api_keys`. Omitting `scopes` creates an unrestricted key. Sending `scopes` creates a key limited to exactly those scopes: an empty array is refused (a key that can do nothing is never what was meant) and so is `null` (omitted and null are not the same thing, and this route will not guess which was meant). A scope a key does not hold answers `403 INSUFFICIENT_SCOPE` on use, naming what it needed.\n\nCreating a key with a dashboard session needs a sign-in within the last 15 minutes; an older session answers `403 REAUTHENTICATION_REQUIRED`. Creating one with an API key has no such limit, but the key used must itself be unrestricted: no scope grants minting.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "\\S",
                    "description": "A label for the key, for your own benefit. **Measured after trimming**: surrounding whitespace is trimmed before the 1-100 length check, so a 100-character name padded with spaces is accepted and stored trimmed, while a raw `maxLength` would refuse it, and `\" \"` satisfies a raw `minLength: 1` and is refused anyway. The `\\S` pattern stays because it is the one part that survives trimming: it requires at least one non-whitespace character."
                  },
                  "scopes": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 27,
                    "items": {
                      "type": "string",
                      "enum": [
                        "verification:read",
                        "verification:write",
                        "lists:read",
                        "lists:write",
                        "deliverability:read",
                        "deliverability:write",
                        "compose:read",
                        "compose:write",
                        "exports:read",
                        "exports:write",
                        "webhooks:read",
                        "webhooks:write",
                        "integrations:read",
                        "integrations:write",
                        "analytics:read",
                        "analytics:write",
                        "account:read",
                        "account:write",
                        "account:delete",
                        "billing:read",
                        "billing:write",
                        "team:read",
                        "team:write",
                        "security:read",
                        "security:write",
                        "white_label:read",
                        "white_label:write"
                      ]
                    },
                    "description": "Limit the new key to these scopes. Omit the field for an unrestricted key; `[]` and `null` are both 400s. A `:write` scope implies its `:read` half, so `verification:write` alone can read results. The stored list is normalized to this document's order, so the response may not list them as sent. Duplicates are accepted and collapsed into one de-duplicated list in a fixed order, so `[\"verification:read\", \"verification:read\"]` creates the same key as one entry. No `uniqueItems` here for that reason: it would refuse locally a payload the API takes. The `maxItems` limit applies to the RAW array, before de-duplication."
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "201": {
            "description": "The new key. Save it now.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "api_key": {
                          "type": "object",
                          "description": "The only response that ever contains the secret.",
                          "properties": {
                            "key": {
                              "type": "string",
                              "description": "THE SECRET. Returned here and nowhere else; no later call can recover it. Store it before reading the rest of this object."
                            },
                            "key_id": {
                              "type": "string",
                              "description": "The key's identifier, used to revoke it. Not secret.",
                              "examples": [
                                "key_a1b2c3d4"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "scopes": {
                              "type": [
                                "array",
                                "null"
                              ],
                              "items": {
                                "type": "string",
                                "enum": [
                                  "verification:read",
                                  "verification:write",
                                  "lists:read",
                                  "lists:write",
                                  "deliverability:read",
                                  "deliverability:write",
                                  "compose:read",
                                  "compose:write",
                                  "exports:read",
                                  "exports:write",
                                  "webhooks:read",
                                  "webhooks:write",
                                  "integrations:read",
                                  "integrations:write",
                                  "analytics:read",
                                  "analytics:write",
                                  "account:read",
                                  "account:write",
                                  "account:delete",
                                  "billing:read",
                                  "billing:write",
                                  "team:read",
                                  "team:write",
                                  "security:read",
                                  "security:write",
                                  "white_label:read",
                                  "white_label:write"
                                ]
                              },
                              "description": "The scopes the key was created with, normalized and ordered. `null` means unrestricted. Always present, so a client never has to tell 'unrestricted' from 'the field was omitted'."
                            },
                            "warning": {
                              "type": "string",
                              "description": "The one-shot warning, as sent.",
                              "examples": [
                                "Save this API key now. You will not be able to see it again."
                              ]
                            }
                          },
                          "required": [
                            "key",
                            "key_id",
                            "name",
                            "created_at",
                            "scopes",
                            "warning"
                          ]
                        }
                      },
                      "required": [
                        "api_key"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "200": {
            "description": "A repeat under the same `Idempotency-Key` and body (within 24 hours): nothing was created. The key the first request created, WITHOUT its secret, which was shown only in that first answer and is stored nowhere. If that answer was lost, revoke this key (`DELETE /v1/api-keys/{keyId}`) and create a new one.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "api_key": {
                          "type": "object",
                          "description": "The key the first request created. Never the secret.",
                          "properties": {
                            "key": {
                              "type": "null",
                              "description": "Always null on a repeat: the secret is never shown twice."
                            },
                            "key_id": {
                              "type": "string",
                              "description": "The key's identifier, used to revoke it. Not secret.",
                              "examples": [
                                "key_a1b2c3d4"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "scopes": {
                              "type": [
                                "array",
                                "null"
                              ],
                              "items": {
                                "type": "string"
                              },
                              "description": "As the first answer gave them: the stored list, or `null` for an unrestricted key."
                            },
                            "warning": {
                              "type": "string",
                              "description": "What to do if the first answer, the only one with the secret, was lost."
                            },
                            "key_withheld": {
                              "const": true,
                              "description": "The secret was withheld because this is a repeat."
                            },
                            "key_preview": {
                              "type": "string",
                              "description": "The masked key, as `GET /v1/api-keys` shows it.",
                              "examples": [
                                "ev_****wxyz"
                              ]
                            }
                          },
                          "required": [
                            "created_at",
                            "key",
                            "key_id",
                            "key_withheld",
                            "name",
                            "scopes",
                            "warning"
                          ]
                        },
                        "idempotent_replay": {
                          "const": true
                        }
                      },
                      "required": [
                        "api_key",
                        "idempotent_replay"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "One of two codes, and nothing was created in either case. `IDEMPOTENCY_KEY_CONFLICT`: the `Idempotency-Key` was already used to create a key with a different body; use a new key for a new API key. `CONFLICT` with `retryable: true`: another key create for this account held its turn past the wait (about four seconds), or this create's turn ran out before it committed (creates for one account take turns so the ten-key limit holds); repeat the request, with the same `Idempotency-Key` if it carried one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "The key could not be created and the outcome is **indeterminate**. An unexpected failure while saving the key answers this, so the save may have completed with the response lost.\n\nThat matters more here than on most routes, because **the secret is returned once**. If the write landed, the key now exists on the account and nobody has its value: it cannot be recovered, only revoked. Do not retry blind: read `GET /v1/api-keys`, revoke anything that appeared without a secret you hold, and only then create another. With an `Idempotency-Key` (the header above), repeat the same request with the same key instead: it returns the key that was created, with its secret withheld, and creates no second one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-unscoped-only": true
      }
    },
    "/v1/api-keys/{keyId}": {
      "delete": {
        "tags": [
          "API keys"
        ],
        "operationId": "revokeApiKey",
        "summary": "Revoke an API key",
        "description": "The key stops working at once, and so do any dashboard sessions created from it. Webhooks created with the key, or from a dashboard session created from it, are switched off (`is_active: false`, `disabled_reason: \"api_key_revoked\"`) and stay listed until you turn them back on or delete them. They are switched off before the key is revoked: if that fails, this answers `500` and the key is not revoked, so the same request can be sent again, even with the key itself. The account's last active key cannot be revoked; create a replacement first.",
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "key_1a2b3c4d"
              ]
            }
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "Revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "`INTERNAL_ERROR`: the revocation may not have happened, so **the key may still be active**. Retry, and confirm with `GET /v1/api-keys` that it is gone. Once the key is revoked the answer is `200`, including when some of the rows of the dashboard sessions created from it are left to clean up later: those sessions are refused on their next use either way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "security:write"
        ]
      }
    },
    "/v1/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "listWebhooks",
        "summary": "List webhook endpoints",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The account's endpoints.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "webhooks": {
                          "type": "array",
                          "description": "Every endpoint on the account. **Never includes `secret`**: a signing secret appears only in the successful response that creates or explicitly rotates it.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "webhook_id": {
                                "type": "string",
                                "description": "What the get, update, delete and test operations take as `{id}`."
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uri",
                                "description": "The canonical callback URL. `null` identifies a malformed legacy endpoint that cannot deliver; repair it with PUT or delete it. One such row does not hide the account's other endpoints."
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "events": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "is_active": {
                                "type": "boolean",
                                "description": "False means Kawaa has stopped delivering to it. Set it back with the update operation; `disabled_reason` says why when Kawaa switched it off."
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Falls back to `created_at` on an endpoint that has never been changed."
                              },
                              "last_triggered_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "Null on an endpoint that has never fired, which is not the same as one that is failing."
                              },
                              "failure_count": {
                                "type": "integer",
                                "description": "Consecutive delivery failures. A rising number beside a recent `last_triggered_at` is an endpoint that is being called and refusing."
                              },
                              "disabled_reason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "enum": [
                                  "api_key_revoked",
                                  "app_disconnected",
                                  null
                                ],
                                "description": "Why Kawaa switched this endpoint off: `api_key_revoked` (an API key that created it, or that pointed it at its current URL (or, when none did, changed its events or turned it on), or the key behind a dashboard session that did, was revoked) or `app_disconnected` (a connected app that created it or did one of those was disconnected, including by a password change or reset or an account lock). The endpoint is kept, with `is_active: false`, so its owner can review it and turn it back on or delete it. `null` while it is on, and for an endpoint someone switched off."
                              }
                            },
                            "required": [
                              "webhook_id",
                              "url",
                              "events",
                              "is_active",
                              "created_at"
                            ]
                          }
                        },
                        "count": {
                          "type": "integer",
                          "description": "Rows returned. The quota counter behind `PLAN_LIMIT_EXCEEDED` is maintained separately and is the authoritative one; this is a count of what was read."
                        }
                      },
                      "required": [
                        "webhooks",
                        "count"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "webhooks:read"
        ]
      },
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/CreateIdempotencyKey"
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "operationId": "createWebhook",
        "summary": "Register a webhook endpoint",
        "description": "Kawaa POSTs to `url` when one of `events` happens, signing each delivery. Past the plan's endpoint cap this answers `403 PLAN_LIMIT_EXCEEDED`. With a dashboard session, the session must have signed in within the last 15 minutes; an older one answers `403 REAUTHENTICATION_REQUIRED` (sign in again, then retry). An API key or a connected app is not held to this. The write is conditioned on the creating API key (or the key a dashboard session was signed in with, or a connected app's access token) still being active, so a request made just before that credential was revoked answers `401 API_KEY_REVOKED` and creates nothing. A password change, reset, account lock or white-label sub-account key reset that lands while the request is in progress answers `409 CONFLICT`; nothing is created.\n\n**A scoped key needs more than `webhooks:write` here.** A subscription is a way to receive what its events carry, so each requested event also requires the scope that owns that data: `verification.completed` needs `verification:read`, `verification.failed` needs `verification:read`, `job.completed` needs `verification:read`, `job.failed` needs `verification:read`, `credits.low` needs `account:read`, `credits.exhausted` needs `account:read`, `blacklist.detected` needs `deliverability:read`, `dmarc.failure` needs `deliverability:read`. On an account that can have sub-accounts, `credits.low` and `credits.exhausted` additionally require `white_label:read`, because those deliveries name the sub-account and its label. Missing any of them is a `403` naming each event and the scope it needed, and no webhook is created. An unrestricted key needs none of this. `x-kawaa-event-scopes` carries the same table in machine-readable form.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Where Kawaa POSTs the callback. HTTPS only: anything else is 400 WEBHOOK_URL_INVALID. No `format: uri` or anchored scheme `pattern` is declared on this REQUEST field: the URL is parsed first, which tolerates surrounding whitespace and normalizes the protocol, so `\" https://x\"` and `\"HTTPS://x\"` are both accepted while either constraint refuses them. HTTPS is required, checked on the PARSED protocol, not on the string you sent. Before storing it, Kawaa replaces the request string with that parsed URL's canonical string, so every response URL is a well-formed URI.",
                    "maxLength": 2048
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A note for your own reference. Send `null` to clear the stored one.",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "url",
                  "events"
                ],
                "additionalProperties": false,
                "description": "Closed: only `url`, `description` and `events` are allowed. `is_active` is NOT one of them: an endpoint is created active, and it is the update operation that can deactivate it."
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "201": {
            "description": "Registered. This endpoint's initial signing secret is returned once; no read operation returns it, but the rotation operation can replace a lost or exposed value.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "webhook": {
                          "type": "object",
                          "properties": {
                            "webhook_id": {
                              "type": "string",
                              "examples": [
                                "wh_3f9a1c2b4d5e6f7a8b9c0d1e2f3a4b5c"
                              ]
                            },
                            "url": {
                              "type": "string",
                              "format": "uri"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "is_active": {
                              "type": "boolean"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "secret": {
                              "type": "string",
                              "description": "THE SIGNING SECRET. Every delivery to this endpoint carries `X-Kawaa-Signature-V2` (and the legacy `X-Kawaa-Signature`) computed from it; without it there is no way to tell a genuine callback from anything else that can reach the URL. Save it now: no read operation returns it. If it is lost or exposed, `POST /v1/webhooks/{id}/secret` replaces it and returns the replacement once, without deleting the endpoint."
                            }
                          },
                          "required": [
                            "webhook_id",
                            "url",
                            "events",
                            "is_active",
                            "secret",
                            "created_at"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "webhook",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "200": {
            "description": "A repeat under the same `Idempotency-Key` and body (within 24 hours): nothing was created. The endpoint the first request registered, as that answer described it (even if it was changed or deleted since), WITHOUT the signing secret, which was shown only in the first answer. If that answer was lost, `POST /v1/webhooks/{id}/secret` returns a new secret once.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "webhook": {
                          "type": "object",
                          "properties": {
                            "webhook_id": {
                              "type": "string",
                              "examples": [
                                "wh_3f9a1c2b4d5e6f7a8b9c0d1e2f3a4b5c"
                              ]
                            },
                            "url": {
                              "type": "string",
                              "format": "uri"
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "is_active": {
                              "type": "boolean"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "secret": {
                              "type": "null",
                              "description": "Always null on a repeat: the signing secret is never shown twice."
                            },
                            "secret_withheld": {
                              "const": true,
                              "description": "The secret was withheld because this is a repeat."
                            }
                          },
                          "required": [
                            "created_at",
                            "events",
                            "is_active",
                            "secret",
                            "secret_withheld",
                            "url",
                            "webhook_id"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "idempotent_replay": {
                          "const": true
                        }
                      },
                      "required": [
                        "idempotent_replay",
                        "message",
                        "webhook"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "`CONFLICT`: a password change, reset, account lock or white-label sub-account key reset landed while this request was in progress, so the account no longer matches what the request was authenticated against. Nothing was created. Repeat the request if your credential still works. Or `IDEMPOTENCY_KEY_CONFLICT`: the `Idempotency-Key` was already used to create a webhook with a different body. Nothing was created; use a new key for a new webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "The webhook URL's hostname could not be resolved right now (`WEBHOOK_DNS_TEMPORARY_FAILURE`). This is a TRANSIENT DNS failure, not a rejection of the URL; a permanent one is `400 WEBHOOK_URL_INVALID`. Nothing was created or changed. Retry.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The endpoint could not be created and the outcome is **indeterminate**. This answers a failure reading the endpoint quota or saving the endpoint, and a connection failure while saving can leave the endpoint created with no response to show for it.\n\nWithout an `Idempotency-Key` this POST is **not idempotent**: a blind retry can register a SECOND endpoint that then receives duplicate callbacks for every event, so read `GET /v1/webhooks` first and retry only if the endpoint is not there. With one (the header above), repeat the same request with the same key: it returns the endpoint that was created, with its secret withheld, and registers no second one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "webhooks:write"
        ],
        "x-kawaa-event-scopes": {
          "verification.completed": "verification:read",
          "verification.failed": "verification:read",
          "job.completed": "verification:read",
          "job.failed": "verification:read",
          "credits.low": "account:read",
          "credits.exhausted": "account:read",
          "blacklist.detected": "deliverability:read",
          "dmarc.failure": "deliverability:read"
        },
        "x-kawaa-event-scopes-white-label": {
          "events": [
            "credits.low",
            "credits.exhausted"
          ],
          "additional_scope": "white_label:read",
          "applies_when": "the account can have sub-accounts"
        }
      }
    },
    "/v1/webhooks/events": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "listWebhookEvents",
        "summary": "The events you can subscribe to",
        "description": "Every event name, what triggers it, and an example payload. Read this rather than hard-coding a list.",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The event catalogue.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "events": {
                          "type": "array",
                          "description": "Every event name a subscription may name. Read this rather than hard-coding: an event Kawaa does not know is refused at create.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "examples": [
                                  "verification.completed",
                                  "job.failed"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "category": {
                                "type": "string",
                                "examples": [
                                  "verification",
                                  "account",
                                  "deliverability"
                                ]
                              },
                              "available": {
                                "type": "boolean",
                                "description": "**False means nothing produces this event yet, and a subscription naming it is REFUSED.** It is rejected with 400 on create and on update, and names the available events in the message. It is listed here rather than hidden so a client can show the whole catalogue and say which entries are not ready, instead of discovering the refusal at submit time. Filter on this before offering an event as a choice."
                              },
                              "payload_example": {
                                "type": "object",
                                "description": "The shape a delivery of this event carries, as `{event, data}`."
                              }
                            },
                            "required": [
                              "name",
                              "description",
                              "category",
                              "available"
                            ]
                          }
                        }
                      },
                      "required": [
                        "events"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "webhooks:read"
        ]
      }
    },
    "/v1/webhooks/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "getWebhook",
        "summary": "One webhook endpoint",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "description": "The endpoint, directly; there is no `webhook` wrapper. Same shape as a row of the listing, and it never carries `secret` either: a signing secret appears only in the successful response that creates or explicitly rotates it.",
                      "properties": {
                        "webhook_id": {
                          "type": "string",
                          "description": "What the get, update, delete and test operations take as `{id}`."
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri",
                          "description": "The canonical callback URL. `null` identifies a malformed legacy endpoint that cannot deliver; repair it with PUT or delete it."
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "is_active": {
                          "type": "boolean",
                          "description": "False means Kawaa has stopped delivering to it. Set it back with the update operation; `disabled_reason` says why when Kawaa switched it off."
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Falls back to `created_at` on an endpoint that has never been changed."
                        },
                        "last_triggered_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Null on an endpoint that has never fired, which is not the same as one that is failing."
                        },
                        "failure_count": {
                          "type": "integer",
                          "description": "Consecutive delivery failures. A rising number beside a recent `last_triggered_at` is an endpoint that is being called and refusing."
                        },
                        "disabled_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "api_key_revoked",
                            "app_disconnected",
                            null
                          ],
                          "description": "Why Kawaa switched this endpoint off: `api_key_revoked` (an API key that created it, or that pointed it at its current URL (or, when none did, changed its events or turned it on), or the key behind a dashboard session that did, was revoked) or `app_disconnected` (a connected app that created it or did one of those was disconnected, including by a password change or reset or an account lock). The endpoint is kept, with `is_active: false`, so its owner can review it and turn it back on or delete it. `null` while it is on, and for an endpoint someone switched off."
                        }
                      },
                      "required": [
                        "webhook_id",
                        "url",
                        "events",
                        "is_active",
                        "created_at"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "webhooks:read"
        ]
      },
      "put": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "updateWebhook",
        "summary": "Change a webhook endpoint",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Where Kawaa POSTs the callback. HTTPS only: anything else is 400 WEBHOOK_URL_INVALID. No `format: uri` or anchored scheme `pattern` is declared on this REQUEST field: the URL is parsed first, which tolerates surrounding whitespace and normalizes the protocol, so `\" https://x\"` and `\"HTTPS://x\"` are both accepted while either constraint refuses them. HTTPS is required, checked on the PARSED protocol, not on the string you sent. Before storing it, Kawaa replaces the request string with that parsed URL's canonical string, so every response URL is a well-formed URI.",
                    "maxLength": 2048
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "description": "Omit the field to leave the subscription alone. Sending it EMPTY is not \"unsubscribe from everything\": the API answers `400 At least one event is required`. Delete the endpoint, or set `is_active: false`, to stop delivery."
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A note for your own reference. Send `null` to clear the stored one.",
                    "maxLength": 1000
                  },
                  "is_active": {
                    "type": "boolean",
                    "description": "Pause or reactivate the webhook. The update allow-lists url, description, events and is_active; anything else is a 400. Turning back on an endpoint that has a `disabled_reason` clears it, and from a dashboard session needs a sign-in within the last 15 minutes."
                  },
                  "webhook_id": {
                    "description": "What the get, update, delete and test operations take as `{id}`. Accepted here and IGNORED, whatever its value. The update stores only `url`, `description`, `events` and `is_active`; this field is in the allow-list so a `GET /v1/webhooks/{id}` payload can be edited and sent straight back without stripping the fields the API itself handed out. It is not marked `readOnly`, because OpenAPI clients omit read-only properties from request models and would break that supported round trip."
                  },
                  "created_at": {
                    "description": "Accepted here and IGNORED, whatever its value. The update stores only `url`, `description`, `events` and `is_active`; this field is in the allow-list so a `GET /v1/webhooks/{id}` payload can be edited and sent straight back without stripping the fields the API itself handed out. The response schema types the timestamp; this no-op request property deliberately adds no constraint the API does not enforce."
                  },
                  "updated_at": {
                    "description": "Falls back to `created_at` on an endpoint that has never been changed. Accepted here and IGNORED, whatever its value. The update stores only `url`, `description`, `events` and `is_active`; this field is in the allow-list so a `GET /v1/webhooks/{id}` payload can be edited and sent straight back without stripping the fields the API itself handed out. The response schema types the timestamp; this no-op request property deliberately adds no constraint the API does not enforce."
                  },
                  "last_triggered_at": {
                    "description": "Null on an endpoint that has never fired, which is not the same as one that is failing. Accepted here and IGNORED, whatever its value. The update stores only `url`, `description`, `events` and `is_active`; this field is in the allow-list so a `GET /v1/webhooks/{id}` payload can be edited and sent straight back without stripping the fields the API itself handed out. The response schema types the timestamp; this no-op request property deliberately adds no constraint the API does not enforce."
                  },
                  "failure_count": {
                    "description": "Consecutive delivery failures. A rising number beside a recent `last_triggered_at` is an endpoint that is being called and refusing. Accepted here and IGNORED, whatever its value. The update stores only `url`, `description`, `events` and `is_active`; this field is in the allow-list so a `GET /v1/webhooks/{id}` payload can be edited and sent straight back without stripping the fields the API itself handed out. The response schema types the count; this no-op request property deliberately adds no constraint the API does not enforce."
                  },
                  "disabled_reason": {
                    "description": "Accepted here and IGNORED, whatever its value. Why Kawaa switched the endpoint off is set by Kawaa when an API key or connected app that created it, or that pointed it at its current URL (or, when none did, changed its events or turned it on), is revoked or disconnected, and cleared by sending `is_active: true`; this field is in the allow-list so a `GET /v1/webhooks/{id}` payload can be edited and sent straight back without stripping the fields the API itself handed out. The response schema types it; this no-op request property deliberately adds no constraint the API does not enforce."
                  }
                },
                "additionalProperties": false,
                "description": "Send only what you are changing. The first key that is neither writable nor a known response field is refused with 400, so a misspelling is caught, while a round trip of a fetched endpoint object is deliberately accepted. The five known response fields below are the no-op half of that: present is fine, changing them is not possible. They are intentionally not marked `readOnly`, because generated request models would otherwise omit them and break the supported round trip."
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "Updated.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "webhook": {
                          "type": "object",
                          "properties": {
                            "webhook_id": {
                              "type": "string",
                              "examples": [
                                "wh_3f9a1c2b4d5e6f7a8b9c0d1e2f3a4b5c"
                              ]
                            },
                            "url": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "description": "The canonical callback URL. This is `null` only when the update omitted `url` and the stored legacy destination was malformed; send a valid URL in another PUT to repair it."
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "is_active": {
                              "type": "boolean"
                            },
                            "disabled_reason": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "api_key_revoked",
                                "app_disconnected",
                                null
                              ],
                              "description": "As on the listing: why Kawaa switched the endpoint off, or `null`. Sending `is_active: true` clears it."
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "description": "When this change landed. The update response carries only this timestamp: `created_at` is not returned here; read it from the listing or the single-webhook route."
                            }
                          },
                          "description": "The endpoint as it now stands, including a description cleared in this same request: the response reports the stored value for every field, so there is no need to re-read after an update. No `secret`: a signing secret appears only in the successful response that creates or explicitly rotates it.",
                          "required": [
                            "webhook_id",
                            "url",
                            "description",
                            "events",
                            "is_active",
                            "updated_at"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "webhook",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`CONFLICT`: nothing was changed. One of: the request turns the endpoint on (`is_active: true`), and Kawaa switched it off while the request was in flight because an API key or connected app that created it, or that changed its URL or events or turned it on, was revoked or disconnected (a password change, reset or lock included): check where it sends, then send the request again to turn it on. Or the request changes `url` or `events`, or turns the endpoint on, and the account's credentials changed while it was in flight (a password change, a reset, a lock, a white-label key reset, or for a dashboard session signing out every session): send it again if your credential still works. Or another request changed the endpoint after this one read it: read it again, then send your change again if you still want it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "The webhook URL's hostname could not be resolved right now (`WEBHOOK_DNS_TEMPORARY_FAILURE`). This is a TRANSIENT DNS failure, not a rejection of the URL; a permanent one is `400 WEBHOOK_URL_INVALID`. Nothing was created or changed. Retry.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "webhooks:write"
        ],
        "description": "Change an endpoint. Only the fields sent are changed. With a dashboard session, changing `url` or `events` needs a sign-in within the last 15 minutes; an older session answers `403 REAUTHENTICATION_REQUIRED`. Sending the URL and events the endpoint already has is not a change. The same goes for `is_active: true` on an endpoint with a `disabled_reason`: turning back on an endpoint Kawaa switched off trusts its destination again. An API key or a connected app is not held to this. `is_active: true` clears `disabled_reason`, and is refused with `409 CONFLICT` if Kawaa switched the endpoint off while the request was in flight (a revoke, password change or lock that landed after it was authenticated); sending it again afterwards turns it on.\n\n**A scoped key needs more than `webhooks:write` here.** A subscription is a way to receive what its events carry, so each requested event also requires the scope that owns that data: `verification.completed` needs `verification:read`, `verification.failed` needs `verification:read`, `job.completed` needs `verification:read`, `job.failed` needs `verification:read`, `credits.low` needs `account:read`, `credits.exhausted` needs `account:read`, `blacklist.detected` needs `deliverability:read`, `dmarc.failure` needs `deliverability:read`. On an account that can have sub-accounts, `credits.low` and `credits.exhausted` additionally require `white_label:read`, because those deliveries name the sub-account and its label. Missing any of them is a `403` naming each event and the scope it needed, and no webhook is created. An unrestricted key needs none of this. `x-kawaa-event-scopes` carries the same table in machine-readable form.",
        "x-kawaa-event-scopes": {
          "verification.completed": "verification:read",
          "verification.failed": "verification:read",
          "job.completed": "verification:read",
          "job.failed": "verification:read",
          "credits.low": "account:read",
          "credits.exhausted": "account:read",
          "blacklist.detected": "deliverability:read",
          "dmarc.failure": "deliverability:read"
        },
        "x-kawaa-event-scopes-white-label": {
          "events": [
            "credits.low",
            "credits.exhausted"
          ],
          "additional_scope": "white_label:read",
          "applies_when": "the account can have sub-accounts"
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "deleteWebhook",
        "summary": "Delete a webhook endpoint",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "Deleted.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "webhooks:write"
        ]
      }
    },
    "/v1/webhooks/{id}/secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "regenerateWebhookSecret",
        "summary": "Rotate a webhook signing secret",
        "description": "Replace the endpoint's signing secret without deleting or reconfiguring the endpoint. A successful call returns the replacement exactly once; deliveries that load the endpoint afterward use it, while a delivery already in flight may still carry a signature made with the previous value. Store the returned value before leaving the response; no read operation can recover it.\n\n**The previous secret stops working at once.** There is no overlap: every later delivery is signed with the replacement only. Until your receiver has it, it refuses those deliveries, and a 401, or any other 4xx except 429, is final and not retried, so events sent in that gap are not delivered on their own. If you can, have your receiver accept a signature made with either secret while the replacement rolls out, then drop the old one. Re-send what failed in the gap with `POST /v1/webhooks/{id}/logs/{logId}/retry`; a re-send is signed with the current secret.\n\nWith a dashboard session this needs a sign-in within the last 15 minutes, as changing `url` or `events` does; an older session answers `403 REAUTHENTICATION_REQUIRED`. An API key or a connected app is not held to this. Each rotation is recorded in the audit log as `settings.webhook_secret_regenerated`, without either secret.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The secret was replaced. Subsequent deliveries are signed with this value, except that a delivery already in flight may have loaded the previous secret before rotation.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "secret": {
                          "type": "string",
                          "description": "The replacement signing secret, returned by this successful rotation only. It is now the value used for `X-Kawaa-Signature-V2` and the legacy `X-Kawaa-Signature`."
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "secret",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "The rotation outcome is **indeterminate**: the write may have committed even though its response was lost. Retrying is safe for endpoint configuration but rotates again. Retry this same operation until one call succeeds, then keep only the secret from that successful response; it supersedes every earlier value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "webhooks:write"
        ]
      }
    },
    "/v1/webhooks/{id}/logs": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "listWebhookDeliveryLogs",
        "summary": "An endpoint's delivery log",
        "description": "The deliveries made to this endpoint, newest first: product events, test sends and retries, each with what was sent and what the endpoint answered. Entries are kept for 30 days. An entry for a `verification.*` or `job.*` event holds that job's data, so it is removed with the job's results when the plan keeps results for less time than that, and can no longer be read or retried.\n\n**A scoped key sees only the entries whose payload it may read.** Each entry holds its payload verbatim, so an entry is returned only when the key holds the scope that owns what its event carries (`verification:read` for `verification.*` and `job.*`, `account:read` for `credits.*`, `deliverability:read` for `blacklist.detected` and `dmarc.failure`; on an account that can have white-label sub-accounts, `credits.*` also needs `white_label:read`, because those events can name a sub-account). The events left out for that reason are named in `withheld_events`, and an unrestricted key or a dashboard session sees every entry. An id that belongs to another account is a 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Entries per page. Default 20. A value above 100 is served as 100, and a missing, zero, negative or non-numeric value is served as 20, rather than refused; a fraction is rounded down. The response's `limit` says what was applied.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Entries to skip from the newest, default 0. A value above 1,000 is served as 1,000 and a negative or non-numeric value as 0, rather than refused. Page past that with `cursor`. Not applied when `cursor` is sent.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `cursor` from the previous page, to read the next one. Opaque; do not construct or edit one. A cursor that does not decode, is not in the shape this endpoint issues, or belongs to another webhook is a 400 with code `INVALID_CURSOR`; start again without it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "One page of the log.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "logs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "description": "One delivery attempt run: a product event, a test send, or a retry. Each retry is a NEW entry; the entry it re-sent keeps its original outcome.",
                            "properties": {
                              "log_id": {
                                "type": "string",
                                "description": "What the retry operation takes as `{logId}`."
                              },
                              "event": {
                                "type": "string",
                                "description": "The event the delivery carried, as it was stored. Entries written before the event names were settled can carry a legacy alias (`batch.completed`, `batch.failed`, `credits.depleted`) rather than its canonical name."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "success",
                                  "failed"
                                ],
                                "description": "`success` when the endpoint answered 2xx."
                              },
                              "status_code": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "The endpoint's HTTP status. Null when no HTTP response was received (timeout, DNS or connection error, or a URL refused as unsafe); `error_message` says which."
                              },
                              "response_time_ms": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "How long the delivery took, across its attempts. Null on an entry that did not record it."
                              },
                              "request_body": {
                                "type": "string",
                                "description": "The JSON body that was sent, verbatim, as a string: parse it to read the payload. The signature was computed over exactly these bytes. A test send's body carries `\"test\": true`."
                              },
                              "response_body": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The start of what the endpoint answered, truncated. Null when it answered nothing or no response was received."
                              },
                              "error_message": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Why a failed delivery failed, e.g. `HTTP 500`, a timeout, or `Webhook URL rejected: ...`. Null on a success."
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "delivery_type": {
                                "type": "string",
                                "enum": [
                                  "event",
                                  "test",
                                  "retry"
                                ],
                                "description": "`event` for a real delivery, `test` for a send from the test operation, `retry` for a re-send from the retry operation. Entries written before this field existed read as `event`."
                              }
                            },
                            "required": [
                              "log_id",
                              "event",
                              "status",
                              "status_code",
                              "response_time_ms",
                              "request_body",
                              "response_body",
                              "error_message",
                              "created_at",
                              "delivery_type"
                            ]
                          }
                        },
                        "count": {
                          "type": "integer",
                          "description": "How many entries are on this page."
                        },
                        "total": {
                          "type": "integer",
                          "deprecated": true,
                          "description": "An older name for `count`, kept for existing clients: the number of entries on THIS page, not the number of deliveries the endpoint has had, which is not counted."
                        },
                        "limit": {
                          "type": "integer",
                          "description": "The page size that was applied."
                        },
                        "offset": {
                          "type": "integer",
                          "description": "The offset that was applied, echoed even when `cursor` was sent and the offset was not used."
                        },
                        "cursor": {
                          "type": "string",
                          "description": "Present when there may be more entries. Send it back as `cursor` to read the next page; its absence is the end. A page can be shorter than `limit`, or empty, and still carry one, so page until it is absent rather than stopping at a short page."
                        },
                        "withheld_events": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Present only for a scoped key that may not read some events' payloads: the canonical names of the events whose entries this key is not shown. Entries for these events may exist and are not on the page. Absent when the key is refused nothing."
                        },
                        "unclassified_withheld": {
                          "const": true,
                          "description": "Present when an entry was left out because its event is one this Kawaa build does not recognize, so no scope could be matched to it. Such an entry is not named in `withheld_events`. An unrestricted key is shown it."
                        },
                        "unclassified_withheld_unknown": {
                          "const": true,
                          "description": "Present when the check for such unrecognized entries could not be completed, so the page may or may not have left one out. Not the same as `unclassified_withheld` being absent."
                        }
                      },
                      "required": [
                        "logs",
                        "count",
                        "total",
                        "limit",
                        "offset"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "webhooks:read"
        ]
      }
    },
    "/v1/webhooks/{id}/logs/{logId}/retry": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "retryWebhookDelivery",
        "summary": "Re-send a logged delivery",
        "description": "Sends the logged entry's `request_body` again, byte for byte, to the endpoint's CURRENT URL, signed with its current secret. The re-send carries a fresh `X-Kawaa-Timestamp` header, an `X-Kawaa-Retry: true` header and an `X-Kawaa-Signature-V2` whose `t` is the time of the re-send, so it passes a receiver's 300-second window however old the original is; the body, including its own `timestamp` field, is the original's. Check freshness against that `t`, never against the body's `timestamp`. It is made once, with a 10-second timeout, and recorded as a NEW log entry with `delivery_type: \"retry\"`; the original entry keeps its outcome. Any entry still in the log can be re-sent, a successful one included. No request body is read.\n\nA scoped key may re-send only an entry whose payload it may read (the same rule the log listing applies); otherwise the answer is 403 and nothing is sent.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          },
          {
            "name": "logId",
            "in": "path",
            "required": true,
            "description": "The entry's `log_id`, from the delivery log.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The re-send was ATTEMPTED. **200 does not mean it worked**: branch on `data.success`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "description": "Whether the endpoint accepted the re-send (a 2xx). False for a non-2xx, a timeout, a connection failure, and a URL refused as unsafe or missing, all of which still answer HTTP 200 here."
                        },
                        "status_code": {
                          "type": "integer",
                          "description": "What the endpoint answered. `0` when nothing was reached."
                        },
                        "message": {
                          "type": "string",
                          "description": "What happened, in prose, e.g. `Retry successful`, `Retry failed with status 500`, or why the URL was refused."
                        }
                      },
                      "required": [
                        "success",
                        "status_code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Nothing was sent. `Webhook not found` for an endpoint id that is not this account's; `Log entry not found` for a `logId` that does not exist, belongs to another endpoint, or has passed its retention.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "`CONFLICT`: nothing was sent. Kawaa switched the endpoint off because an API key or connected app that created it, or that changed its URL or events or turned it on, was revoked or disconnected, or the delivery check found such an end. Check where it sends and turn it back on before resending deliveries to it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "The log entry could not be read at that moment, so nothing was sent. Retrying this operation is safe. Also when the credentials the endpoint records could not be checked: nothing was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "webhooks:write"
        ]
      }
    },
    "/v1/webhooks/{id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "testWebhook",
        "summary": "Send a test delivery",
        "description": "Delivers a signed sample payload to the endpoint so you can confirm signature verification before real events arrive. It carries the same signature headers as a real delivery, `X-Kawaa-Signature-V2` with the time of this send and the legacy `X-Kawaa-Signature`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The delivery was ATTEMPTED. **200 does not mean it worked**: branch on `data.success`.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "description": "Whether the endpoint accepted the delivery (a 2xx). False for a non-2xx, a timeout, a connection failure, and a URL refused as unsafe, all of which still answer HTTP 200 at this route, because the REQUEST succeeded even though the DELIVERY did not."
                        },
                        "status_code": {
                          "type": "integer",
                          "description": "What the endpoint answered. `0` when nothing was reached."
                        },
                        "response_time_ms": {
                          "type": "integer"
                        },
                        "response_body": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The first part of the endpoint's body, for diagnosing a rejection. Null when there was none."
                        },
                        "message": {
                          "type": "string",
                          "description": "What happened, in prose: the only place a DNS refusal or an SSRF block is explained."
                        },
                        "event": {
                          "type": "string",
                          "description": "The canonical event whose sample payload was delivered, and the value of the `X-Kawaa-Event` header on that delivery. Equals what you sent, with a legacy alias resolved to its canonical name, or `verification.completed` when the request named no event. Read it to confirm which integration path the test actually exercised."
                        }
                      },
                      "required": [
                        "success",
                        "status_code",
                        "response_time_ms",
                        "response_body",
                        "message",
                        "event"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "webhooks:write"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "description": "Which event's sample payload to send. Omitted, the FIRST event Kawaa defines (`verification.completed`) is used, not necessarily one this webhook is subscribed to, so a test with no body can exercise an event the endpoint never receives in practice. Explicit `null` and other non-string values are refused with 400; only omission selects the default. **An unrecognized name is refused with `400 Invalid events: <name>`** (the same message create and update give), so a mistyped `dmarc.failur` fails loudly instead of delivering a `verification.completed` sample and reporting success. Legacy aliases (`batch.completed`, `credits.depleted`) resolve to their canonical names. The response's `event` field names whichever event was actually sent. Valid names come from `GET /v1/webhooks/events`."
                  }
                },
                "description": "Optional. `event` picks which event shape the test delivery carries; omit the body entirely and the endpoint picks one.\n\nDeliberately NOT closed, because this route is not: it reads only `event` from the body, and anything else is ignored rather than refused. That is unlike create and update, which answer 400 for the first key they do not recognize, so a misspelled `evnet` here still selects the default event rather than failing. The VALUE of `event` is now validated (an unknown name is a 400), so the remaining gap is a misspelled KEY. Check the response's `event` field to confirm which sample was sent. Send only `event`."
              }
            }
          }
        }
      }
    },
    "/v1/billing/plans": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "operationId": "listPlans",
        "summary": "Plans and prices",
        "description": "The plan catalogue. Needs a valid API key like every other route here; `is_current` marks the plan that key's account is on.\n\nEvery `price` is quoted in `currency`, which is always USD: this endpoint does not take a currency and does not convert. `billable_currencies` is the separate question of which currencies a subscription can be created in, and `credit_package_currencies` the same question for one-off credit packs. Those two lists differ, so offering a currency from the wrong one produces a checkout the customer cannot complete.\n\n**A white-label sub-account has no plan of its own.** The route is open to sub-accounts (it is the public price list), but such an account spends a credit pool its parent allocated and holds no subscription. It gets `current_plan: \"sub_account\"` (agreeing with `GET /v1/account`), `is_current: false` on every plan, and a `plan_note` saying where the subscription lives. Do not present a plan as that account's, and expect `403 SUB_ACCOUNT_MANAGED` from every subscription write.",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The plans.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "plans": {
                          "type": "array",
                          "description": "Every plan, in catalogue order, free first. A sub-account is not in here: it has no plan of its own.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "enum": [
                                  "free",
                                  "starter",
                                  "professional",
                                  "business",
                                  "enterprise"
                                ],
                                "description": "The value `POST /v1/billing/checkout` takes as `plan`."
                              },
                              "name": {
                                "type": "string",
                                "description": "The display name.",
                                "examples": [
                                  "Professional"
                                ]
                              },
                              "price": {
                                "type": "number",
                                "description": "Per `interval`, in `currency`, in whole currency units (not cents). `0` for free."
                              },
                              "currency": {
                                "type": "string",
                                "enum": [
                                  "USD",
                                  "EUR",
                                  "GBP",
                                  "BRL",
                                  "INR"
                                ],
                                "description": "Always `USD` today: the catalogue is quoted in one currency. See `billable_currencies` for what a subscription can be created in."
                              },
                              "interval": {
                                "const": "month",
                                "description": "How `price` is billed: every paid plan is billed monthly. It does not say the credits renew; read `credits_renewal` for that. Free has no price, and its credits do not renew."
                              },
                              "credits": {
                                "type": "number",
                                "description": "The plan's credit grant. On a paid plan it is added each billing period, when that period's invoice is paid (`credits_renewal: \"monthly\"`); an invoice left unpaid grants nothing. On Free the grant does not renew monthly (`credits_renewal: \"one-time\"`): 100 credits given when the account is created, and another 100 each time a paid subscription ends (is cancelled or deleted) and the account moves back to Free. An unpaid subscription that moves the account to Free does not grant it: that subscription has not ended. Not a verification count: a cached verification costs 0.5 and a domain search 10."
                              },
                              "credits_renewal": {
                                "type": "string",
                                "enum": [
                                  "monthly",
                                  "one-time"
                                ],
                                "description": "Whether `credits` renews: `monthly` on every paid plan, `one-time` on Free. The same field, with the same values, as `GET /v1/usage/plans` publishes for each plan. Optional, so a client should handle a plan without it."
                              },
                              "features": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Marketing lines for the plan, in display order. Not a machine-readable entitlement list; read `GET /v1/usage/limits` for the enforced numbers."
                              },
                              "is_current": {
                                "type": "boolean",
                                "description": "True for the plan the calling key's account is on. False on every plan for a white-label sub-account, which is subscribed to none of them."
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "price",
                              "currency",
                              "interval",
                              "credits",
                              "features",
                              "is_current"
                            ]
                          }
                        },
                        "current_plan": {
                          "type": "string",
                          "description": "The account's plan id, repeated here so a client does not have to scan `plans` for `is_current`. `free` when the account has no subscription. `sub_account` for a white-label sub-account, which has no plan of its own; see `plan_note`, and note that no entry in `plans` is marked `is_current` in that case."
                        },
                        "plan_note": {
                          "type": "string",
                          "description": "Present only when `current_plan` is not a plan the account is subscribed to: today, only for a white-label sub-account, whose subscription is held by its parent and whose credits are the pool that parent allocated. Same field, and the same purpose, as `plan_note` on `GET /v1/usage/limits`. Absent for every ordinary account."
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "USD",
                            "EUR",
                            "GBP",
                            "BRL",
                            "INR"
                          ],
                          "description": "The currency every `price` above is quoted in."
                        },
                        "billable_currencies": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "USD",
                              "EUR",
                              "GBP",
                              "BRL",
                              "INR"
                            ]
                          },
                          "description": "The currencies a SUBSCRIPTION can actually be created in, derived from the Stripe prices that exist, so it can be shorter than the supported list and can change at any time. A currency outside it is refused at checkout."
                        },
                        "credit_package_currencies": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "USD",
                              "EUR",
                              "GBP",
                              "BRL",
                              "INR"
                            ]
                          },
                          "description": "The currencies a one-off CREDIT PACK can be bought in. Packs are priced inline at checkout rather than from a stored Stripe price, so this list is not bound by `billable_currencies` and is usually longer."
                        }
                      },
                      "required": [
                        "plans",
                        "current_plan",
                        "currency",
                        "billable_currencies",
                        "credit_package_currencies"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/billing/credit-packages": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "operationId": "listCreditPackages",
        "summary": "Credit packs and prices",
        "description": "One-off credit packs. Needs a valid API key.\n\nPrices are quoted in `currency`, which defaults to USD and is set by the query parameter. Each pack has a price in every supported currency, so this returns one currency's prices, not all of them. A currency Kawaa cannot price is a `400`, not a silent fallback to USD: quoting dollar amounts under another currency's label is how a buyer ends up comparing the wrong numbers.",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "The packs, priced in the requested currency.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Window": {
                "$ref": "#/components/headers/RateLimitWindow"
              },
              "X-RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "packages": {
                          "type": "array",
                          "description": "Every pack, smallest first. The list is fixed; only the prices move with `currency`.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "package_id": {
                                "type": "string",
                                "description": "The value `POST /v1/billing/purchase-credits` takes as `package_id`.",
                                "examples": [
                                  "credits_10000"
                                ]
                              },
                              "name": {
                                "type": "string",
                                "description": "A display name built from the credit count.",
                                "examples": [
                                  "10,000 Credits"
                                ]
                              },
                              "credits": {
                                "type": "integer",
                                "description": "Credits added on purchase. They do not expire with a billing period."
                              },
                              "price": {
                                "type": "number",
                                "description": "One-off charge in `currency`, in whole currency units (not cents)."
                              },
                              "currency": {
                                "type": "string",
                                "enum": [
                                  "usd",
                                  "eur",
                                  "gbp",
                                  "brl",
                                  "inr"
                                ],
                                "description": "LOWER-CASE here, unlike the plan catalogue, which reports it upper-case. Same value, two spellings: compare case-insensitively."
                              },
                              "savings_percent": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Discount against the smallest pack's per-credit rate, as a whole number. `null` for the smallest pack, which is the baseline."
                              },
                              "popular": {
                                "type": "boolean",
                                "description": "A display hint for the pack Kawaa highlights. Not an entitlement and not a price."
                              }
                            },
                            "required": [
                              "package_id",
                              "name",
                              "credits",
                              "price",
                              "currency",
                              "savings_percent",
                              "popular"
                            ]
                          }
                        }
                      },
                      "required": [
                        "packages"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "billing:read"
        ],
        "parameters": [
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(?:[Bb][Rr][Ll]|[Ee][Uu][Rr]|[Gg][Bb][Pp]|[Ii][Nn][Rr]|[Uu][Ss][Dd])$",
              "default": "USD"
            },
            "description": "Quote the packs in this currency: BRL, EUR, GBP, INR, USD. **Genuinely case-insensitive**: the value is upper-cased before it is checked, so `usd`, `USD` and `Usd` are the same request. Expressed as a case-insensitive `pattern` rather than an `enum` on purpose: an enum can only list casings, and listing `USD` and `usd` still made a generated validator refuse `Usd`, which the API accepts. The response echoes the code lower-case. Anything else is 400."
          }
        ]
      }
    },
    "/v1/exports/schedules": {
      "get": {
        "tags": [
          "Exports"
        ],
        "operationId": "listExportSchedules",
        "summary": "List owned export schedules",
        "description": "Returns retained schedules for the authenticated account. scheduling_available and manual_run_available state whether this account can create, change and run schedules, and request a run now; an account without access can still read and remove retained schedules. Scheduled exports deliver by email, webhook or Amazon S3. Google Cloud Storage and Azure Blob Storage delivery is not available yet: a schedule that would deliver to one cannot be created, changed, resumed or run, and a run that reaches one fails without sending anything. run_in_progress means the schedule has an unfinished export request. Private credentials and run identities are omitted.",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "exports:read"
            ]
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "Owned schedules and current account availability.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "schedules",
                        "scheduling_available",
                        "manual_run_available"
                      ],
                      "properties": {
                        "scheduling_available": {
                          "type": "boolean"
                        },
                        "manual_run_available": {
                          "type": "boolean"
                        },
                        "schedules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "enabled",
                              "on_hold",
                              "run_in_progress"
                            ],
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "data_type": {
                                "type": "string",
                                "enum": [
                                  "verifications",
                                  "jobs",
                                  "audit_logs",
                                  "account",
                                  "all"
                                ]
                              },
                              "format": {
                                "type": "string",
                                "enum": [
                                  "csv",
                                  "json"
                                ]
                              },
                              "frequency": {
                                "type": "string",
                                "enum": [
                                  "daily",
                                  "weekly",
                                  "monthly"
                                ]
                              },
                              "day_of_week": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "minimum": 0,
                                "maximum": 6,
                                "description": "The weekday a weekly schedule runs, from 0 (Sunday) to 6 (Saturday), in its timezone. Null for daily and monthly schedules."
                              },
                              "day_of_month": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "minimum": 1,
                                "maximum": 28,
                                "description": "The day of the month a monthly schedule runs, from 1 to 28, in its timezone. Null for daily and weekly schedules."
                              },
                              "time": {
                                "type": "string",
                                "pattern": "^\\d{2}:\\d{2}$",
                                "description": "The time of day the schedule runs, as HH:MM in its timezone."
                              },
                              "timezone": {
                                "type": "string",
                                "description": "The IANA timezone, or a supported fixed-offset abbreviation, that time and the run day are read in."
                              },
                              "delivery_method": {
                                "type": "string",
                                "enum": [
                                  "email",
                                  "webhook",
                                  "cloud_storage"
                                ]
                              },
                              "delivery_destination": {
                                "type": "string",
                                "description": "Where each run is delivered. For email, the value email means the account's own address; any other value is the address the export is emailed to. For webhook, the URL. For cloud_storage, the path in the account's saved storage destination."
                              },
                              "destination": {
                                "type": "string",
                                "description": "The destination under its earlier name. Read delivery_destination instead."
                              },
                              "enabled": {
                                "type": "boolean",
                                "description": "The owner's own switch. False while the schedule is paused."
                              },
                              "on_hold": {
                                "type": "boolean"
                              },
                              "run_in_progress": {
                                "type": "boolean"
                              },
                              "next_run_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "When the schedule next runs. Null while nothing will run it: while it is paused (enabled is false), and while scheduling is not available to the account. Resuming a paused schedule sets its next run from the time it is resumed, never to a time that has passed."
                              },
                              "next_run": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The same value as next_run_at, under its earlier name."
                              },
                              "last_run_status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "last_run_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "When the schedule last ran. Null before its first run."
                              },
                              "last_run": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The same time as last_run_at, under its earlier name."
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "delivery_destination_unsubscribed_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "When the email recipient, an address other than the account's own verified email, used the unsubscribe link in an export email. No schedule of the account emails it after that. Null while it still receives them, and for webhook and cloud storage schedules."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-kawaa-scopes": [
          "exports:read"
        ]
      }
    },
    "/v1/exports/schedules/{scheduleId}/run": {
      "post": {
        "tags": [
          "Exports"
        ],
        "operationId": "runExportSchedule",
        "summary": "Request one export from an owned schedule",
        "description": "Available only when the account reports manual_run_available: true. Queues one export for the private worker; acceptance does not mean processing or delivery has completed. A one-off request can use a paused schedule and does not advance its recurring calendar. Both the schedule credential and requester must remain authorized for the selected data. Use one printable ASCII Idempotency-Key without spaces or commas, and reuse it after any uncertain response. A retry returns the original request, including its recorded failed or completed status. It never applies later schedule edits to the accepted request. An active schedule request prevents a second request until its final result. The replay receipt stays while work is unresolved and, after completion, for at least 30 days or the accepted output retention period, whichever is longer. A retained receipt whose completed output has been removed, is being deleted, or has expired returns 410 without restarting it. After the receipt itself expires, a request may be new; keep retries within 30 days of submission or deliberately start a new request. No verification credits are spent by this request. Completed means accepted by the delivery provider, not confirmed receipt in a mailbox.",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "exports:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "One token per requested export; reuse on retries. Do not contain commas or spaces.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "Accepted request or the result of the same earlier request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "export_id",
                        "status",
                        "replayed",
                        "message"
                      ],
                      "properties": {
                        "export_id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "completed",
                            "failed"
                          ]
                        },
                        "replayed": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing request key, or saved schedule settings need correction.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The requester or originating schedule credential lacks current permission."
          },
          "404": {
            "description": "No owned schedule matches this identifier."
          },
          "409": {
            "description": "The schedule or permission changed, a run is active, or this key belongs to another requester. Retry the same key after checking the schedule."
          },
          "410": {
            "description": "IDEMPOTENT_EXPORT_EXPIRED: the accepted output is no longer retained; this retry did not start another export. Use a new key for a new request."
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE with retryable: false. Scheduling or manual runs are not available to this account, or the schedule delivers to cloud storage on a provider that is not available yet (Google Cloud Storage or Azure Blob Storage).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "exports:write"
        ]
      }
    },
    "/v1/account/export/download": {
      "get": {
        "summary": "Download your current Profile export",
        "operationId": "downloadProfileExport",
        "description": "Requires account:read, security:read and verification:read. Reads the current account-owned archive without generating a new export or sending email. The reservation must match the current export, which is retained for seven days. A new export replaces the previous reservation.",
        "parameters": [
          {
            "name": "export_id",
            "in": "query",
            "required": true,
            "description": "The millisecond reservation timestamp from the Profile export link.",
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,15}$"
            }
          }
        ],
        "responses": {
          "default": {
            "$ref": "#/components/responses/Default"
          },
          "200": {
            "description": "A fresh private download URL for the existing owned archive. It expires after at most one hour and never beyond the archive retention deadline.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "download_url",
                        "expires_in_seconds",
                        "retention_days"
                      ],
                      "properties": {
                        "download_url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "expires_in_seconds": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 3600
                        },
                        "retention_days": {
                          "type": "integer",
                          "const": 7
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "410": {
            "description": "PROFILE_EXPORT_UNAVAILABLE, retryable false: the archive is missing, expired or replaced. Request a new export from Profile.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "The account read could not be completed. No archive was generated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "PROFILE_EXPORT_DOWNLOAD_UNAVAILABLE, retryable true: reading or signing the existing archive failed. Retry this same GET; no export generation or email is triggered.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayError"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-kawaa-scopes": [
          "account:read",
          "security:read",
          "verification:read"
        ],
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerToken": []
          },
          {
            "OAuth2": [
              "account:read",
              "security:read",
              "verification:read"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "A Kawaa API key, created in Settings \u2192 API keys. Format: `ev_` followed by 32 alphanumeric characters."
      },
      "BearerToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "The same API key, sent as `Authorization: Bearer <key>`. Accepted everywhere `X-Api-Key` is. This scheme is the `ev_` API key only. An OAuth access token (`evo_` followed by 40 alphanumeric characters) travels in the same header, but it is the `OAuth2` scheme: it is always scoped, and it is accepted only by the operations that list `OAuth2`, with the scopes they name. An operation that lists `BearerToken` without `OAuth2` refuses it."
      },
      "OAuth2": {
        "type": "oauth2",
        "description": "OAuth 2.1 sign-in, for an app or agent that acts for a person who approves it on a Kawaa consent screen, instead of being handed an API key. The access token is sent as `Authorization: Bearer <token>`, the same header as `BearerToken`, and is checked exactly like a scoped API key: scopes, rate limits and credits apply unchanged.\n\n- **Discovery.** Authorization server metadata (RFC 8414): `https://api.kawaa.com/.well-known/oauth-authorization-server`. Protected resource metadata (RFC 9728): `https://api.kawaa.com/.well-known/oauth-protected-resource` for this API and `https://api.kawaa.com/.well-known/oauth-protected-resource/mcp` for the MCP server.\n- **Client.** Use the https URL of a Client ID Metadata Document, on the default port, as `client_id` (public clients only), or register at `https://api.kawaa.com/oauth/register` (RFC 7591; no credential needed). Registration follows the RFC defaults when a field is omitted: `token_endpoint_auth_method` `client_secret_basic` (a secret is issued) and `grant_types` `authorization_code` alone. Send `none` for a public client, and include `refresh_token` in `grant_types` to be issued refresh tokens. A redirect URI is https, loopback http (any port), or an app's own scheme: a reversed domain name (RFC 8252 \u00a77.1, `com.example.app:/callback`) or one of `cursor`, `vscode`, `vscode-insiders`, `claude` and `windsurf`. Browser and operating-system handler schemes are refused (`invalid_redirect_uri`).\n- **PKCE.** Required on every authorization request, with `code_challenge_method=S256`; no other method is accepted. The only grants are `authorization_code` and `refresh_token`.\n- **Resource.** Send `resource=https://api.kawaa.com` for this API (RFC 8707). Without it the token is issued for the MCP server, `https://api.kawaa.com/mcp`; any other value is refused with `invalid_target`.\n- **Scopes.** With no `scope` parameter the request is for `verification:write verification:read account:read analytics:read`. Scopes Kawaa does not define, and scopes a connected app can never hold, are dropped rather than refused; if none remain the request is refused with `invalid_scope`. An authorization request refused before the person answers it (`invalid_request`, `unsupported_response_type`, `invalid_target`, `invalid_scope`) is shown to them on a Kawaa error page carrying that code, and is not sent to the redirect URI (RFC 9700 \u00a74.11.2); only their answer is, the code or `access_denied`, with `state` and `iss`. The person approving can untick any scope, and the token response's `scope` states what was granted. `account:write`, `account:delete`, `billing:write`, `team:write`, `security:write` and `white_label:write` are never granted, so the operations that need them do not list this scheme, and neither do those marked `x-kawaa-unscoped-only`. As for API keys, `<area>:write` also satisfies `<area>:read`.\n- **Tokens.** An access token is `evo_` followed by 40 alphanumeric characters and lasts one hour (`expires_in: 3600`); after that the API answers 401 `OAUTH_TOKEN_EXPIRED`. A refresh token is `evr_` followed by 48 alphanumeric characters and is never accepted as a bearer credential. Every refresh returns a new refresh token and retires the one presented. The one just used may be presented up to 5 more times within 60 seconds of its use (a lost response, or several refreshes sent at once) and gets a new one of its own each time; the first of those to be used retires the rest. Presenting it again after that, or presenting any older refresh token, is treated as theft and ends the connection: its refresh tokens and every live access token stop working. A refresh may ask for fewer scopes than the connection holds, never more. A connection that is not refreshed for 30 days ends. Revoke at `https://api.kawaa.com/oauth/revoke` (RFC 7009).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://api.kawaa.com/oauth/authorize",
            "tokenUrl": "https://api.kawaa.com/oauth/token",
            "refreshUrl": "https://api.kawaa.com/oauth/token",
            "scopes": {
              "verification:read": "Read verification results and jobs this account has already paid for. Spends nothing.",
              "verification:write": "Anything that spends verification credits: verifying an address, a batch or a file, finding a business email, and the domain and address-history lookups, which are charged too.",
              "lists:read": "Read auto-clean lists and their run history.",
              "lists:write": "Create, change, pause and delete auto-clean lists, and start rechecks. Each rechecked address spends one credit. Creating, reactivating and starting rechecks require Professional or above and account execution availability.",
              "deliverability:read": "Read deliverability checks, blacklist and DMARC monitors, and inbox-placement and warmup state. Email warmup and inbox placement tests are not available yet.",
              "deliverability:write": "Run deliverability checks and manage blacklist and DMARC monitors. Email warmup and inbox placement tests are not available yet; warmup campaigns and SMTP credentials already set up can still be removed.",
              "compose:read": "Read AI composition history.",
              "compose:write": "Generate and improve email copy with AI. Spends credits.",
              "exports:read": "Read exports, export schedules and data-sharing settings. Downloading an export also needs the scope that reads the data in it. Data sharing is not available yet.",
              "exports:write": "Create and delete exports, manage export schedules and delivery destinations, and change export settings. Exported files contain customer addresses, so each kind of data also needs the scope that reads it: verification:read, account:read or security:read. Scheduled exports deliver by email, webhook or Amazon S3; Google Cloud Storage and Azure Blob Storage delivery is not available yet.",
              "webhooks:read": "Read webhook endpoints and their delivery logs.",
              "webhooks:write": "Create, change and delete webhook endpoints, and rotate their signing secrets.",
              "integrations:read": "Read connected integrations and their status.",
              "integrations:write": "Connect and disconnect integrations, and push verification into them. The HubSpot, Salesforce and Mailchimp connections are not available yet.",
              "analytics:read": "Read usage, analytics and tracking figures.",
              "analytics:write": "Create, change and permanently delete tracking pixels and links, and record usage-analytics events for this account. Deleting a pixel or link breaks the tracking already embedded in sent mail. Credit alert thresholds are fixed, so no scope changes them.",
              "account:read": "Read the account profile, credit balance and notifications.",
              "billing:read": "Read the subscription, invoices, payment methods and billing address.",
              "team:read": "Read the team, its members and its invitations.",
              "security:read": "Read security settings, sessions, login history and the audit log.",
              "white_label:read": "Read white-label configuration, sub-accounts and the custom API domain."
            }
          }
        }
      }
    },
    "parameters": {
      "CreateIdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Makes this create safe to retry (optional; since 2026-10-30). A repeat with the same key and the same body, within 24 hours of the first, creates nothing and answers `200` with what the first request created and `idempotent_replay: true`, even if that resource was changed or deleted since. A secret the create returned is never repeated: an API key replay has `key: null` and `key_withheld: true`, a webhook replay `secret: null` and `secret_withheld: true`; revoke and recreate the key, or rotate the webhook secret, if the first answer was lost. The same key with a different body is `409 IDEMPOTENCY_KEY_CONFLICT`, and a malformed key (it must be 1 to 255 printable ASCII characters with no spaces), or one joined by commas because the header was sent twice, is `400 INVALID_IDEMPOTENCY_KEY`; neither creates anything. Copies racing under one key create one resource. A key belongs to its route and account. Without the header every request creates a new resource, as before. Use a new UUID for each create and reuse it only to retry that create.",
        "schema": {
          "type": "string"
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Makes a charging call safe to retry: a repeat under the same key replays the original outcome instead of buying the work again. **The window depends on the route**: the receipt behind it expires, and after that the same key is a new paid request. It is 30 days for a deliverability check, at least 30 days for a single find, 24 hours for an activity lookup, and, for a bulk find, 15 minutes after the request completed (while it is still in flight, until it has been left alone for 60 minutes, after which what it did not deliver is refunded automatically). What a replay returns also differs: a batch replays its JOB, an activity lookup replays its RESULT. A different request under the same key is 409 IDEMPOTENCY_KEY_CONFLICT, before any charge.\n\n**How long a key stays safe differs per route, and for the verification routes it depends on the plan.** `POST /v1/verify`, `/v1/verify/batch` and `/v1/verify/file` keep their receipts for the job's data-retention period, never less than **30 days**, so longer on plans that keep results longer. The job itself is kept only for the plan's data-retention period, which is 7 days on Free: a repeat that arrives after the job's retention period has ended but while its receipt is still live is refused with `410 IDEMPOTENT_JOB_EXPIRED` and charged nothing, rather than bought a second time; send a new key to run it again. Once the receipt expires the same key claims a fresh target and creates another paid job. `POST /v1/deliverability/check` keeps its receipt 30 days. `POST /v1/find` keeps its receipt at least 30 days and its stored address only for the plan's retention period; a repeat after the address expires but before the receipt does return `410 IDEMPOTENT_JOB_EXPIRED` without charging. The activity lookups keep receipts about 24 hours. `POST /v1/find/bulk` keeps a completed request's summary 15 minutes, and an in-flight request until it has been left alone for 60 minutes, when what it did not deliver is refunded automatically. Without a key, `GET /v1/activity/{email}` and `GET /v1/activity/domain/{domain}` still answer an identical repeat from the same account free for 15 minutes after the lookup that was charged (`POST /v1/find/bulk` replays a completed request's summary, by its content, for 15 minutes after it finished); a key buys a fresh read inside that window. `POST /v1/activity/batch` without a key joins an identical batch only when it reads that batch still being looked up; one read after that batch has finished is charged again, even if it was sent while the first was running. An unkeyed `POST /v1/verify` that arrives while an identical one from the same account is still being verified (at most 15 minutes after its charge) joins it and is not charged; once that verification has its answer, a repeat is charged as usual. An unkeyed `POST /v1/verify/batch` from the same account with the identical batch within 15 minutes of the first one's charge is the same purchase: it answers with that job, running or finished, and charges nothing; after that, or once that batch was fully refunded, it is a new purchase. `POST /v1/verify/file` without a key is always a new purchase. `POST /v1/deliverability/check` without `refresh` answers a repeat free from the account's stored check of the same domain and `sending_ip` for 24 hours, but not while the first is still running. A keyless `POST /v1/find` is settled on the original charge only inside a fixed two-minute bucket. Only a key makes a later retry free.\n\nRetry with the key you have rather than minting a new one. A key is not a refund (it prevents a second charge, it does not undo the first), but it stays good far longer than the shortest advertised retention suggests, and dropping one early is how a retry becomes a second paid job.\n\n**The characters are checked after trimming.** Surrounding whitespace is trimmed from the header first; the resulting key must be 1-255 printable ASCII characters (`0x21`-`0x7e`) other than a comma, with no internal spaces or anything outside that range. Leading and trailing whitespace is accepted and is not part of the key. Because OpenAPI constraints apply to the raw header rather than the post-trim value, this schema deliberately has no `minLength`, `maxLength`, or `pattern`; those constraints would make generated clients reject values the API accepts. Invalid post-trim values get 400 before the route starts. A UUID is the obvious choice. Sending the header twice with different raw values is also a 400. A key may not contain a comma, because a header sent more than once reaches the API joined by commas; a comma is refused with the same 400, before anything is charged. A receipt claimed under a comma-bearing key before 2026-10-03 still replays for its window.",
        "schema": {
          "type": "string"
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "description": "Page size, 1 to 100. A malformed, fractional, zero, negative or larger value is a 400 rather than silently clamped. Every response echoes the page size it applied.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      },
      "JobId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The job identifier, a UUID.",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "WebhookId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "headers": {
      "RequestId": {
        "description": "The identifier for this request. Quote it to support.",
        "schema": {
          "type": "string"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying. `error.retry_after_seconds` in the body carries the same number.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitLimit": {
        "description": "Requests allowed in the window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Requests left in the window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitReset": {
        "description": "Unix time at which the window resets.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitWindow": {
        "description": "The length of the window, in seconds. `X-RateLimit-Reset` is when the current one ends.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitPolicy": {
        "description": "Which limit the other `X-RateLimit-*` headers describe, as `<limit>;w=<window seconds>;scope=<bucket>`, for example `60;w=60;scope=api_key`. Every request counts against two buckets, and the headers describe whichever has fewer requests left. `api_key`: this key's (or access token's) own limit. `user`: the account's limit, which all of its keys share, so an account that uses several keys at once can see it. `session` and `session_user`: the same pair for a request signed in to the dashboard, which has its own, higher ceiling. A white-label sub-account's dashboard requests count against its `user` bucket. Treat an unfamiliar scope as a limit like any other.",
        "schema": {
          "type": "string",
          "examples": [
            "60;w=60;scope=api_key"
          ]
        }
      }
    },
    "schemas": {
      "GatewayError": {
        "type": "object",
        "description": "An answer from the gateway in front of the API, with no error envelope and so no code to branch on: read the status. `{\"message\":\"Request Entity Too Large\"}` (413, a body over about 6 MB) and `{\"message\":\"Bad Request\"}` (400, a path with malformed percent-encoding) never reached Kawaa: nothing was run or charged. `{\"message\":\"Service Unavailable\"}` (503) is different: it is also what a request still running when its route's time limit at the gateway runs out gets (about 29 to 30 seconds on every route that charges credits, 15 on `GET /v1/account`, the `/v1/api-keys` routes, `GET /v1/jobs`, `GET /v1/jobs/{id}` and `POST /v1/jobs/{id}/cancel`, 5 on `/health`), and that request may have finished, and been charged, after the gateway gave up on it. Repeat a charging call after this 503 only with the same `Idempotency-Key`; without one, a repeat can be charged again.",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "examples": [
              "Service Unavailable",
              "Request Entity Too Large",
              "Bad Request"
            ]
          }
        }
      },
      "Envelope": {
        "type": "object",
        "description": "Every successful response is `{ \"success\": true, \"data\": \u2026 }`.",
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "ErrorEnvelope": {
        "type": "object",
        "description": "Every failure Kawaa answers is `{ \"success\": false, \"error\": { \u2026 } }`; the few the gateway in front of the API answers itself are not (see the description at the top of this document). Branch on `error.code`, not on the message. The retry fields are optional and are left out, never guessed, when the server does not know: `retryable` says whether repeating the identical request can succeed, `retry_after_seconds` how long to wait, and on a 5xx (or a refusal decided after the charge) from a route that charges credits one of `retry_requires_same_idempotency_key` or `retry_may_charge_again` says how to repeat it without paying twice.",
        "properties": {
          "success": {
            "const": false
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "$ref": "#/components/schemas/ErrorCode"
              },
              "message": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean",
                "description": "Whether the identical request, sent again after a wait with nothing else changed, can succeed. `true` for rate limiting and transient failures; `false` when the request, the credential, the plan, the balance or the resource has to change first. Absent when the answer depends on the case, notably `INTERNAL_ERROR` (an unexpected failure, transient or not) and `CONFLICT`. Decided per code; a few responses override their code, such as a `503` for a feature that is switched off (`false`) or a `400` for a download whose job is still running (`true`)."
              },
              "retry_after_seconds": {
                "type": "integer",
                "minimum": 1,
                "description": "Seconds to wait before retrying, when the server knows. The same number as the `Retry-After` header, which is sent with it."
              },
              "retry_requires_same_idempotency_key": {
                "const": true,
                "description": "Present on a 5xx from a route that charges credits and honours `Idempotency-Key`, for a request that sent one. Repeat it only with the same `Idempotency-Key`: an attempt under the key that was charged is replayed rather than bought again, for as long as the key's receipt lasts, and one that was not is simply run. An instruction, not a claim that this attempt was charged."
              },
              "nothing_charged": {
                "const": true,
                "description": "Present only when the server can confirm that this attempt left no charge standing: it failed before the debit, the debit did not commit, or the charge was refunded. It does not describe earlier attempts under the same request key. Continue to reuse the same Idempotency-Key when instructed. Absence does not establish whether a charge occurred."
              },
              "retry_may_charge_again": {
                "const": true,
                "description": "Present on a 5xx (or a refusal decided after the charge, such as an AI-provider 429 once a composition was paid for) from a route that charges credits, for a request with no `Idempotency-Key` to reuse (the route takes none, or the caller sent none), when the server cannot rule out that this attempt was charged. No key marks a repeat as the same request (some routes forgive an identical repeat for a short window, none promises to), so a retry may be charged a second time. Check `GET /v1/usage/credits/transactions`, which lists each debit with its timestamp and description, to see whether this attempt was charged; `GET /v1/usage` gives the balance but not the per-debit detail that answers the question."
              },
              "granted_scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Present on an `INSUFFICIENT_SCOPE` sent to an app connected over OAuth: the scopes its access token holds. To ask for the missing scope it signs in again requesting these together with the scopes the message names; some clients (Codex CLI's `--scopes`) replace their whole request with the list they are given."
              },
              "confirmation_url": {
                "type": "string",
                "format": "uri",
                "description": "Present on a `402` `PAYMENT_REQUIRED` from `POST /v1/billing/subscription/change` when the upgrade is held until its payment is made on the payment provider's hosted https page. That happens when the customer's bank asked for the payment to be confirmed (3D Secure): on the page the customer confirms it, or, when the held attempt was declined, pays it with another card. The `message` says which. Nothing is charged and the plan does not change until the payment goes through there; the webhook then applies the plan and grants its credits. Absent when the card was declined without a confirmation request, and when no page could be offered; the `message` then says that nothing was charged."
              },
              "confirmation_expires_at": {
                "type": "string",
                "format": "date-time",
                "description": "Present only with `confirmation_url`, when the provider gave an expiry: when that page stops working (ISO 8601, UTC), at most 23 hours after the request and earlier when the billing period ends sooner. The provider then drops the upgrade and voids its invoice. The `message` names the same time in words. A client that receives `confirmation_url` without it should treat the page as expiring within 23 hours."
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "success",
          "error"
        ]
      },
      "ErrorCode": {
        "type": "string",
        "description": "The machine-readable reason. NOT a closed set: handlers add codes, and a client that refuses an unfamiliar one rejects ordinary API errors instead of handling them. Branch on the codes you know and fall back to the HTTP status. `examples` lists every code this build's handlers can return in an error envelope, whether passed to `error(...)` or written into a response body as `{code, message}`, including some from routes this document does not describe, because a client can still meet them. `TEAM_DELETION_IN_PROGRESS` is the odd one: it arrives with `202`, on a deletion that is proceeding rather than failing.",
        "examples": [
          "ANALYTICS_COVERAGE_UNAVAILABLE",
          "API_KEY_REVOKED",
          "API_KEY_SUSPENDED",
          "AUTOCLEAN_RULES_NOT_APPLIED",
          "AUTOCLEAN_SOURCE_INCOMPLETE",
          "AUTOCLEAN_UNAVAILABLE",
          "BAD_REQUEST",
          "BATCH_SIZE_EXCEEDED",
          "CHANNEL_NOT_CONFIGURED",
          "CONFLICT",
          "CRM_CONNECTION_CHANGED",
          "CRM_RECOVERY_PENDING",
          "CRM_STATE_UNAVAILABLE",
          "CRM_UPDATE_UNCERTAIN",
          "CROSS_SITE_SESSION_REFUSED",
          "EMAIL_VERIFICATION_REQUIRED",
          "EXPORT_EXPIRED",
          "FORBIDDEN",
          "GATEWAY_TIMEOUT",
          "HUBSPOT_API_ERROR",
          "HUBSPOT_AUTH_FAILED",
          "HUBSPOT_CONNECTION_CHANGED",
          "HUBSPOT_FORBIDDEN",
          "HUBSPOT_INACTIVE",
          "HUBSPOT_NOT_CONNECTED",
          "HUBSPOT_NOT_INITIALIZED",
          "HUBSPOT_NO_TOKEN",
          "HUBSPOT_RATE_LIMIT_EXCEEDED",
          "HUBSPOT_REAUTH_REQUIRED",
          "HUBSPOT_STATE_UNAVAILABLE",
          "HUBSPOT_TOKEN_REFRESH_FAILED",
          "IDEMPOTENCY_KEY_CONFLICT",
          "IDEMPOTENT_JOB_EXPIRED",
          "INSUFFICIENT_CREDITS",
          "INSUFFICIENT_SCOPE",
          "INTEGRATION_NOT_CONFIGURED",
          "INTEGRATION_NOT_ENABLED",
          "INTERNAL_ERROR",
          "INVALID_CURSOR",
          "INVALID_IDEMPOTENCY_KEY",
          "INVALID_OFFSET",
          "INVALID_OPTION",
          "INVALID_WEBHOOK_SECRET",
          "MAILCHIMP_API_ERROR",
          "MAILCHIMP_CONNECTION_CHANGED",
          "MAILCHIMP_FORBIDDEN",
          "MAILCHIMP_INACTIVE",
          "MAILCHIMP_NOT_CONNECTED",
          "MAILCHIMP_NOT_INITIALIZED",
          "MAILCHIMP_RATE_LIMIT_EXCEEDED",
          "MAILCHIMP_REAUTH_REQUIRED",
          "MAILCHIMP_STATE_UNAVAILABLE",
          "MAILCHIMP_TOKEN_INVALID",
          "METHOD_NOT_ALLOWED",
          "NOT_FOUND",
          "NOT_IMPLEMENTED",
          "NO_VALID_FIELDS",
          "OAUTH_TOKEN_EXPIRED",
          "PASSWORD_SETUP_REQUIRED",
          "PAYLOAD_TOO_LARGE",
          "PAYMENT_REQUIRED",
          "PLAN_LIMIT_EXCEEDED",
          "PLAN_UPGRADE_REQUIRED",
          "QUOTA_ALERTS_NOT_CONFIGURABLE",
          "RATE_LIMITED",
          "REAUTHENTICATION_REQUIRED",
          "REGISTRATION_PASSWORD_MISMATCH",
          "RESET_TOKEN_INVALID",
          "RESULT_SUPERSEDED",
          "SALESFORCE_API_ERROR",
          "SALESFORCE_AUTH_FAILED",
          "SALESFORCE_CONNECTION_CHANGED",
          "SALESFORCE_FORBIDDEN",
          "SALESFORCE_INACTIVE",
          "SALESFORCE_INVALID_CAMPAIGN_ID",
          "SALESFORCE_NOT_CONNECTED",
          "SALESFORCE_NOT_INITIALIZED",
          "SALESFORCE_NO_REFRESH_TOKEN",
          "SALESFORCE_REAUTH_REQUIRED",
          "SALESFORCE_STATE_UNAVAILABLE",
          "SALESFORCE_TOKEN_REFRESH_FAILED",
          "SALESFORCE_UNAVAILABLE",
          "SECURITY_SETTINGS_NOT_CONFIGURABLE",
          "SERVICE_UNAVAILABLE",
          "SESSION_EXPIRED",
          "SESSION_NOT_EXCHANGEABLE",
          "SUBSCRIPTION_ACTIVE",
          "SUBSCRIPTION_CANCELLING",
          "SUBSCRIPTION_EXISTS",
          "SUB_ACCOUNT_MANAGED",
          "SUPPORT_CHAT_DECLINED",
          "TEAM_DELETION_IN_PROGRESS",
          "TWO_FACTOR_ACCOUNT_LOCKED",
          "TWO_FACTOR_CONTINUATION_EXPIRED",
          "TWO_FACTOR_CONTINUATION_UNAVAILABLE",
          "UNAUTHORIZED",
          "VERIFICATION_TOKEN_EXPIRED",
          "VERIFICATION_TOKEN_INVALID",
          "VERIFICATION_TOKEN_MALFORMED",
          "WEBHOOK_DNS_TEMPORARY_FAILURE",
          "WEBHOOK_URL_INVALID",
          "WHITE_LABEL_CUSTOM_DOMAIN_UNAVAILABLE",
          "IDEMPOTENT_EXPORT_EXPIRED",
          "PROFILE_EXPORT_UNAVAILABLE",
          "PROFILE_EXPORT_DOWNLOAD_UNAVAILABLE"
        ]
      },
      "VerificationStatus": {
        "type": "string",
        "description": "The verdict. `catch_all` means the domain accepts mail for every recipient, so this particular mailbox could not be checked: it is neither a yes nor a no. `unknown` means the check could not conclude.",
        "enum": [
          "valid",
          "invalid",
          "risky",
          "unknown",
          "catch_all",
          "disposable",
          "role",
          "spam_trap"
        ]
      },
      "SubStatus": {
        "type": "string",
        "description": "Why the verdict came out as it did. New values can be added without a version change; treat an unfamiliar one as informational. Deliberately NOT a closed enum: the list above is what this build emits, and a new reason ships without a version bump. A generated validator built from a closed set would reject an otherwise valid verification result the day one is added, which is the opposite of the forward compatibility this field promises.",
        "examples": [
          "mailbox_exists",
          "mailbox_reject",
          "catch_all",
          "provider_accept_all",
          "policy_block",
          "greylisted",
          "temporary_failure",
          "connection_failure",
          "dns_only",
          "no_mx",
          "domain_not_found",
          "syntax_error"
        ]
      },
      "VerifyOptions": {
        "type": "object",
        "description": "Only these option names are accepted. Anything else is a 400 naming the supported ones, rather than being ignored while the response reads as applied. Omit `options` to use the defaults. A present `null` is a wrong-type value and is refused with `400 INVALID_OPTION` before anything is verified or charged.",
        "properties": {
          "deep_verify": {
            "type": "boolean",
            "description": "Attempt an SMTP conversation with the receiving server."
          },
          "include_ai": {
            "type": "boolean",
            "description": "Run the AI-assisted checks (default `true`). Turning it off does more than remove AI analysis. The built-in rules alone then answer the typo and catch-all checks, so `ai` and `suggestion` still appear when they find something. The worker also skips the SPF, DKIM and DMARC lookup, which runs only with this option on: `domain_info` then carries `auth_score`, `auth_grade`, `has_spf`, `spf_policy`, `has_dmarc`, `dmarc_policy` and `has_dkim` only when a recent check of the same domain already measured them, so expect them to be absent."
          },
          "enrich": {
            "type": "boolean",
            "description": "Include name, gender and country hints where available. Needs the Business plan or higher: on a lower plan the whole request is refused with `403 PLAN_UPGRADE_REQUIRED` and nothing is charged."
          },
          "skip_cache": {
            "type": "boolean",
            "description": "Ignore a cached result and verify fresh. Charges the full rate."
          },
          "timeout_ms": {
            "type": "integer",
            "description": "How long `POST /v1/verify` waits (whole milliseconds) for a verdict before answering `status: \"pending\"`. **Normalized, not honoured verbatim**, and normalized rather than refused: the default is 24,000 ms, a positive value below 5,000 is raised to 5,000, and anything above 25,000 is capped at 25,000: asking for 60,000 gets `pending` after about 25 seconds. Zero and negative numbers fall back to the default. The cap can fall further on a request that has already spent time on auth and credits, because polling must finish inside the API's 29-second request time limit.\n\nNo `minimum` or `maximum` is declared here on purpose: they would make a generated client refuse locally what the API accepts and clamps. A present value that is not a whole number is the one case that IS refused, with `400 INVALID_OPTION`: nothing is verified and nothing is charged. That includes a fraction such as `7500.5`: the verification worker reads this field as an unsigned integer, and a fractional value used to be charged for and then dropped as an unreadable job.\n\nA pending answer is not a failure: poll `GET /v1/jobs/{job_id}`.",
            "default": 24000
          }
        },
        "additionalProperties": false
      },
      "VerifyRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "The address to verify. **Normalized before it is validated**, so this is deliberately not constrained with `format: email`: the API trims surrounding whitespace, lower-cases the address and punycodes an internationalized domain, and only then checks its syntax. So `\" User@Example.com \"` and `user@m\u00fcnchen.de` are both accepted and are charged like any other address, while a strict email-format validator would refuse the raw strings. The response echoes the NORMALIZED form, so compare against that, not against what you sent."
          },
          "options": {
            "$ref": "#/components/schemas/VerifyOptions"
          },
          "include_activity": {
            "type": "boolean",
            "description": "Attach your own account's engagement history for the address as `activity`. `domain_reputation` is reserved and not sent today, because Kawaa stores no domain reputation score. Adds NO charge of its own: the call debits once (1 credit fresh, 0.5 from cache) whether or not you ask for it."
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false
      },
      "VerifyBatchRequest": {
        "type": "object",
        "properties": {
          "emails": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Not constrained to a valid address on purpose: the endpoint removes malformed entries and reports how many in `invalid_emails_skipped`, which is a supported way to clean a list. Validating them away here would refuse requests the API accepts."
            },
            "minItems": 1,
            "maxItems": 10000,
            "description": "The addresses to verify. `maxItems` here is the ABSOLUTE ceiling (Enterprise); the limit that applies is your account's (Free 100, or 1,000 once a Free account has bought any credit pack; Starter 1,000, Professional and Business 5,000, Enterprise 10,000), and a longer list is **413** `BATCH_SIZE_EXCEEDED` before anything is charged: a capacity refusal, not malformed input, so an integration can branch on the status and split or upgrade rather than treating it as a bad request. `GET /v1/account` reports the limit that applies as `account.batch_size`. At least one entry must be a usable address; a list with none is a 400."
          },
          "webhook_url": {
            "type": "string",
            "description": "Where to POST the completion callback. HTTPS only: anything else is refused with 400 WEBHOOK_URL_INVALID. Without a `webhook_secret` the callback is unsigned. Omit the field for no callback; an explicit `null` is a wrong-type value and is refused before the job is created or charged. No scheme `pattern` is declared: the URL is parsed first, which tolerates surrounding whitespace and normalizes the protocol, so `\" https://x\"` and `\"HTTPS://x\"` are both accepted, and an anchored lower-case pattern refused both. It must still be HTTPS; that is checked on the parsed protocol, not on the string you sent."
          },
          "options": {
            "$ref": "#/components/schemas/AsyncVerifyOptions"
          },
          "include_activity": {
            "type": "boolean"
          },
          "webhook_secret": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Signs the callback to `webhook_url`. Stored with the job, and every delivery then carries `X-Kawaa-Signature-V2` (an HMAC of the send time and the body, which lets you refuse a replay) and the legacy `X-Kawaa-Signature` computed from it. The flat callback body has no timestamp of its own, so check the `t` in `X-Kawaa-Signature-V2`. Without it the callback is UNSIGNED and anything that can reach your URL can post a convincing completion. Only meaningful alongside `webhook_url`. It has no meaning on its own: a secret with no `webhook_url` is 400 `INVALID_WEBHOOK_SECRET`, because there is no callback to sign. `dependentRequired` says so above. Omit the field for unsigned callbacks; an explicit `null` is refused with `400 INVALID_WEBHOOK_SECRET` before the job is created or charged."
          }
        },
        "required": [
          "emails"
        ],
        "additionalProperties": false,
        "dependentRequired": {
          "webhook_secret": [
            "webhook_url"
          ]
        }
      },
      "FileUploadUrlRequest": {
        "type": "object",
        "properties": {
          "action": {
            "const": "get_upload_url"
          },
          "filename": {
            "type": "string",
            "description": "The name to store the upload under. **Measured after trimming**: the value is trimmed before its length and extension are checked, so `\" report.csv \"` is accepted and stored as `report.csv`. No `pattern` or `maxLength` is declared here for that reason: an end-anchored pattern and a raw length check both refuse values this route accepts. The trimmed name must be 1-255 characters and end in `.csv`, `.tsv` or `.txt`; `.csv` on its own is an accepted name."
          },
          "file_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 52428800,
            "description": "The size of the file in bytes, as it will be uploaded. The upload URL is signed for exactly this many bytes, so S3 refuses a body of any other length (`403 SignatureDoesNotMatch`); ask for a new URL if the file changes. Required: a missing, `null`, fractional or non-positive value is `400`, and a file over 50 MB (52,428,800 bytes) is `413 BATCH_SIZE_EXCEEDED` before any upload."
          }
        },
        "required": [
          "action",
          "filename",
          "file_size"
        ],
        "additionalProperties": false
      },
      "FileProcessRequest": {
        "type": "object",
        "properties": {
          "action": {
            "const": "process"
          },
          "file_key": {
            "type": "string",
            "description": "The key returned by `get_upload_url`. The TRIMMED value must be 1-1,024 characters and must sit under your own upload prefix. **Measured after trimming.** the value is trimmed before its length is checked, so no length bound is declared on the raw string here: a raw `maxLength` refuses a valid value padded with spaces, and a raw `minLength` accepts a whitespace-only one the route then rejects with 400."
          },
          "webhook_url": {
            "type": "string",
            "description": "Where to POST the completion callback. The TRIMMED value must be at most 2,048 characters and must use HTTPS. **Measured after trimming.** the value is trimmed before its length is checked, so no length bound is declared on the raw string here: a raw `maxLength` refuses a valid value padded with spaces, and a raw `minLength` accepts a whitespace-only one the route then rejects with 400. HTTPS only: anything else is refused with 400 WEBHOOK_URL_INVALID. Omit the field for no callback; an explicit `null` is refused with 400 before the file is read or credits are charged.\n\nWithout a `webhook_secret` the callback is unsigned. No `format: uri` or anchored scheme `pattern` is declared on this REQUEST field: the URL is parsed first, which tolerates surrounding whitespace and normalizes the protocol, so `\" https://x\"` and `\"HTTPS://x\"` are both accepted while either constraint refuses them. HTTPS is required, checked on the PARSED protocol, not on the string you sent. The response fields keep `format: uri`, because what the server hands back really is a well-formed URI."
          },
          "webhook_secret": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Signs the callback to `webhook_url`, as on `POST /v1/verify/batch`. Stored with the job, and every delivery then carries `X-Kawaa-Signature-V2` (an HMAC of the send time and the body, which lets you refuse a replay) and the legacy `X-Kawaa-Signature` computed from it. Without it the callback is UNSIGNED and anything that can reach your URL can post a convincing completion. A secret with no `webhook_url` is 400 `INVALID_WEBHOOK_SECRET`, because there is no callback to sign; `dependentRequired` says so above. Omit the field for unsigned callbacks; an explicit `null` is refused with `400 INVALID_WEBHOOK_SECRET` before the file is read or credits are charged. Part of the request an `Idempotency-Key` identifies: the same key with a different secret is `409 IDEMPOTENCY_KEY_CONFLICT`."
          },
          "options": {
            "$ref": "#/components/schemas/AsyncVerifyOptions"
          },
          "include_activity": {
            "type": "boolean"
          }
        },
        "required": [
          "action",
          "file_key"
        ],
        "additionalProperties": false,
        "dependentRequired": {
          "webhook_secret": [
            "webhook_url"
          ]
        }
      },
      "FindRequest": {
        "type": "object",
        "properties": {
          "first_name": {
            "type": "string",
            "maxLength": 64,
            "description": "Must contain at least one letter AFTER normalization, which spells the name in a-z: accents are dropped and letters such as `\u00f8`, `\u00e6`, `\u00df`, `\u0142` and `\u00fe` are written `o`, `ae`, `ss`, `l` and `th`; then only `a-z` is kept. `Jos\u00e9`, `\u00d1u\u00f1ez` and `S\u00f8ren` are fine, `\u674e`, `2024` and `!!` are not. A name that normalizes to nothing generates no candidate addresses, so the API answers `400 first_name and last_name must contain letters (a-z)` and charges nothing. A name with a letter that has no single a-z spelling (such as `\u0259` or `\u0292`) next to letters that do is also a 400 that charges nothing, and so is one that spells to more than 64 letters. Deliberately not a `pattern` here: the check runs on the normalized form, and a regex over the raw string would refuse names this API accepts."
          },
          "last_name": {
            "type": "string",
            "maxLength": 64,
            "description": "Must contain at least one letter AFTER normalization, which spells the name in a-z: accents are dropped and letters such as `\u00f8`, `\u00e6`, `\u00df`, `\u0142` and `\u00fe` are written `o`, `ae`, `ss`, `l` and `th`; then only `a-z` is kept. `Jos\u00e9`, `\u00d1u\u00f1ez` and `S\u00f8ren` are fine, `\u674e`, `2024` and `!!` are not. A name that normalizes to nothing generates no candidate addresses, so the API answers `400 first_name and last_name must contain letters (a-z)` and charges nothing. A name with a letter that has no single a-z spelling (such as `\u0259` or `\u0292`) next to letters that do is also a 400 that charges nothing, and so is one that spells to more than 64 letters. Deliberately not a `pattern` here: the check runs on the normalized form, and a regex over the raw string would refuse names this API accepts."
          },
          "domain": {
            "type": "string",
            "description": "The company's mail domain, as a bare name. A special-use name (`.example`, `.test`, `.invalid`, `.localhost`, `.local`, `.onion`, `.alt`, `.internal`, `.corp`, `.home`, `.mail`, `home.arpa` and the other special-use `.arpa` names) and RFC 2606's `example.com` / `.net` / `.org` with any name under them are a 400 before the charge: no mailbox can exist there. So are a domain that cannot receive mail (no such domain, a null MX, or neither an MX nor an address record) and a public mailbox provider such as gmail.com."
          }
        },
        "required": [
          "first_name",
          "last_name",
          "domain"
        ],
        "additionalProperties": false
      },
      "FindBulkRequest": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "description": "The company's mail domain, as a bare name. A special-use name (`.example`, `.test`, `.invalid`, `.localhost`, `.local`, `.onion`, `.alt`, `.internal`, `.corp`, `.home`, `.mail`, `home.arpa` and the other special-use `.arpa` names) and RFC 2606's `example.com` / `.net` / `.org` with any name under them are a 400 before the charge: no mailbox can exist there."
          },
          "people": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "properties": {
                "first_name": {
                  "type": "string",
                  "maxLength": 64
                },
                "last_name": {
                  "type": "string",
                  "maxLength": 64
                }
              },
              "required": [
                "first_name",
                "last_name"
              ],
              "additionalProperties": false
            },
            "maxItems": 50,
            "description": "Up to 50 people per request; more is a 400 before any lookup or charge."
          }
        },
        "required": [
          "domain",
          "people"
        ],
        "additionalProperties": false
      },
      "VerificationResult": {
        "type": "object",
        "description": "A completed verification.",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "batch_job_id": {
            "type": "string",
            "format": "uuid",
            "description": "The batch or file job this result belongs to, when it belongs to one: on a batch row of `GET /v1/jobs/{id}` it is the same id as `job_id`. Omitted from a single verification (`POST /v1/verify`, and its job read back through `GET /v1/jobs/{id}`), which belongs to no batch."
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "status": {
            "$ref": "#/components/schemas/VerificationStatus"
          },
          "sub_status": {
            "$ref": "#/components/schemas/SubStatus"
          },
          "quality_score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "verification": {
            "type": "object",
            "properties": {
              "syntax_valid": {
                "type": "boolean"
              },
              "domain_exists": {
                "type": "boolean",
                "description": "`true` when DNS shows the domain exists. `false` is not always a DNS answer: it is also the value when DNS was not read (a syntax error) or did not answer (`sub_status: \"temporary_failure\"`). Only `status: \"invalid\"` with `sub_status: \"domain_not_found\"` says DNS found no such domain."
              },
              "mx_found": {
                "type": "boolean",
                "description": "`true` when the domain publishes MX records. `false` when it publishes none, when it publishes a null MX (`MX 0 .`, RFC 7505) and takes no mail, or when DNS was not read or did not answer (a syntax error, `sub_status: \"temporary_failure\"`). A domain with no MX record at all can still take mail at its address record, so read `false` with `status`: when the mail server was checked (`smtp_check` present), `status` says what it answered."
              },
              "mx_records": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "smtp_check": {
                "type": "boolean"
              },
              "catch_all": {
                "type": "boolean",
                "description": "The domain accepts mail for any address, so an accepted mailbox proves nothing on its own. Omitted when the catch-all probe did not measure it: the check ended before any probe (a disposable or spam-trap verdict, a domain with no usable mail server), the mail server refused or never answered for the mailbox so the probe never ran, or the probe could not settle it (that result is `risky`). Also `true` beside `provider_accept_all`, where the mail provider accepts addresses it does not have. Absent is not `false`."
              },
              "greylisted": {
                "type": "boolean"
              },
              "smtp_code": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "smtp_message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mailbox_exists": {
                "type": "boolean",
                "description": "`true` when the mail server accepted the mailbox at RCPT TO, on a domain that does not accept every address. `false` when the server answered RCPT TO without accepting it: read it as \"not confirmed\", not \"confirmed absent\". It is usually a refusal of the mailbox (`status: \"invalid\"`), but it is also `false` when the answer was temporary (`status: \"unknown\"`, `sub_status` `greylisted` or `temporary_failure`) or the server refused the sender rather than the mailbox (`sub_status: \"policy_block\"`), so read it with `status` and `sub_status`. Omitted when no server answered RCPT TO (no probe ran, the connection failed, or the conversation was refused before RCPT, for example at the greeting), when an acceptance proves nothing (`catch_all`, `provider_accept_all` or a `risky` result), and when the server said the mailbox is full. Absent is not `false`."
              },
              "provider_accept_all": {
                "type": "boolean",
                "description": "The PROVIDER accepts recipient probes too broadly for an individual mailbox to be confirmed. Not the same as `catch_all`, which is the domain's own configuration. Present when the worker could tell. SMTP acceptance here is not evidence the mailbox exists, and a client that treats it as such publishes a deliverability claim nothing measured."
              }
            },
            "required": [
              "syntax_valid",
              "domain_exists",
              "mx_found",
              "greylisted"
            ]
          },
          "flags": {
            "type": "object",
            "description": "Independent of the verdict: an address can be valid and also role_account.",
            "properties": {
              "disposable": {
                "type": "boolean"
              },
              "role_account": {
                "type": "boolean"
              },
              "free_provider": {
                "type": "boolean"
              },
              "spam_trap": {
                "type": "boolean"
              },
              "abuse_email": {
                "type": "boolean",
                "description": "The local part matched an abuse, complaint-handling, feedback-loop, legal or blocklist-removal name or pattern, at any domain, such as abuse@, postmaster@, feedback@, legal@, spam-alerts@ or abuse1@. Every address with complainer set has it too. With AI analysis on, the model can also raise it for a local part containing abuse, spam or complaint, at a domain that can receive mail. A match on the address itself, not a finding about what the mailbox is used for or anything its owner has done."
              },
              "honeypot": {
                "type": "boolean"
              },
              "complainer": {
                "type": "boolean",
                "description": "A narrower abuse_email: the address is a complaint-handling mailbox, such as abuse@, postmaster@, fbl@ or feedback@, at a reviewed anti-spam, feedback-loop, sender-reputation or consumer-protection organization, such as spamhaus.org, spamcop.net or ftc.gov. The same local part at any other domain, and any other mailbox at those organizations, does not raise it. A match on the address itself, not complaint history: verification does not derive it from any record of who has marked mail as spam."
              },
              "bot_generated": {
                "type": "boolean"
              }
            },
            "required": [
              "disposable",
              "role_account",
              "free_provider",
              "spam_trap",
              "abuse_email",
              "honeypot",
              "complainer",
              "bot_generated"
            ]
          },
          "domain_info": {
            "type": "object",
            "description": "The domain's provider type and email-authentication posture. The SPF, DKIM and DMARC fields (`auth_score`, `auth_grade`, `has_spf`, `spf_policy`, `has_dmarc`, `dmarc_policy`, `has_dkim`) are each omitted when their lookup failed or did not run. The lookup runs only when `options.include_ai` is on (the default); with it off, they are present only when a recent check of the same domain already measured them.",
            "properties": {
              "domain": {
                "type": "string"
              },
              "provider_type": {
                "type": "string"
              },
              "auth_score": {
                "type": "integer"
              },
              "auth_grade": {
                "type": "string"
              },
              "has_spf": {
                "type": "boolean"
              },
              "spf_policy": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "has_dmarc": {
                "type": "boolean"
              },
              "dmarc_policy": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "has_dkim": {
                "type": "boolean"
              }
            }
          },
          "ai": {
            "type": "object",
            "properties": {
              "typo_suggestion": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A corrected address when one looks likely; omitted when there is none. The same value as the top-level `suggestion`. This is the field name the API uses; there is no `suggested_email`."
              },
              "typo_confidence": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "How confident the correction is, when one was made."
              },
              "typo_method": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "How the suggestion was arrived at, as the detector names it. Present whenever `typo_suggestion` is. Treat it as an open set: it is the detector's own label, and a new detector adds a new one.",
                "examples": [
                  "DirectMapping",
                  "KeyboardProximity",
                  "Phonetic",
                  "EditDistance",
                  "AiAnalysis"
                ]
              },
              "catch_all_confidence": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 100,
                "description": "0-100, and only for a domain that accepts everything: how likely this particular mailbox is real despite the catch-all. It is the one piece of evidence that separates two `catch_all` addresses, and it is absent on every other result."
              }
            },
            "description": "Present when the worker has something to report: it is built when there is a typo suggestion or a catch-all confidence, and omitted otherwise. That holds whether or not `include_ai` is set: without it the built-in rules produce both; with it, AI analysis is tried first and the rules are the fallback. The four fields below are every field it can carry: it never includes a `fraud_score` or `patterns` field."
          },
          "suggestion": {
            "type": "string",
            "description": "The corrected address when the domain looks like a misspelling of a well-known one, such as `jane@gmail.com` for `jane@gmial.com`. The same value as `ai.typo_suggestion`, and present exactly when that is. It is advice only: `status` and every check describe the address that was sent, not the correction.\n\nThe typo check runs whether or not `include_ai` is set; with it, AI analysis can also catch misspellings the built-in list does not. Omitted (never `null`) when there is no correction.",
            "examples": [
              "jane@gmail.com"
            ]
          },
          "credits_used": {
            "type": "number"
          },
          "credits_remaining": {
            "type": "number"
          },
          "processing_time_ms": {
            "type": "integer"
          },
          "verified_at": {
            "type": "string",
            "format": "date-time"
          },
          "from_cache": {
            "type": "boolean"
          },
          "request_id": {
            "type": "string"
          },
          "idempotent_replay": {
            "type": "boolean",
            "description": "`POST /v1/verify` only. True when this request, sent without an `Idempotency-Key`, joined an identical request whose verification was still in flight and was answered from it: `credits_used` is `0` and nothing was charged. Absent when this request paid for the verdict."
          },
          "activity": {
            "$ref": "#/components/schemas/ActivityData",
            "description": "Engagement history, attached only when the request asked for it with `include_activity`. Read from your own account's tracking only, never another account's. When your tracking has recorded nothing for the address it is still an object, with `level: \"unknown\"`, `score: 0`, `last_activity_at: null`, zero counts and `data_points: 0`; that is not a signal about the mailbox. Absent when the request did not ask for it, and when the activity could not be read."
          },
          "domain_reputation": {
            "type": [
              "object",
              "null"
            ],
            "description": "Reserved for a stored numeric domain reputation score when `include_activity` is true. Kawaa does not compute one today, so current responses omit this field."
          },
          "enrichment": {
            "type": [
              "object",
              "null"
            ],
            "description": "Attached when the request set `options.enrich` and the plan includes data enrichment. Null when nothing is known, which is not a judgement about the address.",
            "properties": {
              "first_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "full_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "gender": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country_code": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "cache_age_seconds": {
            "type": "integer",
            "description": "How old the cached result is, in seconds. Present on every cache hit, beside `from_cache: true`. Without it a result reused from days ago reads exactly like one measured this second."
          },
          "classifier_version": {
            "type": "integer",
            "description": "Which verdict classifier produced this result. Stamped by the worker onto every newly produced result. When the classifier changes a cached result from an older version is never reused (the address is verified afresh), so two results with different values here were not decided by the same rules."
          }
        },
        "required": [
          "email",
          "status",
          "quality_score",
          "verification",
          "flags"
        ]
      },
      "PendingVerification": {
        "type": "object",
        "description": "No verdict yet. Not a result: poll the job.",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "status": {
            "const": "pending"
          },
          "message": {
            "type": "string"
          },
          "credits_held": {
            "type": "number",
            "description": "Held, not spent. Refunded by reconciliation if the worker never produces a result. Absent on a request that joined an identical one still in flight (`idempotent_replay: true`): that request holds nothing."
          },
          "activity": {
            "$ref": "#/components/schemas/ActivityData",
            "description": "Engagement history, attached only when the request asked for it with `include_activity`. Read from your own account's tracking only, never another account's. When your tracking has recorded nothing for the address it is still an object, with `level: \"unknown\"`, `score: 0`, `last_activity_at: null`, zero counts and `data_points: 0`; that is not a signal about the mailbox. Absent when the request did not ask for it, and when the activity could not be read."
          },
          "domain_reputation": {
            "type": [
              "object",
              "null"
            ],
            "description": "Reserved for a stored numeric domain reputation score when `include_activity` is true. Kawaa does not compute one today, so current responses omit this field."
          },
          "credits_used": {
            "type": "number",
            "description": "What this call charged. Present on a pending result too: the debit happens before the verdict does. `0` on a request that joined an identical one still in flight (`idempotent_replay: true`)."
          },
          "credits_remaining": {
            "type": "number",
            "description": "The balance after that charge."
          },
          "idempotent_replay": {
            "type": "boolean",
            "description": "True when this repeated an earlier `POST /v1/verify` under the same `Idempotency-Key`, or, without a key, joined an identical request whose verification was still in flight: the job is the ORIGINAL one and nothing more was charged. **Absent means this request created the job**: the field is added only on a replay. `credits_used: 0` accompanies it, which on its own is ambiguous because a pending answer can also report held rather than spent credits; this is the field that says which. Poll `GET /v1/jobs/{job_id}` either way."
          },
          "request_id": {
            "type": "string",
            "description": "Identifier of this API request. Quote it when contacting support."
          }
        },
        "required": [
          "job_id",
          "status"
        ]
      },
      "BatchAccepted": {
        "type": "object",
        "description": "What `POST /v1/verify/batch` answers with on acceptance. `unique_emails` is what the job will verify; `credits_used` is what was charged, and the two can differ when queueing some addresses could not be confirmed; see the fields themselves.",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/Job/properties/status"
          },
          "total_submitted": {
            "type": "integer",
            "description": "Addresses in the request."
          },
          "unique_emails": {
            "type": "integer",
            "description": "Addresses CONFIRMED queued: what the job will actually verify. It is not always what was charged: when queueing some addresses cannot be confirmed, the API counts what it could confirm and reports the rest in `enqueue_unknown`, so this can be lower than `credits_used` and, in the extreme, 0 on a job that charged. Reconcile billing against `credits_used` and `credits_held`, never against this count."
          },
          "duplicates_removed": {
            "type": "integer",
            "description": "Removed before charging: the same address twice costs once."
          },
          "invalid_emails_skipped": {
            "type": "integer",
            "description": "Rejected as malformed and never verified. The results will be shorter than the list you sent."
          },
          "credits_used": {
            "type": "number",
            "description": "0 on an idempotent replay: what this request charged, not what the batch cost. The batch's cost is its job's `credits_used` less `credits_refunded`, from `GET /v1/jobs/{id}`."
          },
          "credits_remaining": {
            "type": "number",
            "description": "Absent when the post-charge balance could not be safely recovered."
          },
          "idempotent_replay": {
            "type": "boolean",
            "description": "True when this returned an earlier submission's job and charged nothing."
          },
          "dispatch_in_progress": {
            "type": "boolean",
            "description": "A request under this same `Idempotency-Key` is still queueing the batch. Nothing more was charged. Retry after `Retry-After`, or poll the job."
          },
          "enqueue_unknown": {
            "type": "integer",
            "description": "How many sends could not be confirmed. Credits for them are HELD, not spent. Poll the job until it reconciles."
          },
          "credits_held": {
            "type": "number",
            "description": "Held pending reconciliation of an ambiguous enqueue. Not a settled charge."
          },
          "include_activity": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "estimated_time_seconds": {
            "type": "integer",
            "description": "A rough estimate of how long the job will take, at about two seconds per address. An estimate for a progress bar, not a deadline. Poll `GET /v1/jobs/{job_id}` for the truth."
          },
          "enqueue_failures": {
            "type": "integer",
            "description": "How many addresses the queue DEFINITIVELY rejected, present only when some were. Distinct from `enqueue_unknown`, which is \"we do not know\". Their credits are refunded where the refund succeeds; where it does not they stay held and `message` says so, so this number beside an unchanged `credits_used` is the case to reconcile rather than to retry."
          }
        },
        "required": [
          "job_id",
          "status",
          "total_submitted",
          "unique_emails",
          "credits_used"
        ]
      },
      "JobSummary": {
        "type": "object",
        "description": "Four buckets, and they are BUCKETS rather than verdicts. The whole rule: `valid` is exactly `valid`; `invalid` is `invalid` AND `disposable`; `risky` is `risky`, `catch_all`, `role` and `spam_trap`; `unknown` is `unknown` and any row with no stored status. A per-address verdict is in the result row, not here, and `catch_all` inside `risky` is the one worth remembering, because it is inconclusive rather than bad.",
        "properties": {
          "valid": {
            "type": "integer",
            "description": "Exactly `valid`."
          },
          "invalid": {
            "type": "integer",
            "description": "Rows whose verdict is `invalid` OR `disposable`. Building a suppression list from this bucket therefore removes disposable addresses too, which is usually intended."
          },
          "risky": {
            "type": "integer",
            "description": "Rows whose verdict is `risky`, `catch_all`, `role` or `spam_trap`. Mixed: `catch_all` is inconclusive, not bad."
          },
          "unknown": {
            "type": "integer",
            "description": "Rows whose verdict is `unknown`, plus any row with no stored status at all."
          }
        }
      },
      "Job": {
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "job_type": {
            "type": "string",
            "description": "On a `GET /v1/jobs` row and an `account.recent_jobs` entry: `single_verification` for a job created by `POST /v1/verify`. Batch and uploaded-file jobs usually have none, and an older one can carry another label, so read any other value, or none, as a batch. Not returned by `GET /v1/jobs/{id}`."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed",
              "cancelled",
              "enqueue_unknown"
            ],
            "description": "The job's state. `enqueue_unknown` means some sends could not be confirmed and credits are held pending reconciliation. Poll until it resolves.\n\n**`cancelled` is what `POST /v1/jobs/{id}/cancel` produces.** Stopping a batch leaves the addresses already checked in place, billed, and readable; the credits held for the rest are refunded. Because the refund waits for in-flight addresses to finish, a job can read `cancelled` with `billing_status: \"charged\"` for a few minutes before it reads `refunded`. That is the refund draining, not a failure, and nothing is required of you.\n\n**Cancelled or not, handle it as terminal, and do so immediately.** A cancelled job's verdicts are final the moment the status says so: every result is written together with the job's progress counter in one conditional write requiring the job to still be running, so the cancel closes the result set as it lands. What is NOT final yet is the bill: the refund for the addresses it never checked waits for the in-flight ones to time out. That is what `completed_at` marks, and the Node.js and Python SDKs expose it as `isSettled` / `is_settled`. Read it if you are reconciling the charge; do not make your results wait on it. What must not happen is treating `cancelled` as still-running and polling for ever.\n\nTerminal does NOT mean empty: such a job can carry a **partial** result set, and `GET /v1/jobs/{id}?include_results=true` returns it: the API gates on `processed_emails > 0`, not on status, so the addresses it did check come back. Read `processed_emails` against `total_emails` to see how far it got, and do not discard those results. `GET /v1/jobs/{id}/download` exports exactly those addresses too. Read progress as `processed_emails` of `requested_emails`: a job that stopped early has `total_emails` collapsed onto what it actually checked and billed.\n\n**A cancel is a brake, not a substitute for sizing the batch.** The submission-time limits still apply and still refuse first: the plan's per-batch ceiling (`413 BATCH_SIZE_EXCEEDED`), the 10,000 global cap, and the credit balance (`402`). Cancelling after the fact returns the unprocessed credits, never the ones already spent."
          },
          "total_emails": {
            "type": "integer"
          },
          "cache_discount_pending": {
            "type": "boolean",
            "description": "Present, and only ever `true`, when this read tried to apply the per-address cache discount and could not, almost always because the results index had not caught up, so the cached count could not be trusted yet. The next read retries it. It exists because nothing else on the job tells \"checked, nothing owed\" apart from \"could not check\": both leave a `completed` or `cancelled` job's credits unchanged. If you are reconciling the charge, you have one more read to do while this is true."
          },
          "requested_emails": {
            "type": "integer",
            "description": "The list size you submitted. Present only when some of it will never have a result: a job that was cancelled or stopped early, or one where some addresses could not be queued when you submitted it or never came back from the queue. `total_emails` is then lowered to the addresses actually checked and billed, and the rest are refunded. That is how the platform records that the job owes nothing more for them. Read progress as `processed_emails` of this. The same figure as `requested_emails` on the `job.completed` webhook."
          },
          "partial": {
            "type": "boolean",
            "description": "Present, and only ever `true`, exactly when `requested_emails` is: `requested_emails` minus `total_emails` addresses have no result and never will, and their credits were refunded. A `completed` job can carry it. The same signal as `partial` on the `job.completed` webhook, so polling this endpoint after a missed delivery tells you what the delivery would have. Absent while `total_emails` still counts every address you submitted: a cancelled job gains it when the refund for the addresses it never checked is applied, which `completed_at` marks."
          },
          "file_counts": {
            "type": "object",
            "description": "What the uploaded file held, as `POST /v1/verify/file` counted it when it created the job: the same four figures its acceptance response reported, under the same names. Present on the single job, as `GET /v1/jobs/{id}` and `POST /v1/jobs/{id}/cancel` return it, when the job was created from a file; never on the listing, and absent on a job submitted as a list and on a file job recorded before these counts were stored. `total_emails` is only the addresses verified, so this is the one place the rows that were skipped or merged are still accounted for. `total_submitted` = `unique_emails` + `duplicates_removed` + `invalid_emails_skipped`.",
            "properties": {
              "total_submitted": {
                "type": "integer",
                "description": "Rows read from the file, including the invalid ones. A header row is not counted."
              },
              "invalid_emails_skipped": {
                "type": "integer",
                "description": "Rows that were not addresses. Skipped, not charged for, and not in the job."
              },
              "duplicates_removed": {
                "type": "integer",
                "description": "Repeats of an earlier address (compared case-insensitively). Removed before charging."
              },
              "unique_emails": {
                "type": "integer",
                "description": "Distinct addresses the file yielded: what the job was created to verify."
              }
            },
            "required": [
              "total_submitted",
              "invalid_emails_skipped",
              "duplicates_removed",
              "unique_emails"
            ]
          },
          "processed_emails": {
            "type": "integer"
          },
          "progress_percent": {
            "type": "integer"
          },
          "summary": {
            "$ref": "#/components/schemas/JobSummary"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VerificationResult"
            }
          },
          "next_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor for the next page of results."
          },
          "has_more": {
            "type": "boolean"
          },
          "credits_used": {
            "type": "number"
          },
          "credits_refunded": {
            "type": "number"
          },
          "billing_status": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the job's books closed for the CANCELLATION refund. Null while the job is running and (on a `cancelled` one) until the refund for the unprocessed addresses commits, or the platform settles a job that owed nothing. It says nothing about the results, which are final as soon as the status is terminal. It is not the whole bill either: an ordinary `completed` batch has this set and can still owe its per-address cache discount, and so can a `cancelled` one (its discount on the addresses it did check is applied right after this refund), which `cache_discount_pending` reports. Reconciling a charge means reading both."
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When `POST /v1/jobs/{id}/cancel` stopped the job. Absent on every other job."
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why a terminal job ended as it did, in Kawaa's own customer-safe words, present on failures and on reconciliation outcomes. Without it, `status: \"failed\"` is the whole story a client can tell."
          }
        },
        "required": [
          "job_id",
          "status"
        ]
      },
      "JobPage": {
        "type": "object",
        "properties": {
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobListItem"
            },
            "description": "Each row is a `Job` plus `filename`, which is how a file upload is told from a submitted list. The per-job endpoint does not carry it."
          },
          "limit": {
            "type": "integer",
            "description": "The page size that was applied."
          },
          "total": {
            "type": "integer",
            "description": "Every job matching the listing, not just this page."
          },
          "total_is_approximate": {
            "type": "boolean",
            "description": "True when the count stopped at its scan bound, so `total` is a floor."
          },
          "has_more": {
            "type": "boolean",
            "description": "True while more jobs may match the listing. It can be true beside a short or empty `jobs` page, so page until it is false rather than stopping at a page with fewer than `limit` jobs."
          },
          "next_offset": {
            "type": [
              "string",
              "null"
            ],
            "description": "Send it back as `offset` to read the next page. Null exactly when `has_more` is false."
          }
        },
        "required": [
          "jobs",
          "has_more"
        ]
      },
      "ActivityData": {
        "type": "object",
        "properties": {
          "level": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "dormant",
              "unknown"
            ],
            "description": "How recently this address was seen active. `inactive` sits between the active and dormant windows; `unknown` means there was nothing to judge from, not that the address is inactive."
          },
          "score": {
            "type": "number"
          },
          "last_activity_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "engagement": {
            "type": "object",
            "properties": {
              "open_count": {
                "type": "integer"
              },
              "click_count": {
                "type": "integer"
              },
              "reply_count": {
                "type": "integer",
                "description": "Counts replies recorded by Kawaa email warmup campaigns only. It is not a measurement of replies to your own mail, which Kawaa cannot see. Warmup is switched off, so no new replies are recorded, and new opens and clicks come only from your own tracking pixels and links."
              }
            },
            "required": [
              "open_count",
              "click_count",
              "reply_count"
            ]
          },
          "deliverability": {
            "type": "object",
            "properties": {
              "bounce_count": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "complaint_count": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "bounce_count",
              "complaint_count"
            ]
          },
          "confidence": {
            "type": "number",
            "description": "0 means your account has recorded no activity for this address, not that it is inactive."
          },
          "data_points": {
            "type": "integer"
          },
          "message": {
            "type": "string",
            "description": "Present only when no activity data is available for a single-address lookup."
          }
        },
        "required": [
          "level",
          "score",
          "last_activity_at",
          "engagement",
          "deliverability",
          "confidence",
          "data_points"
        ]
      },
      "EmailActivity": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "The validated address, echoed unchanged from the path. Malformed or whitespace-padded values are refused before the paid lookup begins. An internationalized domain is echoed in the spelling you sent, Unicode or `xn--`, so this deliberately has no `format: email`: a standard format validator would refuse a successful response for `user@m\u00fcnchen.de`."
          },
          "email_hash": {
            "type": "string"
          },
          "activity": {
            "$ref": "#/components/schemas/ActivityData"
          },
          "credits_used": {
            "type": "number"
          },
          "credits_remaining": {
            "type": "number",
            "description": "The account's balance after this call. On a charged lookup, the balance the charge left. On a replay (`idempotent_replay: true`), the current balance as read when the replay authenticated, or, for a copy racing the charge, the lower of that and what the charge left. Absent when the balance could not be read."
          },
          "idempotent_replay": {
            "type": "boolean",
            "description": "True when this repeated an earlier lookup and therefore charged nothing: one under the same `Idempotency-Key` (that receipt lasts about 24 hours), or, without a key, the same address looked up by the same account within 15 minutes of the lookup that was charged. **Absent means it was charged**: the field is added only on a replay. `credits_used: 0` alone cannot tell you which happened, because a lookup with nothing to bill also reports 0; this is the field that distinguishes them."
          }
        },
        "required": [
          "email",
          "activity",
          "credits_used"
        ]
      },
      "DeliverabilityCheck": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "sendingIp": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `sending_ip` this check ran against, or null when none was supplied. Part of the raw scoring result, published alongside the snake_case projection in its original camelCase spelling; kept because existing integrations read it."
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "0-100, over the mechanisms that were measured. One whose lookup failed is left out rather than scored as missing, so read `not_measured` before treating this as the whole picture. When `grade` is null, SPF, DKIM or DMARC was not measured and this is a partial score over what did answer: report it as partial, not as the domain's result."
          },
          "grade": {
            "type": [
              "string",
              "null"
            ],
            "description": "`score` as a letter: A (90-100), B (80-89), C (70-79), D (60-69) or F. **null when SPF, DKIM or DMARC could not be looked up** (named in `not_measured`): a letter over the rest would grade records nobody read, and it used to, so a domain whose DKIM and DMARC lookups both failed could read A. A stored check from before this rule that carries such a letter is answered with null too, from its own `not_measured`. A failed MX or reverse-DNS lookup still leaves a grade, over the rest; see `not_measured`."
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the check ran, as recorded in the raw scoring result. Prefer `checked_at`: on a cached or replayed result the stored row's `checked_at` is authoritative, and an older stored result may carry no `checkedAt` at all."
          },
          "durationMs": {
            "type": "integer",
            "description": "How long the DNS work took, in milliseconds, for the run that produced this result. A cached or replayed answer repeats the original run's figure; it is not the latency of this request."
          },
          "checks": {
            "type": "object",
            "description": "The raw per-mechanism scoring detail. One entry per mechanism REPORTED, and they do NOT share a shape: `dkim` carries the selectors it found, `mx` the records, `blacklists` the zones and the listings, and `mx` and `ptr` carry no `issues` array at all. Read the named property, not a common map value.\n\n**Optional, and absent on an older stored result.** A stored check without it is served as it is, with nothing made up in its place, so a check stored before the current shape answers 200 with the projected fields and no `checks`. Read `authentication`, `dns`, `reputation` and `server`, which the projection always produces, and treat this as the raw detail when it happens to be there.\n\n**BIMI and MTA-STS are checked, and they are unscored.** Both initialise `maxScore: 0`, and the score counts a mechanism only when `maxScore > 0`, so neither can move `score` or `grade` in either direction. They also have no entry in this object. A missing MTA-STS raises nothing at all; a missing BIMI produces a recommendation only when DMARC is already `reject`.",
            "properties": {
              "spf": {
                "type": "object",
                "description": "SPF: whether a record exists, parses, and is not over the lookup limit.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "weak",
                      "missing",
                      "invalid",
                      "error",
                      "found",
                      "listed",
                      "skipped"
                    ],
                    "description": "`missing` is an answer: the name has no such record (NXDOMAIN or NODATA). `error` means the lookup itself failed (SERVFAIL, REFUSED, a timeout), so nothing is known about the record: the mechanism is not measured, has `maxScore` 0, is named in `not_measured` and is left out of the score; when it is SPF, DKIM or DMARC the check has no grade. `found`, `listed` and `skipped` are used by some mechanisms only."
                  },
                  "score": {
                    "type": "number",
                    "description": "What this mechanism contributed to the total, in raw points out of `maxScore`. The projected sections restate the same measurement as a percentage: `authentication.<mechanism>.score`, `dns.mx_score` and `reputation.score` are `round(score / maxScore \u00d7 100)`, so `checks.dkim` at 11 of 15 appears as `authentication.dkim.score: 73`. Two scales, one measurement."
                  },
                  "maxScore": {
                    "type": "number",
                    "description": "The most it could have contributed. A mechanism whose lookup failed (status `error`, named in `not_measured`) has `maxScore` 0 and is left out of the grade rather than scored as missing, the way an unanswered blocklist section is. For SPF, DKIM or DMARC there is then no grade at all (`grade: null`). Until 2026-10-01 a failed SPF, DKIM, DMARC, MX or PTR lookup scored 0 against its full weight, so a DKIM SERVFAIL took a perfect domain from 100 (A) to 81 (B)."
                  },
                  "record": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The SPF record as published, or null when there is none."
                  },
                  "issues": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "severity": {
                          "type": "string",
                          "enum": [
                            "error",
                            "warning",
                            "info"
                          ],
                          "description": "How serious the finding is. `error` is what a missing SPF, DMARC, MX or PTR record produces, the common case on a paid check. A lookup that failed is a `warning` saying the mechanism was not measured, never an `error`."
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "required": [
                  "status",
                  "score",
                  "maxScore"
                ]
              },
              "dkim": {
                "type": "object",
                "description": "DKIM: which selectors published a key.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "weak",
                      "missing",
                      "invalid",
                      "error",
                      "found",
                      "listed",
                      "skipped"
                    ],
                    "description": "`missing` is an answer: the name has no such record (NXDOMAIN or NODATA). `error` means the lookup itself failed (SERVFAIL, REFUSED, a timeout), so nothing is known about the record: the mechanism is not measured, has `maxScore` 0, is named in `not_measured` and is left out of the score; when it is SPF, DKIM or DMARC the check has no grade. `found`, `listed` and `skipped` are used by some mechanisms only."
                  },
                  "score": {
                    "type": "number",
                    "description": "What this mechanism contributed to the total, in raw points out of `maxScore`. The projected sections restate the same measurement as a percentage: `authentication.<mechanism>.score`, `dns.mx_score` and `reputation.score` are `round(score / maxScore \u00d7 100)`, so `checks.dkim` at 11 of 15 appears as `authentication.dkim.score: 73`. Two scales, one measurement."
                  },
                  "maxScore": {
                    "type": "number",
                    "description": "The most it could have contributed. A mechanism whose lookup failed (status `error`, named in `not_measured`) has `maxScore` 0 and is left out of the grade rather than scored as missing, the way an unanswered blocklist section is. For SPF, DKIM or DMARC there is then no grade at all (`grade: null`). Until 2026-10-01 a failed SPF, DKIM, DMARC, MX or PTR lookup scored 0 against its full weight, so a DKIM SERVFAIL took a perfect domain from 100 (A) to 81 (B)."
                  },
                  "selectors": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The selectors a key was found under. Empty means none of the selectors tried resolved, not that DKIM is unused, because Kawaa can only probe the common ones. With `status: \"error\"` no key was found and some selectors could not be looked up, so DKIM was not measured."
                  },
                  "issues": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "severity": {
                          "type": "string",
                          "enum": [
                            "error",
                            "warning",
                            "info"
                          ],
                          "description": "How serious the finding is. `error` is what a missing SPF, DMARC, MX or PTR record produces, the common case on a paid check. A lookup that failed is a `warning` saying the mechanism was not measured, never an `error`."
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "required": [
                  "status",
                  "score",
                  "maxScore"
                ]
              },
              "dmarc": {
                "type": "object",
                "description": "DMARC: the published policy and record.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "weak",
                      "missing",
                      "invalid",
                      "error",
                      "found",
                      "listed",
                      "skipped"
                    ],
                    "description": "`missing` is an answer: the name has no such record (NXDOMAIN or NODATA). `error` means the lookup itself failed (SERVFAIL, REFUSED, a timeout), so nothing is known about the record: the mechanism is not measured, has `maxScore` 0, is named in `not_measured` and is left out of the score; when it is SPF, DKIM or DMARC the check has no grade. `found`, `listed` and `skipped` are used by some mechanisms only."
                  },
                  "score": {
                    "type": "number",
                    "description": "What this mechanism contributed to the total, in raw points out of `maxScore`. The projected sections restate the same measurement as a percentage: `authentication.<mechanism>.score`, `dns.mx_score` and `reputation.score` are `round(score / maxScore \u00d7 100)`, so `checks.dkim` at 11 of 15 appears as `authentication.dkim.score: 73`. Two scales, one measurement."
                  },
                  "maxScore": {
                    "type": "number",
                    "description": "The most it could have contributed. A mechanism whose lookup failed (status `error`, named in `not_measured`) has `maxScore` 0 and is left out of the grade rather than scored as missing, the way an unanswered blocklist section is. For SPF, DKIM or DMARC there is then no grade at all (`grade: null`). Until 2026-10-01 a failed SPF, DKIM, DMARC, MX or PTR lookup scored 0 against its full weight, so a DKIM SERVFAIL took a perfect domain from 100 (A) to 81 (B)."
                  },
                  "record": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "policy": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The `p=` value: none, quarantine or reject.",
                    "examples": [
                      "none",
                      "quarantine",
                      "reject"
                    ]
                  },
                  "issues": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "severity": {
                          "type": "string",
                          "enum": [
                            "error",
                            "warning",
                            "info"
                          ],
                          "description": "How serious the finding is. `error` is what a missing SPF, DMARC, MX or PTR record produces, the common case on a paid check. A lookup that failed is a `warning` saying the mechanism was not measured, never an `error`."
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "required": [
                  "status",
                  "score",
                  "maxScore"
                ]
              },
              "mx": {
                "type": "object",
                "description": "MX: whether the domain can receive mail at all. No `issues` array on this one.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "weak",
                      "missing",
                      "invalid",
                      "error",
                      "found",
                      "listed",
                      "skipped"
                    ],
                    "description": "`missing` is an answer: the name has no such record (NXDOMAIN or NODATA). `error` means the lookup itself failed (SERVFAIL, REFUSED, a timeout), so nothing is known about the record: the mechanism is not measured, has `maxScore` 0, is named in `not_measured` and is left out of the score; when it is SPF, DKIM or DMARC the check has no grade. `found`, `listed` and `skipped` are used by some mechanisms only."
                  },
                  "score": {
                    "type": "number",
                    "description": "What this mechanism contributed to the total, in raw points out of `maxScore`. The projected sections restate the same measurement as a percentage: `authentication.<mechanism>.score`, `dns.mx_score` and `reputation.score` are `round(score / maxScore \u00d7 100)`, so `checks.dkim` at 11 of 15 appears as `authentication.dkim.score: 73`. Two scales, one measurement."
                  },
                  "maxScore": {
                    "type": "number",
                    "description": "The most it could have contributed. A mechanism whose lookup failed (status `error`, named in `not_measured`) has `maxScore` 0 and is left out of the grade rather than scored as missing, the way an unanswered blocklist section is. For SPF, DKIM or DMARC there is then no grade at all (`grade: null`). Until 2026-10-01 a failed SPF, DKIM, DMARC, MX or PTR lookup scored 0 against its full weight, so a DKIM SERVFAIL took a perfect domain from 100 (A) to 81 (B)."
                  },
                  "records": {
                    "type": "array",
                    "description": "The MX hosts, in the order DNS returned them.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "priority": {
                          "type": "integer"
                        },
                        "host": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "priority",
                        "host"
                      ]
                    }
                  }
                },
                "required": [
                  "status",
                  "score",
                  "maxScore"
                ]
              },
              "ptr": {
                "type": "object",
                "description": "PTR: reverse DNS for `sending_ip`. Only meaningful when `sending_ip` was sent. No `issues` array on this one.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "weak",
                      "missing",
                      "invalid",
                      "error",
                      "found",
                      "listed",
                      "skipped"
                    ],
                    "description": "`missing` is an answer: the name has no such record (NXDOMAIN or NODATA). `error` means the lookup itself failed (SERVFAIL, REFUSED, a timeout), so nothing is known about the record: the mechanism is not measured, has `maxScore` 0, is named in `not_measured` and is left out of the score; when it is SPF, DKIM or DMARC the check has no grade. `found`, `listed` and `skipped` are used by some mechanisms only."
                  },
                  "score": {
                    "type": "number",
                    "description": "What this mechanism contributed to the total, in raw points out of `maxScore`. The projected sections restate the same measurement as a percentage: `authentication.<mechanism>.score`, `dns.mx_score` and `reputation.score` are `round(score / maxScore \u00d7 100)`, so `checks.dkim` at 11 of 15 appears as `authentication.dkim.score: 73`. Two scales, one measurement."
                  },
                  "maxScore": {
                    "type": "number",
                    "description": "The most it could have contributed. A mechanism whose lookup failed (status `error`, named in `not_measured`) has `maxScore` 0 and is left out of the grade rather than scored as missing, the way an unanswered blocklist section is. For SPF, DKIM or DMARC there is then no grade at all (`grade: null`). Until 2026-10-01 a failed SPF, DKIM, DMARC, MX or PTR lookup scored 0 against its full weight, so a DKIM SERVFAIL took a perfect domain from 100 (A) to 81 (B)."
                  },
                  "record": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The reverse-DNS name for the sending IP, when one was given. Null when no `sending_ip` was supplied or the lookup found nothing."
                  }
                },
                "required": [
                  "status",
                  "score",
                  "maxScore"
                ]
              },
              "blacklists": {
                "type": "object",
                "description": "Public blocklists. Read `checked` and `inconclusive` before treating an empty `listed` as a clean bill of health.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "weak",
                      "missing",
                      "invalid",
                      "error",
                      "found",
                      "listed",
                      "skipped"
                    ]
                  },
                  "score": {
                    "type": "number",
                    "description": "What this mechanism contributed to the total, in raw points out of `maxScore`. The projected sections restate the same measurement as a percentage: `authentication.<mechanism>.score`, `dns.mx_score` and `reputation.score` are `round(score / maxScore \u00d7 100)`, so `checks.dkim` at 11 of 15 appears as `authentication.dkim.score: 73`. Two scales, one measurement."
                  },
                  "maxScore": {
                    "type": "number",
                    "description": "The most it could have contributed. A mechanism whose lookup failed (status `error`, named in `not_measured`) has `maxScore` 0 and is left out of the grade rather than scored as missing, the way an unanswered blocklist section is. For SPF, DKIM or DMARC there is then no grade at all (`grade: null`). Until 2026-10-01 a failed SPF, DKIM, DMARC, MX or PTR lookup scored 0 against its full weight, so a DKIM SERVFAIL took a perfect domain from 100 (A) to 81 (B)."
                  },
                  "listed": {
                    "type": "array",
                    "description": "The zones that answered \"listed\". Empty is the good case.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "zone": {
                          "type": "string"
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "critical",
                            "high",
                            "medium",
                            "low"
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "zone"
                      ]
                    }
                  },
                  "checked": {
                    "type": "integer",
                    "description": "Zones that gave a definitive answer either way."
                  },
                  "inconclusive": {
                    "type": "integer",
                    "description": "Zones that were asked and answered nothing usable: a timeout, a refusal, a SERVFAIL. NOT a pass: an unanswered zone is not evidence of a clean record, and it contributes neither a pass nor its share of `maxScore`."
                  },
                  "skipped": {
                    "type": "integer",
                    "description": "Zones that were never asked, e.g. IP zones when no `sending_ip` was given."
                  },
                  "total": {
                    "type": "integer",
                    "description": "Zones in the list. `checked + inconclusive + skipped`."
                  },
                  "issues": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "severity": {
                          "type": "string",
                          "enum": [
                            "error",
                            "warning",
                            "info"
                          ],
                          "description": "How serious the finding is. `error` is what a missing SPF, DMARC, MX or PTR record produces, the common case on a paid check. A lookup that failed is a `warning` saying the mechanism was not measured, never an `error`."
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "required": [
                  "status",
                  "score",
                  "maxScore"
                ]
              }
            }
          },
          "check_id": {
            "type": "string",
            "description": "The saved check. Fetch it again with `GET /v1/deliverability/checks/{id}`: free, and the only way back to a result whose response was lost."
          },
          "credits_used": {
            "type": "number",
            "description": "What this call actually charged: 10 for a fresh check, 0 for a cached one or an idempotent replay. Read this rather than the price list."
          },
          "credits_remaining": {
            "type": "number",
            "description": "Balance after the charge. Omitted when it could not be read; its absence is not a zero balance."
          },
          "cached": {
            "type": "boolean",
            "description": "Present and true when this reused a check from the last 24 hours, which costs nothing. Send `refresh: true` to measure again."
          },
          "idempotent_replay": {
            "type": "boolean",
            "description": "Present and true when this returned an earlier call's result under the same `Idempotency-Key`, and charged nothing. Distinct from `cached`: a replay can return a FRESH check that was already paid for."
          },
          "issues": {
            "type": "array",
            "description": "Every finding, across every mechanism, severity-sorted. This is the list to render: the per-mechanism `issues` arrays do not carry MX, PTR or blocklist findings at all, so rebuilding this from `checks` loses exactly the problems that stop mail being delivered.",
            "items": {
              "type": "object",
              "properties": {
                "check": {
                  "type": "string",
                  "description": "Which mechanism produced it.",
                  "examples": [
                    "spf",
                    "dkim",
                    "dmarc",
                    "mx",
                    "ptr",
                    "blacklists"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning",
                    "info"
                  ]
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "severity",
                "message"
              ]
            }
          },
          "recommendations": {
            "type": "array",
            "description": "What to change, in the order worth doing it. The remediation half of the 10 credits: a score with no recommendations is a grade without an answer. Empty on a domain with nothing to fix.",
            "items": {
              "type": "object",
              "description": "One thing to change, and how.",
              "properties": {
                "priority": {
                  "type": "string",
                  "enum": [
                    "high",
                    "medium",
                    "low"
                  ],
                  "description": "Do the `high` ones first: they are the missing records that cause mail to be rejected outright, rather than the weak ones that cost reputation slowly."
                },
                "category": {
                  "type": "string",
                  "description": "Which part of the setup this is about, e.g. `Authentication`, `Reputation`, `Infrastructure`."
                },
                "issue": {
                  "type": "string",
                  "description": "What is wrong, in one line."
                },
                "fix": {
                  "type": "string",
                  "description": "What to change, concretely: usually the record to publish and roughly what to put in it."
                }
              },
              "required": [
                "priority",
                "category",
                "issue",
                "fix"
              ]
            }
          },
          "not_measured": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The scored mechanisms whose DNS lookup failed (SERVFAIL, REFUSED, a timeout), keyed by `spf`, `dkim`, `dmarc`, `mx` or `ptr`, each with a sentence saying why. Present only when at least one did; absent when every lookup answered, and on checks stored before 2026-10-01. A mechanism named here is unknown, not missing: its raw `checks.<mechanism>.status` is `error` with `maxScore` 0, its projected status is `not_measured`, it is left out of `score`, and it produces no recommendation. When it is `spf`, `dkim` or `dmarc`, `grade` and `spam_assessment.spam_likelihood` are null. The check is still charged, like any check that got real answers, with or without a grade; it is refunded (503) only when every lookup timed out or nothing at all could be scored. The 24-hour cache serves the stored result, so send `refresh: true` to measure again.",
            "examples": [
              {
                "dkim": "DKIM lookup failed for 51 of 51 selectors (ESERVFAIL), so DKIM was not measured and is left out of the score."
              }
            ]
          },
          "checked_at": {
            "type": "string",
            "description": "When the check ran. Falls back to the Unix epoch on an older cached row that stored none. A timestamp of `1970-01-01` means \"not recorded\", not \"checked in 1970\".",
            "format": "date-time"
          },
          "dns": {
            "type": "object",
            "description": "The mail exchangers, as the projection reports them.",
            "properties": {
              "mx_records": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "priority": {
                      "type": "integer"
                    },
                    "host": {
                      "type": "string"
                    },
                    "ip": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Null unless the host was resolved during the check; usually null."
                    }
                  },
                  "required": [
                    "priority",
                    "host",
                    "ip"
                  ]
                }
              },
              "has_valid_mx": {
                "type": "boolean",
                "description": "True only when the MX check passed AND at least one record came back. Also false when the MX lookup failed; `not_measured.mx` then says it was not measured rather than absent."
              },
              "mx_score": {
                "type": "number",
                "description": "The MX contribution, normalized to 100. 0 when the MX lookup failed, which `not_measured.mx` names; read it as unknown, not as no MX."
              }
            },
            "required": [
              "mx_records",
              "has_valid_mx",
              "mx_score"
            ]
          },
          "authentication": {
            "type": "object",
            "description": "SPF, DKIM and DMARC as three comparable results. This is the half of the answer a sender acts on; `recommendations` says what to do about it.",
            "properties": {
              "spf": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "The projection's status: `pass`, `fail`, `missing` or `not_measured`. `missing` means no record was found and is not the same as `fail`, which means one was found and did not hold up. `not_measured` means the lookup failed (SERVFAIL, REFUSED, a timeout), so nothing is known about the record; it is named in `not_measured` with the reason, left out of `score`, and the check has no `grade`. Added 2026-10-01: before then such a lookup read `missing`. A stored check from before then never carries it.",
                    "enum": [
                      "pass",
                      "fail",
                      "missing",
                      "not_measured"
                    ]
                  },
                  "record": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The published record, or null when none was found."
                  },
                  "score": {
                    "type": "number",
                    "description": "This mechanism's contribution, already normalized to 100: `round(checks.spf.score / checks.spf.maxScore \u00d7 100)`, 0 when nothing could be scored, including when it was `not_measured`. `checks.spf.score` is the same measurement in raw points (for example 11 of 15 there is 73 here); the two are not meant to agree numerically."
                  },
                  "issues": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "What is wrong with this record, in sentences. Empty when nothing is."
                  }
                },
                "required": [
                  "status",
                  "record",
                  "score",
                  "issues"
                ]
              },
              "dkim": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "The projection's status: `pass`, `fail`, `missing` or `not_measured`. `missing` means no record was found and is not the same as `fail`, which means one was found and did not hold up. `not_measured` means the lookup failed (SERVFAIL, REFUSED, a timeout), so nothing is known about the record; it is named in `not_measured` with the reason, left out of `score`, and the check has no `grade`. Added 2026-10-01: before then such a lookup read `missing`. A stored check from before then never carries it.",
                    "enum": [
                      "pass",
                      "fail",
                      "missing",
                      "not_measured"
                    ]
                  },
                  "selectors_found": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Selectors that answered. Empty is the ordinary shape for a domain with no DKIM: the check probes a fixed list and cannot enumerate selectors."
                  },
                  "score": {
                    "type": "number",
                    "description": "This mechanism's contribution, already normalized to 100: `round(checks.dkim.score / checks.dkim.maxScore \u00d7 100)`, 0 when nothing could be scored, including when it was `not_measured`. `checks.dkim.score` is the same measurement in raw points (for example 11 of 15 there is 73 here); the two are not meant to agree numerically."
                  },
                  "issues": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "What is wrong with this record, in sentences. Empty when nothing is."
                  }
                },
                "required": [
                  "status",
                  "selectors_found",
                  "score",
                  "issues"
                ]
              },
              "dmarc": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "The projection's status: `pass`, `fail`, `missing` or `not_measured`. `missing` means no record was found and is not the same as `fail`, which means one was found and did not hold up. `not_measured` means the lookup failed (SERVFAIL, REFUSED, a timeout), so nothing is known about the record; it is named in `not_measured` with the reason, left out of `score`, and the check has no `grade`. Added 2026-10-01: before then such a lookup read `missing`. A stored check from before then never carries it.",
                    "enum": [
                      "pass",
                      "fail",
                      "missing",
                      "not_measured"
                    ]
                  },
                  "record": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "policy": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The `p=` value: `none`, `quarantine` or `reject`. `none` is published-but-not-enforcing, which scores worse than `quarantine` and better than nothing at all."
                  },
                  "score": {
                    "type": "number",
                    "description": "This mechanism's contribution, already normalized to 100: `round(checks.dmarc.score / checks.dmarc.maxScore \u00d7 100)`, 0 when nothing could be scored, including when it was `not_measured`. `checks.dmarc.score` is the same measurement in raw points (for example 11 of 15 there is 73 here); the two are not meant to agree numerically."
                  },
                  "issues": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "What is wrong with this record, in sentences. Empty when nothing is."
                  }
                },
                "required": [
                  "status",
                  "record",
                  "policy",
                  "score",
                  "issues"
                ]
              }
            },
            "required": [
              "spf",
              "dkim",
              "dmarc"
            ]
          },
          "reputation": {
            "type": "object",
            "description": "Blacklist standing. The counts are separate on purpose: a zone that did not answer is not a zone that cleared you.",
            "properties": {
              "score": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "**Null when fewer than half of `blacklists_total` gave a verdict and none listed the domain** (none at all, or, say, only the domain zones because no sending IP is known): there is no verdict to score, a 100 from the few that answered would read as a clean record, and a zero would read as \"listed everywhere\". A listing is scored whatever the coverage."
              },
              "blacklists_checked": {
                "type": "integer",
                "description": "Zones that returned a usable answer."
              },
              "blacklists_inconclusive": {
                "type": "integer",
                "description": "Zones that answered with something that could not be read as listed or not listed. **They are removed from the grade rather than scored against it**: both the section score and its maximum are scaled by the proportion of zones consulted, so an unreadable zone neither penalises the domain nor silently counts as clean; the reputation section simply carries less weight. That is why `score` here can be null when nothing answered at all."
              },
              "blacklists_skipped": {
                "type": "integer",
                "description": "Zones not queried on this run."
              },
              "blacklists_total": {
                "type": "integer",
                "description": "Zones in the list. `checked + inconclusive + skipped` should account for it."
              },
              "blacklists_listed": {
                "type": "integer",
                "description": "Zones that reported the domain or its IP as listed."
              },
              "listed_on": {
                "type": "array",
                "description": "Which ones, and how much each matters. Empty when `blacklists_listed` is 0.",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "severity": {
                      "type": "string",
                      "description": "How much a listing there costs, worst first.",
                      "enum": [
                        "critical",
                        "high",
                        "medium",
                        "low"
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "severity"
                  ]
                }
              }
            },
            "required": [
              "score",
              "blacklists_checked",
              "blacklists_inconclusive",
              "blacklists_skipped",
              "blacklists_total",
              "blacklists_listed",
              "listed_on"
            ]
          },
          "server": {
            "type": "object",
            "description": "What a probe of the receiving server would have found. **Four of these five are always null**: `accepts_mail`, `response_time_ms`, `supports_tls` and `tls_version` are hard-coded null in the projection: no SMTP banner, TLS or acceptance probe runs on this route, with or without a `sending_ip`. Only `reverse_dns` is ever populated, from the PTR check, and only when a `sending_ip` was supplied.\n\nNull here means \"not measured\", never \"no\". The fields exist because the shape is shared with a probe that may be added later; today they are placeholders and must not be reported as evidence about the server.",
            "properties": {
              "accepts_mail": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Always null today: no acceptance probe runs. Not \"the server refuses mail\"."
              },
              "response_time_ms": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Always null today: nothing is timed."
              },
              "supports_tls": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Always null today. Not \"no TLS\": nothing connected to find out."
              },
              "tls_version": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Always null today, for the same reason as `supports_tls`."
              },
              "reverse_dns": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The PTR record for the `sending_ip`, and the only field here that is ever populated. Null when no `sending_ip` was supplied, because reverse DNS is looked up for that address alone and is skipped without one; it never resolves an address from the MX records."
              }
            },
            "required": [
              "accepts_mail",
              "response_time_ms",
              "supports_tls",
              "tls_version",
              "reverse_dns"
            ]
          },
          "spam_assessment": {
            "type": "object",
            "description": "The same evidence again, expressed as how likely mail from this domain is to be filtered.",
            "properties": {
              "score": {
                "type": "number",
                "description": "How likely mail from this domain is to be filtered, 0-100, where **higher is worse**. It is the INVERSE of the top-level `score`: `100 - score`, clamped. A domain scoring 90 for deliverability carries a spam score of 10. Do not compare it against the top-level number or apply the same thresholds to it."
              },
              "spam_likelihood": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A band, not a prediction about any one message. **Derived from the DELIVERABILITY score, not from `score` beside it**: `low` at 80 and above, `medium` from 60, `high` below. Because that sibling is the inverse, applying these numbers to it reads every domain backwards: a spam score of 10 is the best case, not the worst. Read `spam_likelihood` and leave the arithmetic alone. **null when `grade` is null**: the band is read off the same partial score, so it is withheld with the grade.",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  null
                ]
              },
              "factors": {
                "type": "array",
                "description": "What pushed the score each way, including the things that helped.",
                "items": {
                  "type": "object",
                  "properties": {
                    "factor": {
                      "type": "string",
                      "description": "What was looked at, e.g. `SPF`, `DKIM`, `DMARC`, `MX`."
                    },
                    "impact": {
                      "type": "string",
                      "description": "Which way it pushed. `neutral` means it changed nothing: it was assessed with no effect, skipped (reverse DNS without a `sending_ip`, or too few blocklists answered to give a verdict), or not measured because its lookup failed. The `description` says which.",
                      "enum": [
                        "positive",
                        "negative",
                        "neutral"
                      ]
                    },
                    "description": {
                      "type": "string",
                      "description": "Why, in one sentence."
                    }
                  },
                  "required": [
                    "factor",
                    "impact",
                    "description"
                  ]
                }
              }
            },
            "required": [
              "score",
              "spam_likelihood",
              "factors"
            ]
          }
        },
        "required": [
          "domain",
          "score",
          "grade",
          "checked_at",
          "dns",
          "authentication",
          "reputation",
          "server",
          "spam_assessment",
          "recommendations"
        ]
      },
      "ApiKeySummary": {
        "type": "object",
        "properties": {
          "key_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "key_preview": {
            "type": "string",
            "description": "`ev_****` and the key's last four characters, never the secret. An older key that has no stored preview shows `ev_\u2022\u2022\u2022\u2022`, with no characters from the key."
          },
          "scopes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "enum": [
                "verification:read",
                "verification:write",
                "lists:read",
                "lists:write",
                "deliverability:read",
                "deliverability:write",
                "compose:read",
                "compose:write",
                "exports:read",
                "exports:write",
                "webhooks:read",
                "webhooks:write",
                "integrations:read",
                "integrations:write",
                "analytics:read",
                "analytics:write",
                "account:read",
                "account:write",
                "account:delete",
                "billing:read",
                "billing:write",
                "team:read",
                "team:write",
                "security:read",
                "security:write",
                "white_label:read",
                "white_label:write"
              ]
            },
            "description": "What this key may reach. **`null` means UNRESTRICTED**: every key created without a `scopes` array is, and that is the default. Always present, so `null` is a fact about the key rather than a field an older build omitted."
          }
        },
        "required": [
          "key_id",
          "name",
          "status",
          "scopes"
        ]
      },
      "Account": {
        "type": "object",
        "properties": {
          "account": {
            "type": "object",
            "properties": {
              "user_id": {
                "type": "string"
              },
              "email": {
                "type": "string",
                "format": "email"
              },
              "name": {
                "type": "string",
                "description": "Optional: the property is left out entirely for an account that never stored a name."
              },
              "plan": {
                "type": "string",
                "description": "The account's own plan. Never `sub_account`: a white-label sub-account's key gets the SubAccount shape instead, which is a different object.",
                "not": {
                  "const": "sub_account"
                }
              },
              "status": {
                "type": "string"
              },
              "created_at": {
                "description": "The account creation time. An account created before this time was recorded returns the empty string; no timestamp is invented.",
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "const": ""
                  }
                ]
              },
              "is_admin": {
                "type": "boolean"
              },
              "timezone": {
                "type": "string"
              },
              "batch_size": {
                "type": "integer",
                "minimum": 1,
                "description": "The most distinct, well-formed addresses one bulk job (`POST /v1/verify/batch` or `POST /v1/verify/file`) accepts for this account: the plan's batch size, or 1,000 on a Free account that has bought any credit pack (Free is otherwise 100). A longer list is `413 BATCH_SIZE_EXCEEDED` before anything is charged. Absent from responses by builds that predate it."
              },
              "email_delivery": {
                "type": "object",
                "description": "Whether Kawaa is still willing to email this account. Always present, including the healthy case.",
                "properties": {
                  "deliverable": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "since": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "detail": {
                    "type": "string"
                  }
                },
                "required": [
                  "deliverable"
                ]
              }
            },
            "required": [
              "user_id",
              "email",
              "plan",
              "status",
              "created_at",
              "is_admin",
              "email_delivery"
            ]
          },
          "credits": {
            "type": "object",
            "properties": {
              "balance": {
                "type": "number",
                "description": "Fractional: a cached verification costs 0.5."
              },
              "used_this_month": {
                "type": "number"
              },
              "monthly_allowance": {
                "type": "number"
              },
              "next_reset": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the allowance refills: the end of the billing period. Absent with no billing period, and absent when the plan is set to end at the close of this period (the account then moves to Free and the unspent allowance is removed). For a short time after a renewal, until its payment is recorded, `used_this_month` has not been reset and still includes the previous period's spend; `usage.period` then runs from the last reset up to now, and this is the moment the previous period ended."
              },
              "allowance_basis": {
                "type": "string",
                "enum": [
                  "billing_period",
                  "no_billing_period",
                  "one_time_grant",
                  "provider_allocation"
                ],
                "description": "Whether the allowance renews. Only `billing_period` does, and not when the plan is set to end at the close of the period, which `next_reset` being absent says. `next_reset` alone cannot say why it is absent: it is also absent for every account with no billing period on file, Free and paid alike."
              }
            }
          },
          "usage": {
            "type": "object",
            "properties": {
              "current_month": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Counts for `period`: `jobs_count`, `emails_verified`, `emails_valid`, `emails_invalid`, `emails_risky`, `emails_unknown`. `null` when they were not measured: withheld from this key (`withheld.usage`) or not loaded (`partial.usage`). Never zeros standing in for either."
              },
              "period": {
                "type": "object",
                "description": "The window `current_month` covers, as `start` and `end` UTC dates. Present even when `current_month` is `null`."
              },
              "coverage": {
                "type": "object",
                "description": "How much of `period` the counts cover; job rows expire at the plan's result retention."
              }
            }
          },
          "api_keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeySummary"
            }
          },
          "recent_jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Job"
            }
          },
          "onboarding": {
            "type": "object",
            "description": "Dashboard setup progress. Informational. Left out when the key cannot read the profile (then `withheld.onboarding` is `true`).",
            "properties": {
              "milestones": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "When the account first reached each step, for the steps a completion was recorded for. A step with no recorded time is left out, which means only that nothing was recorded: an account that was active before these were recorded can have `{}` or a partial set, so read a missing step as unknown, not as not done. `null` when the progress could not be read, and then `partial.onboarding` is `true`: render the steps as unknown, not as a fresh to-do list.",
                "properties": {
                  "first_result_completed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "first_classified_result_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "first_api_key_result_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "first_bulk_job_completed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "first_autoclean_run_completed_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "preferences": {
                "type": "object",
                "description": "The setup guide's saved state, set with `PUT /v1/account/profile` (`onboarding`). Each key is left out until it is set.",
                "properties": {
                  "path": {
                    "type": "string",
                    "enum": [
                      "api",
                      "bulk"
                    ]
                  },
                  "dismissed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "collapsed": {
                    "const": true
                  },
                  "acknowledged_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          },
          "rate_limits": {
            "type": "object",
            "properties": {
              "requests_per_minute": {
                "type": "integer"
              },
              "enforced": {
                "type": "boolean"
              }
            }
          },
          "partial": {
            "type": "object",
            "description": "Names sections that could NOT BE LOADED. Their values are placeholders, not facts: lists come back empty, `usage.current_month` comes back `null` and `onboarding.milestones` comes back `null`. Do not render an empty state for a flagged section.",
            "properties": {
              "usage": {
                "const": true
              },
              "api_keys": {
                "const": true
              },
              "recent_jobs": {
                "const": true
              },
              "onboarding": {
                "const": true
              }
            }
          },
          "withheld": {
            "type": "object",
            "description": "Names sections this API key's SCOPES DO NOT COVER. They come back empty; an empty api_keys here never means the account has no keys. `usage: true` means `usage.current_month` is `null` (not measured) and `credits.used_this_month` is left out. `onboarding: true` means the `onboarding` section is left out.",
            "properties": {
              "usage": {
                "const": true
              },
              "api_keys": {
                "const": true
              },
              "recent_jobs": {
                "const": true
              },
              "onboarding": {
                "const": true
              }
            }
          }
        },
        "required": [
          "account",
          "credits"
        ]
      },
      "AsyncVerifyOptions": {
        "type": "object",
        "description": "Verification options for an ASYNCHRONOUS submission. Deliberately not `VerifyOptions`: that schema permits `timeout_ms`, which these routes refuse with 400 INVALID_OPTION because there is no synchronous wait to bound. Omit `options` to use the defaults; a present `null` is refused with the same code before work starts or credits are charged.",
        "properties": {
          "deep_verify": {
            "type": "boolean"
          },
          "include_ai": {
            "type": "boolean",
            "description": "Run the AI-assisted checks (default `true`). Turning it off does more than remove AI analysis. The built-in rules alone then answer the typo and catch-all checks, so `ai` and `suggestion` still appear when they find something. The worker also skips the SPF, DKIM and DMARC lookup, which runs only with this option on: `domain_info` then carries `auth_score`, `auth_grade`, `has_spf`, `spf_policy`, `has_dmarc`, `dmarc_policy` and `has_dkim` only when a recent check of the same domain already measured them, so expect them to be absent."
          },
          "enrich": {
            "type": "boolean",
            "description": "Include name, gender and country hints where available. Needs the Business plan or higher: on a lower plan the whole submission is refused with `403 PLAN_UPGRADE_REQUIRED` and nothing is charged."
          },
          "skip_cache": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "JobResultsInline": {
        "type": "object",
        "description": "`format=json` under the inline threshold. NOT the standard envelope: this route answers with the object itself, so there is no `success` or `data` wrapper to unwrap. Carries the completeness verdict: read `complete` before treating `results` as the job.",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/Job/properties/status"
          },
          "result_count": {
            "type": "integer"
          },
          "complete": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether this export is the job's whole result set. `true` when the rows returned reach the job's own `processed_emails`; `false` when they fall short; `null` when the job row carries no count to compare against, which is \"not verified\" and never a stand-in for \"complete\". The export is read from an eventually-consistent index, so a job that has just finished can be exported before its last rows are visible: a short file that used to be reported as the job's results with nothing saying otherwise. Measured on the UNFILTERED read, so a `filter=` export inherits the verdict of the read it was narrowed from."
          },
          "expected_rows": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The job's `processed_emails` (how many addresses it finished), which is what the export was counted against. `null` when the job row carries none."
          },
          "rows_missing": {
            "type": [
              "integer",
              "null"
            ],
            "description": "`expected_rows` minus the rows the read returned, or `0` when nothing is missing. `null` when completeness was not verified. Never negative: a read returning more than `processed_emails` is not short. Measured on the UNFILTERED read, like `complete`, so on a `filter=` export it counts the rows missing from the whole job, not from the filtered file: `result_count` can be far below `expected_rows` while `rows_missing` is `0`."
          },
          "message": {
            "type": "string",
            "description": "Present only when `complete` is not `true`. Says what is missing and what to do: normally request the download again in a few seconds, because the index catches up. A persistent shortfall means those rows aged out of the plan's data-retention window."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DownloadedResult"
            }
          }
        },
        "required": [
          "job_id",
          "status",
          "result_count",
          "results",
          "complete",
          "expected_rows",
          "rows_missing"
        ]
      },
      "JobResultsLink": {
        "type": "object",
        "description": "Returned instead of the rows when the result set is over the inline threshold, whatever `format` says, so a large CSV export is announced through this object. Also unwrapped. The link is time-limited and anyone holding it can read the results, which contain customer addresses. Read `complete` before treating the file as the job: the link is minted for whatever the index returned, including a short read.",
        "properties": {
          "download_url": {
            "type": "string",
            "format": "uri"
          },
          "format": {
            "type": "string",
            "enum": [
              "json",
              "csv"
            ]
          },
          "result_count": {
            "type": "integer"
          },
          "complete": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether this export is the job's whole result set. `true` when the rows returned reach the job's own `processed_emails`; `false` when they fall short; `null` when the job row carries no count to compare against, which is \"not verified\" and never a stand-in for \"complete\". The export is read from an eventually-consistent index, so a job that has just finished can be exported before its last rows are visible: a short file that used to be reported as the job's results with nothing saying otherwise. Measured on the UNFILTERED read, so a `filter=` export inherits the verdict of the read it was narrowed from."
          },
          "expected_rows": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The job's `processed_emails` (how many addresses it finished), which is what the export was counted against. `null` when the job row carries none."
          },
          "rows_missing": {
            "type": [
              "integer",
              "null"
            ],
            "description": "`expected_rows` minus the rows the read returned, or `0` when nothing is missing. `null` when completeness was not verified. Never negative: a read returning more than `processed_emails` is not short. Measured on the UNFILTERED read, like `complete`, so on a `filter=` export it counts the rows missing from the whole job, not from the filtered file: `result_count` can be far below `expected_rows` while `rows_missing` is `0`."
          },
          "message": {
            "type": "string",
            "description": "Present only when `complete` is not `true`. Says what is missing and what to do: normally request the download again in a few seconds, because the index catches up. A persistent shortfall means those rows aged out of the plan's data-retention window."
          },
          "expires_in_seconds": {
            "type": "integer"
          }
        },
        "required": [
          "download_url",
          "format",
          "result_count",
          "expires_in_seconds",
          "complete",
          "expected_rows",
          "rows_missing"
        ]
      },
      "DownloadedResult": {
        "type": "object",
        "description": "One row of a `format=json` download. A FLAT shape, produced by the exporter rather than the verification API: there is no `quality_score`, no `flags` object and no `verification` object here.",
        "properties": {
          "email": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "score": {
            "type": "number",
            "description": "The quality score, named `score` in this shape."
          },
          "disposable": {
            "type": "boolean"
          },
          "role": {
            "type": "boolean"
          },
          "free_provider": {
            "type": "boolean"
          },
          "catch_all": {
            "type": "boolean",
            "description": "Whether a mailbox probe found an accept-everything domain. Omitted when no probe measured it (a disposable or spam-trap verdict, a DNS failure, a refused or unanswered mailbox, an inconclusive probe); absent is not `false`. In `format=csv` the cell is empty."
          },
          "suggestion": {
            "type": [
              "string",
              "null"
            ]
          },
          "mx_records": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "smtp_response": {
            "type": [
              "string",
              "null"
            ]
          },
          "verified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "sub_status": {
            "type": "string",
            "description": "The reason code behind `status`, the same value as `sub_status` on the verification result (see `SubStatus`; new values can be added). Omitted when the result has none, as on a disposable or spam-trap verdict whose DNS lookups answered; in `format=csv` the cell is empty. A disposable or spam-trap verdict whose DNS lookup failed carries `temporary_failure`: the verdict stands, but the domain checks beside it were not measured. The last column, so the columns before it keep their positions."
          }
        },
        "required": [
          "email",
          "status",
          "score"
        ]
      },
      "JobListItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Job"
          }
        ],
        "type": "object",
        "description": "A row of the job listing: a `Job` plus the field that distinguishes an uploaded-file job.",
        "properties": {
          "filename": {
            "type": [
              "string",
              "null"
            ],
            "description": "The uploaded file this job came from, or null for a job submitted as a list."
          }
        }
      },
      "SubAccount": {
        "type": "object",
        "description": "What `GET /v1/account` returns when the key belongs to a white-label sub-account. A sub-account has no plan or allowance of its own: it spends a pool its parent allocated, so the credit fields are `allocated` and `credits_used` rather than `monthly_allowance` and `used_this_month`. Their absence is the shape of this account, not missing billing data.",
        "properties": {
          "account": {
            "type": "object",
            "properties": {
              "user_id": {
                "type": "string",
                "description": "The sub-account's own id."
              },
              "email": {
                "type": "string",
                "format": "email"
              },
              "name": {
                "type": "string"
              },
              "plan": {
                "const": "sub_account",
                "description": "Always this. The parent's tier decides the limits; see `GET /v1/usage/limits`, whose `plan_note` says where the inherited numbers come from."
              },
              "limits_plan": {
                "type": "string",
                "enum": [
                  "free",
                  "starter",
                  "professional",
                  "business",
                  "enterprise"
                ],
                "description": "The plan whose features and limits this sub-account has: its parent's, as it stood when the request was made. A sub-account never gets more than its parent's plan includes."
              },
              "batch_size": {
                "type": "integer",
                "minimum": 1,
                "description": "The most distinct, well-formed addresses one bulk job accepts for this sub-account: the batch size of its parent's plan (`limits_plan`). A sub-account cannot buy credit packs. Absent from responses by builds that predate it."
              },
              "status": {
                "type": "string"
              },
              "created_at": {
                "description": "The sub-account creation time. A sub-account created before this time was recorded returns the empty string; no timestamp is invented.",
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "const": ""
                  }
                ]
              },
              "parent_user_id": {
                "type": "string",
                "description": "The account that provisioned this one and owns its credit pool."
              }
            },
            "required": [
              "user_id",
              "email",
              "plan",
              "status",
              "parent_user_id"
            ]
          },
          "credits": {
            "type": "object",
            "properties": {
              "balance": {
                "type": "number",
                "description": "What is left of the allocation. Fractional: a cached verification costs 0.5."
              },
              "allocated": {
                "type": "number",
                "description": "What the parent has granted in total. `0` for a sub-account that has never been allocated any."
              },
              "credits_used": {
                "type": "number",
                "description": "Spend since provisioning: exactly `allocated - balance`, which is why it is published even for a key without the analytics scope: both operands are already here. This says nothing about `usage.current_month`, which is still withheld and still flagged."
              }
            },
            "required": [
              "balance",
              "allocated"
            ]
          },
          "usage": {
            "type": "object",
            "description": "`current_month` and `period`, as on the parent shape. `current_month` is `null` when it was not measured (`withheld.usage` or `partial.usage`)."
          },
          "api_keys": {
            "type": "array",
            "description": "The sub-account's own API keys, as `GET /v1/api-keys` lists them for the same key: those its provider issued it and any it created. Empty when `withheld.api_keys` or `partial.api_keys` is set.",
            "items": {
              "$ref": "#/components/schemas/ApiKeySummary"
            }
          },
          "recent_jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Job"
            }
          },
          "rate_limits": {
            "type": "object",
            "properties": {
              "requests_per_minute": {
                "type": "integer",
                "description": "The sub-account's own ceiling, inherited from the parent's tier."
              },
              "enforced": {
                "type": "boolean"
              }
            }
          },
          "partial": {
            "type": "object",
            "description": "Names sections that could NOT BE LOADED. Their values are placeholders, not facts: `api_keys` and `recent_jobs` come back empty and `usage.current_month` comes back `null`.",
            "properties": {
              "usage": {
                "const": true
              },
              "api_keys": {
                "const": true
              },
              "recent_jobs": {
                "const": true
              }
            }
          },
          "withheld": {
            "type": "object",
            "description": "Names sections this API key's SCOPES DO NOT COVER. `usage: true` means `usage.current_month` is `null` (not measured); `api_keys: true` means the key list comes back empty because this key may not read it.",
            "properties": {
              "usage": {
                "const": true
              },
              "api_keys": {
                "const": true
              },
              "recent_jobs": {
                "const": true
              }
            }
          }
        },
        "required": [
          "account",
          "credits"
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request is malformed, or names a field this endpoint does not accept. Retrying it unchanged will fail identically.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                {
                  "$ref": "#/components/schemas/GatewayError"
                }
              ]
            }
          }
        }
      },
      "Unauthorized": {
        "description": "No credential, or one that is not accepted. `code` distinguishes `API_KEY_SUSPENDED` (subscription ended; restartable) from `API_KEY_REVOKED`, `SESSION_EXPIRED` and `OAUTH_TOKEN_EXPIRED` (a connected app's one-hour access token lapsed: refresh it and retry, or sign in again if no refresh token was issued or the refresh is refused).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Refused, and **the code says which of three problems it is**, and they need different remedies:\n\n- `INSUFFICIENT_SCOPE`: the credential is valid but not scoped for this route. With an API key, issue one that carries the scope named in the message. With an OAuth access token, connect the app again asking for that scope as well as the ones it has, unless the message says a connected app can never be given it; then use an API key with every scope the message names, or have the account owner do it in the dashboard.\n- `PLAN_UPGRADE_REQUIRED`: the account's plan does not include the feature. **No key of any scope reaches it**, so issuing another is wasted work; the remedy is a plan change. Returned by the verification routes for `options.enrich`, and by the finder, the monitors, the audit log, auto-clean and the white-label routes.\n- `PLAN_LIMIT_EXCEEDED`: the plan includes the feature and the account is at its ceiling (webhook endpoints, team seats, integrations, auto-clean lists). Delete one or upgrade.\n- `FORBIDDEN`: refused for a reason none of the above covers.\n\n`ErrorCode` is an open set, so branch on the code with a default rather than exhaustively.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such resource on this account.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "InsufficientCredits": {
        "description": "The account cannot pay for this request. The message carries the numbers and where to top up. Nothing was charged.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "IdempotencyConflict": {
        "description": "The `Idempotency-Key` was used before for a different request on this route. No credit moved. Repeat the original request exactly, or use a new key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Default": {
        "description": "Any status this operation does not list. Kawaa's own errors carry the error envelope. The gateway in front of the API can answer any operation with its own bare body (`GatewayError`): a `503` when the route's time limit at the gateway runs out (about 29 to 30 seconds on every route that charges credits, 15 on `GET /v1/account`, the `/v1/api-keys` routes, `GET /v1/jobs`, `GET /v1/jobs/{id}` and `POST /v1/jobs/{id}/cancel`, 5 on `/health`), when the request may still have run and been charged, a `413` for a body over about 6 MB, or a `400` for a path with malformed percent-encoding.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                {
                  "$ref": "#/components/schemas/GatewayError"
                }
              ]
            }
          },
          "text/html": {
            "schema": {
              "type": "string",
              "description": "An error page from infrastructure in front of the API. Handle it by its status."
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "Too much in one request: `BATCH_SIZE_EXCEEDED`, more addresses than the plan's per-batch limit or the 10,000 cap allows, refused before anything is charged. Split the list. A request body over about 6 MB never reaches Kawaa: the gateway answers `413` itself with `{\"message\":\"Request Entity Too Large\"}` and no envelope, and nothing is run or charged.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                {
                  "$ref": "#/components/schemas/GatewayError"
                }
              ]
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too many requests. When the server knows how long to wait, `Retry-After` says so and `error.retry_after_seconds` carries the same number; the `X-RateLimit-*` headers say where you stand.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "X-RateLimit-Window": {
            "$ref": "#/components/headers/RateLimitWindow"
          },
          "X-RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "Temporarily unable to serve; `error.retryable` says whether waiting cures it. On a credit-charging route a contended balance answers this too, not an empty wallet: that one charged nothing, so retry. So does a request that ran out of time before its charge could start (`nothing_charged: true`): nothing was written, so retry.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                {
                  "$ref": "#/components/schemas/GatewayError"
                }
              ]
            }
          }
        }
      },
      "IdempotentJobExpired": {
        "description": "`IDEMPOTENT_JOB_EXPIRED`, not retryable. The prior job for this `Idempotency-Key` has reached the end of the data-retention period of the plan it was submitted under (7 days on Free) while the key's receipt, kept at least 30 days, still stands. The job cannot be replayed or restarted from that receipt. This retry was not charged. Send a new key to run the request again.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      }
    }
  }
}
