{
  "openapi": "3.1.0",
  "info": {
    "title": "EmailSifter API",
    "version": "2.0.0",
    "summary": "See who sends email as your domain, and fix what fails.",
    "description": "EmailSifter reads the DMARC reports Gmail, Microsoft, Yahoo and other mailbox providers send about your domain every day. It names every service that sends email as your domain in plain words, says which record fixes each one that fails (read live from your DNS), tells you when the domain can move from p=none to quarantine and then reject, emails you when a new sender appears or failures rise, and keeps 13 months of history. Setup is one change to your DMARC record. For people and for AI agents, with every domain of an agency on one page. Its email address checker stays free for everyone, with no account: a hundred addresses at a time, checked for typos, throwaway domains and domains that take no email.\n\n## The free checker\n`POST /api/v1/check` is free and needs no key. Free, with fair-use limits: up to 100 addresses a request; without a key, 10 requests a minute and 500 addresses an hour from one IP address; with a free API key or signed in, 60 requests a minute and 5,000 addresses an hour. A 429 carries `Retry-After`. The counts are kept in memory on each server, so they are approximate.\n\n## Files (paid)\n`POST /api/v1/files` takes a file (`Content-Type: text/csv`; comma, semicolon or tab separated; up to 2 MB and 10,000 rows) and returns the same file with `emailsifter_verdict` and `emailsifter_reason` added to every row, plus a summary; or a JSON list `{\"emails\": [...]}` of up to 10,000 addresses, returned as one result per address. `Accept: text/csv` returns the file itself, with the summary in `X-EmailSifter-Summary`. Send bigger files in parts, each with the header row. Nothing is stored: the answer is the only copy.\nIt needs an API key (`Authorization: Bearer <key>` or `X-API-Key`; created by a signed-in person at https://emailsifter.com/app/api-keys) or a signed-in session. Each distinct address with a verdict other than unknown counts once against the account's monthly allowance (`file_address` usage events): free 500 a month; Domain 25,000 a month for $10/month; Agency 250,000 a month for $89/month. Past it the answer is 402; there is no pay-as-you-go.\nAgents should send `x-usage-source: agent` so their usage is attributed correctly; it does not change the price.\n\n## DMARC reports (the paid part)\nEach domain on an account gets its own receiving address; the customer adds it to the domain's DMARC record and mailbox providers send their daily reports there. `GET /api/v1/domains/health?domain=example.com` answers \"is this domain's mail passing, and what record fixes it?\": the verdict over the last 14 days, each failing sender named with the record that fixes it (SPF built from the record in DNS now, DKIM records looked up live, the service's own setup page), and whether the domain can move from p=none to quarantine and then reject. `GET /api/v1/domains/overview` lists every domain worst first. `/api/v1/domains` adds, lists, changes and removes domains. These need a key or a session and are not metered; the number of domains is the plan's (free 1; Domain 1 per domain bought, up to 9; Agency 10).\n\n## Rate limits\nPer key or IP, published in the `X-RateLimit-*` response headers. A 429 carries `Retry-After`.\n\nSupport: support@tenhatch.com. Machine-readable product summary: https://emailsifter.com/.well-known/product.json",
    "contact": {
      "name": "EmailSifter support",
      "email": "support@tenhatch.com",
      "url": "https://emailsifter.com"
    },
    "termsOfService": "https://emailsifter.com/legal/terms",
    "x-pricing": {
      "currency": "usd",
      "check": {
        "priceCents": 0,
        "perRequest": 100,
        "fairUse": {
          "anonymous": {
            "requestsPerMinute": 10,
            "addressesPerHour": 500
          },
          "withKey": {
            "requestsPerMinute": 60,
            "addressesPerHour": 5000
          }
        }
      },
      "files": {
        "eventName": "file_address",
        "perAddressCents": 0,
        "payAsYouGo": false,
        "freeAddressesPerMonth": 500,
        "maxBytesPerRequest": 2000000,
        "maxRowsPerRequest": 10000,
        "plans": [
          {
            "planId": "domain",
            "name": "Domain",
            "monthly": "$10/month",
            "annual": "$100/year",
            "annualPerMonth": "$8.33/month",
            "savingsPercent": 17,
            "savings": "$20",
            "resultsPerMonth": 25000
          },
          {
            "planId": "agency",
            "name": "Agency",
            "monthly": "$89/month",
            "annual": "$890/year",
            "annualPerMonth": "$74.17/month",
            "savingsPercent": 17,
            "savings": "$178",
            "resultsPerMonth": 250000
          }
        ]
      },
      "refundWindowDays": 14
    }
  },
  "servers": [
    {
      "url": "https://emailsifter.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "apiKeyHeader": []
    }
  ],
  "tags": [
    {
      "name": "feature",
      "description": "Email check (free)"
    },
    {
      "name": "files",
      "description": "Files and lists (paid, counted against the monthly allowance)"
    },
    {
      "name": "domains",
      "description": "DMARC reports per domain: passing, fixes, readiness"
    },
    {
      "name": "account",
      "description": "Account, usage and API keys"
    },
    {
      "name": "meta",
      "description": "Documents about the API itself"
    }
  ],
  "paths": {
    "/api/v1/check": {
      "post": {
        "tags": [
          "feature"
        ],
        "operationId": "check",
        "summary": "Email check",
        "description": "Free: checks up to 100 email addresses at a time: written correctly, domain exists and accepts email (MX or A records), throwaway (disposable) address, shared role address, free mailbox, and likely typos of common domains. Each gets a verdict (ok, risky, invalid or unknown) and a plain reason. The mailbox itself is not contacted. No key needed; fair-use limits apply.\n\nInput: A JSON object with `emails`: an array of 1 to 100 email addresses.\n\nOutput: A JSON object with `results` (one per distinct address: verdict, reason, checks, suggestion), a `summary` count per verdict, and `mailboxChecked: false`.",
        "parameters": [
          {
            "name": "x-usage-source",
            "in": "header",
            "required": false,
            "description": "Set to `agent` when the caller is an AI agent or MCP client.",
            "schema": {
              "type": "string",
              "enum": [
                "agent",
                "api"
              ]
            }
          }
        ],
        "security": [
          {},
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeatureInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result. Never charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (see `error.details`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "An invalid or revoked API key was sent (send none to use the free limits).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fair-use limit reached. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-price-cents": 0
      }
    },
    "/api/v1/files": {
      "post": {
        "tags": [
          "files"
        ],
        "operationId": "checkFile",
        "summary": "Check a file or a list (paid)",
        "description": "A file comes back with emailsifter_verdict and emailsifter_reason added to every row, in its own delimiter and line breaks; a JSON list comes back as one result per distinct address. Both with a summary. Up to 2 MB and 10,000 rows a request. The address column is found by its header (\"Email\" and the like) or by its content; `column` names it (a header or a number from 1). Nothing is stored.",
        "parameters": [
          {
            "name": "column",
            "in": "query",
            "required": false,
            "description": "The column of addresses: its header, or its number counted from 1.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-usage-source",
            "in": "header",
            "required": false,
            "description": "Set to `agent` when the caller is an AI agent or MCP client.",
            "schema": {
              "type": "string",
              "enum": [
                "agent",
                "api"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "text/csv": {
              "schema": {
                "type": "string",
                "description": "The file itself."
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FilesListInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The checked file (JSON, or the file itself with `Accept: text/csv`) and how it was counted.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FileCheckResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ListCheckResponse"
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: no address column, an empty file, or the wrong content type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "The monthly allowance would be exceeded. Upgrade, send fewer addresses, or wait for the 1st.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Over the size of one request. Send the file in parts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-usage-event": "file_address"
      }
    },
    "/api/v1/domains": {
      "get": {
        "tags": [
          "domains"
        ],
        "operationId": "listDomains",
        "summary": "The account's domains, or one domain's daily totals and senders",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Days of history with `domain` (1 to 396, within the plan; default 30).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 396
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Domains, or one domain with setup, daily totals and senders.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainsAnswer"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The domain is not on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "domains"
        ],
        "operationId": "addDomain",
        "summary": "Add a domain (within the plan) and get its receiving address and setup step",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "A domain name such as example.com."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The domain with its receiving address and setup check.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainsAnswer"
                }
              }
            }
          },
          "400": {
            "description": "Not a domain name, or already on the account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Over the plan's domain count: add a domain to the plan, or upgrade.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "domains"
        ],
        "operationId": "updateDomain",
        "summary": "Turn alerts on or off, or mark services as not yours",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string"
                  },
                  "alerts": {
                    "type": "boolean"
                  },
                  "notMine": {
                    "type": "array",
                    "description": "Sender ids (from the health answer) that are not yours; replaces the list.",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The domain.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainsAnswer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The domain is not on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "domains"
        ],
        "operationId": "removeDomain",
        "summary": "Remove a domain and its history",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainsAnswer"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The domain is not on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/domains/health": {
      "get": {
        "tags": [
          "domains"
        ],
        "operationId": "domainHealth",
        "summary": "Is this domain's mail passing, and what record fixes it?",
        "description": "Over the last 14 days (7 on Free): `health` (passing, failing or no_reports, with one plain sentence), `fixes` (each failing sender named, with its steps, the SPF record to publish built from the one in DNS now, the DKIM records looked up live, and the service's setup page; unnamed sources together), `readiness` (yes, not_yet or done for the next step from p=none to quarantine to reject, with reasons and the DMARC record to publish) and `setup` (the receiving address step). DNS is read on every call.",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainHealth"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The domain is not on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/domains/overview": {
      "get": {
        "tags": [
          "domains"
        ],
        "operationId": "domainsOverview",
        "summary": "Every domain on the account, worst first",
        "responses": {
          "200": {
            "description": "The domains and how many the plan covers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainsOverview"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/usage": {
      "get": {
        "tags": [
          "account"
        ],
        "operationId": "getUsage",
        "summary": "Current-period usage meter",
        "responses": {
          "200": {
            "description": "Usage this calendar month.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageMeter"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me": {
      "get": {
        "tags": [
          "account"
        ],
        "operationId": "getAccount",
        "summary": "The calling account, its plan and limits",
        "responses": {
          "200": {
            "description": "Account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/keys": {
      "get": {
        "tags": [
          "account"
        ],
        "operationId": "listApiKeys",
        "summary": "List API keys (session only)",
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Keys without secrets.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeySummary"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "createApiKey",
        "summary": "Create an API key (session only)",
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new key; the secret is shown once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Key limit for the plan reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/keys/{id}": {
      "delete": {
        "tags": [
          "account"
        ],
        "operationId": "revokeApiKey",
        "summary": "Revoke an API key (session only)",
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Revoked."
          },
          "401": {
            "description": "Missing or invalid API key / session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such key on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Honour Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error; retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/openapi.json": {
      "get": {
        "tags": [
          "meta"
        ],
        "operationId": "getOpenApi",
        "summary": "This document",
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key as a bearer token."
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "session": {
        "type": "apiKey",
        "in": "cookie",
        "name": "session",
        "description": "Browser session of a signed-in user."
      }
    },
    "schemas": {
      "FeatureInput": {
        "type": "object",
        "properties": {
          "emails": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000,
              "description": "One email address."
            },
            "description": "The addresses to check, 1 to 100. Repeats are checked once."
          }
        },
        "required": [
          "emails"
        ],
        "description": "Input of the email check."
      },
      "CheckResponse": {
        "type": "object",
        "properties": {
          "result": {
            "type": "object",
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "email": {
                      "type": "string",
                      "description": "The address as given, trimmed."
                    },
                    "normalized": {
                      "description": "The address with its domain lower-cased in ASCII form; null when it cannot be read.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "verdict": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "risky",
                        "invalid",
                        "unknown"
                      ],
                      "description": "ok: written correctly and the domain accepts email. risky: a throwaway address or a likely typo. invalid: cannot receive email (badly written, no such domain, or no mail server). unknown: DNS did not answer just now; try again."
                    },
                    "reason": {
                      "type": "string",
                      "description": "One plain sentence saying why."
                    },
                    "checks": {
                      "type": "object",
                      "properties": {
                        "syntax": {
                          "type": "boolean",
                          "description": "Written correctly."
                        },
                        "domain": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "accepts-mail",
                                "no-mail",
                                "not-found",
                                "unknown"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "What DNS says about the domain; null when the address could not be read."
                        },
                        "disposable": {
                          "type": "boolean",
                          "description": "A throwaway (disposable) address service."
                        },
                        "role": {
                          "type": "boolean",
                          "description": "A shared role address such as info@ or support@."
                        },
                        "freeProvider": {
                          "type": "boolean",
                          "description": "A free mailbox provider such as gmail.com."
                        }
                      },
                      "required": [
                        "syntax",
                        "domain",
                        "disposable",
                        "role",
                        "freeProvider"
                      ],
                      "additionalProperties": false
                    },
                    "suggestion": {
                      "description": "The address it probably meant, when the domain looks like a typo.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "email",
                    "normalized",
                    "verdict",
                    "reason",
                    "checks",
                    "suggestion"
                  ],
                  "additionalProperties": false,
                  "description": "The check of one address."
                }
              },
              "summary": {
                "type": "object",
                "properties": {
                  "ok": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "risky": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "invalid": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unknown": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "ok",
                  "risky",
                  "invalid",
                  "unknown"
                ],
                "additionalProperties": false
              },
              "mailboxChecked": {
                "type": "boolean",
                "const": false,
                "description": "Always false: EmailSifter never contacts the mailbox itself."
              }
            },
            "required": [
              "results",
              "summary",
              "mailboxChecked"
            ],
            "additionalProperties": false,
            "description": "Result of the email check: one entry per distinct address."
          },
          "usage": {
            "type": "object",
            "properties": {
              "caller": {
                "type": "string",
                "enum": [
                  "anonymous",
                  "human",
                  "agent",
                  "api"
                ],
                "description": "Who called: anonymous (no key, counted per IP address), human (signed in), agent or api (an API key)."
              },
              "chargedCents": {
                "type": "number",
                "const": 0,
                "description": "Always 0: the checker is free."
              },
              "addressesLeftThisHour": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991,
                "description": "Addresses this caller may still check this hour under the fair-use limits."
              }
            },
            "required": [
              "caller",
              "chargedCents",
              "addressesLeftThisHour"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "result",
          "usage"
        ],
        "additionalProperties": false,
        "description": "The check results. The checker is free, within the fair-use limits."
      },
      "FilesListInput": {
        "type": "object",
        "properties": {
          "emails": {
            "minItems": 1,
            "maxItems": 10000,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 1000,
              "description": "One email address."
            },
            "description": "The addresses of a list, 1 to 10,000. Repeats and empty entries are counted once and not at all."
          }
        },
        "required": [
          "emails"
        ],
        "description": "A list of addresses, as the web app sends a file it has read in the browser."
      },
      "FileCheckResponse": {
        "type": "object",
        "properties": {
          "result": {
            "type": "object",
            "properties": {
              "file": {
                "type": "string",
                "description": "The same file with two columns added to every row, emailsifter_verdict and emailsifter_reason, in its own delimiter and line breaks."
              },
              "emailColumn": {
                "type": "object",
                "properties": {
                  "index": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Counted from 0."
                  },
                  "name": {
                    "type": "string"
                  },
                  "hasHeader": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "index",
                  "name",
                  "hasHeader"
                ],
                "additionalProperties": false
              },
              "delimiter": {
                "type": "string",
                "enum": [
                  ",",
                  ";",
                  "\t"
                ]
              },
              "encoding": {
                "type": "string",
                "enum": [
                  "utf-8",
                  "windows-1252"
                ],
                "description": "How the file was read. The result is UTF-8."
              },
              "summary": {
                "type": "object",
                "properties": {
                  "rows": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Data rows (the header and blank lines left out)."
                  },
                  "addresses": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Distinct addresses."
                  },
                  "repeats": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Rows whose address appeared in an earlier row."
                  },
                  "blank": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Rows with no address."
                  },
                  "ok": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "risky": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "invalid": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unknown": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "notChecked": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Distinct addresses not checked."
                  },
                  "throwaway": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Distinct throwaway addresses (counted in risky)."
                  },
                  "typos": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Distinct addresses whose domain looks like a typo."
                  }
                },
                "required": [
                  "rows",
                  "addresses",
                  "repeats",
                  "blank",
                  "ok",
                  "risky",
                  "invalid",
                  "unknown",
                  "notChecked",
                  "throwaway",
                  "typos"
                ],
                "additionalProperties": false,
                "description": "What the file or list holds, with the verdicts counted once per distinct address."
              },
              "mailboxChecked": {
                "type": "boolean",
                "const": false
              },
              "kept": {
                "type": "boolean",
                "const": false,
                "description": "Always false: the file is read in memory and not stored; this answer is the only copy."
              }
            },
            "required": [
              "file",
              "emailColumn",
              "delimiter",
              "encoding",
              "summary",
              "mailboxChecked",
              "kept"
            ],
            "additionalProperties": false
          },
          "usage": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "human",
                  "agent",
                  "api"
                ],
                "description": "Which door a request came through: human (web app), agent (MCP / agent frameworks), api (plain API calls)."
              },
              "counted": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991,
                "description": "Addresses counted against the monthly allowance: each distinct address with a verdict other than unknown."
              },
              "remaining": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991,
                "description": "Addresses left in this month’s allowance."
              }
            },
            "required": [
              "source",
              "counted",
              "remaining"
            ],
            "additionalProperties": false,
            "description": "How the request was counted."
          }
        },
        "required": [
          "result",
          "usage"
        ],
        "additionalProperties": false,
        "description": "The checked file and its summary."
      },
      "ListCheckResponse": {
        "type": "object",
        "properties": {
          "result": {
            "type": "object",
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "email": {
                      "type": "string",
                      "description": "The address as given, trimmed."
                    },
                    "verdict": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "risky",
                        "invalid",
                        "unknown"
                      ],
                      "description": "ok: written correctly and the domain accepts email. risky: a throwaway address or a likely typo. invalid: cannot receive email (badly written, no such domain, or no mail server). unknown: DNS did not answer just now; try again."
                    },
                    "reason": {
                      "type": "string",
                      "description": "One plain sentence saying why."
                    },
                    "suggestion": {
                      "description": "The address it probably meant, when the domain looks like a typo.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "checks": {
                      "type": "object",
                      "properties": {
                        "disposable": {
                          "type": "boolean",
                          "description": "A throwaway (disposable) address service."
                        }
                      },
                      "required": [
                        "disposable"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "email",
                    "verdict",
                    "reason",
                    "suggestion",
                    "checks"
                  ],
                  "additionalProperties": false,
                  "description": "The check of one distinct address in a list."
                }
              },
              "summary": {
                "type": "object",
                "properties": {
                  "rows": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Data rows (the header and blank lines left out)."
                  },
                  "addresses": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Distinct addresses."
                  },
                  "repeats": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Rows whose address appeared in an earlier row."
                  },
                  "blank": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Rows with no address."
                  },
                  "ok": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "risky": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "invalid": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unknown": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "notChecked": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Distinct addresses not checked."
                  },
                  "throwaway": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Distinct throwaway addresses (counted in risky)."
                  },
                  "typos": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Distinct addresses whose domain looks like a typo."
                  }
                },
                "required": [
                  "rows",
                  "addresses",
                  "repeats",
                  "blank",
                  "ok",
                  "risky",
                  "invalid",
                  "unknown",
                  "notChecked",
                  "throwaway",
                  "typos"
                ],
                "additionalProperties": false,
                "description": "What the file or list holds, with the verdicts counted once per distinct address."
              },
              "mailboxChecked": {
                "type": "boolean",
                "const": false
              },
              "kept": {
                "type": "boolean",
                "const": false,
                "description": "Always false: the addresses are not stored."
              }
            },
            "required": [
              "results",
              "summary",
              "mailboxChecked",
              "kept"
            ],
            "additionalProperties": false
          },
          "usage": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "human",
                  "agent",
                  "api"
                ],
                "description": "Which door a request came through: human (web app), agent (MCP / agent frameworks), api (plain API calls)."
              },
              "counted": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991,
                "description": "Addresses counted against the monthly allowance: each distinct address with a verdict other than unknown."
              },
              "remaining": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991,
                "description": "Addresses left in this month’s allowance."
              }
            },
            "required": [
              "source",
              "counted",
              "remaining"
            ],
            "additionalProperties": false,
            "description": "How the request was counted."
          }
        },
        "required": [
          "result",
          "usage"
        ],
        "additionalProperties": false,
        "description": "One result per distinct address of the list, and the summary."
      },
      "UsageMeter": {
        "type": "object",
        "properties": {
          "used": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "remaining": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "percent": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "exhausted": {
            "type": "boolean"
          },
          "period": {
            "type": "object",
            "properties": {
              "start": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "end": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "additionalProperties": false
          },
          "bySource": {
            "type": "object",
            "properties": {
              "human": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "agent": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "api": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "human",
              "agent",
              "api"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "used",
          "limit",
          "remaining",
          "percent",
          "exhausted",
          "period",
          "bySource"
        ],
        "additionalProperties": false,
        "description": "Addresses checked in files this calendar month (UTC) against the plan’s allowance, split by door. The free checker is not counted."
      },
      "Account": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "email": {
            "type": "string",
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "plan": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false,
            "description": "The free tier has id \"free\"."
          },
          "limits": {
            "type": "object",
            "properties": {
              "resultsPerMonth": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "apiKeys": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "seats": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "resultsPerMonth",
              "apiKeys",
              "seats"
            ],
            "additionalProperties": false
          },
          "subscription": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "interval": {
                    "type": "string",
                    "enum": [
                      "monthly",
                      "annual"
                    ]
                  },
                  "currentPeriodEnd": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "cancelAtPeriodEnd": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "status",
                  "interval",
                  "currentPeriodEnd",
                  "cancelAtPeriodEnd"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "email",
          "plan",
          "limits",
          "subscription"
        ],
        "additionalProperties": false,
        "description": "The calling account."
      },
      "ApiKeySummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string",
            "description": "First characters of the key, for recognising it. The full key is only returned once, on creation."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "createdAt",
          "lastUsedAt",
          "revokedAt"
        ],
        "additionalProperties": false,
        "description": "An API key without its secret."
      },
      "CreateApiKeyInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "description": "A label such as \"CI\" or \"Claude Desktop\"."
          }
        },
        "required": [
          "name"
        ],
        "description": "Input for creating an API key."
      },
      "CreateApiKeyResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "name": {
                "type": "string"
              },
              "prefix": {
                "type": "string",
                "description": "First characters of the key, for recognising it. The full key is only returned once, on creation."
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "lastUsedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revokedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "name",
              "prefix",
              "createdAt",
              "lastUsedAt",
              "revokedAt"
            ],
            "additionalProperties": false,
            "description": "An API key without its secret."
          },
          "secret": {
            "type": "string",
            "description": "The full API key. Shown once; store it now."
          }
        },
        "required": [
          "key",
          "secret"
        ],
        "additionalProperties": false,
        "description": "A freshly created API key."
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthorized",
                  "forbidden",
                  "not_found",
                  "invalid_input",
                  "quota_exhausted",
                  "rate_limited",
                  "payment_required",
                  "too_large",
                  "not_open",
                  "internal"
                ]
              },
              "message": {
                "type": "string"
              },
              "details": {}
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false,
        "description": "Error envelope returned with every non-2xx status."
      },
      "DomainsAnswer": {
        "type": "object",
        "additionalProperties": true
      },
      "DomainHealth": {
        "type": "object",
        "required": [
          "domain",
          "setup",
          "health",
          "readiness",
          "fixes"
        ],
        "properties": {
          "domain": {
            "type": "string"
          },
          "address": {
            "type": "string",
            "description": "The receiving address for this domain."
          },
          "setup": {
            "type": "object",
            "additionalProperties": true
          },
          "health": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "passing",
                  "failing",
                  "no_reports"
                ]
              },
              "sentence": {
                "type": "string"
              },
              "messages": {
                "type": "integer"
              },
              "passed": {
                "type": "integer"
              },
              "failed": {
                "type": "integer"
              },
              "yourFailed": {
                "type": "integer"
              }
            },
            "additionalProperties": true
          },
          "readiness": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "yes",
                  "not_yet",
                  "done"
                ]
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "quarantine",
                  "reject",
                  null
                ]
              },
              "headline": {
                "type": "string"
              },
              "reasons": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "record": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "additionalProperties": true
          },
          "fixes": {
            "type": "object",
            "additionalProperties": true
          },
          "notMine": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DomainsOverview": {
        "type": "object",
        "properties": {
          "allowance": {
            "type": "integer"
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      }
    }
  }
}