{
  "openapi": "3.1.0",
  "info": {
    "title": "ColdAgentAI API",
    "version": "0.1.0",
    "description": "ColdAgentAI runs cold email campaigns for you: connect mailboxes, add leads, define a sequence, start the campaign and read replies. The capabilities your account can use are listed at GET /v1/capabilities, and one that is not available answers 503 provider_unavailable. Machine-readable docs: /llms.txt and /docs/<page>.md."
  },
  "tags": [
    {
      "name": "account"
    },
    {
      "name": "autopilot"
    },
    {
      "name": "billing"
    },
    {
      "name": "blocklist"
    },
    {
      "name": "campaigns"
    },
    {
      "name": "capabilities"
    },
    {
      "name": "credits"
    },
    {
      "name": "docs"
    },
    {
      "name": "domains"
    },
    {
      "name": "email-verification"
    },
    {
      "name": "health"
    },
    {
      "name": "icps"
    },
    {
      "name": "import"
    },
    {
      "name": "leads"
    },
    {
      "name": "llms.txt"
    },
    {
      "name": "mailbox-orders"
    },
    {
      "name": "mailboxes"
    },
    {
      "name": "mcp"
    },
    {
      "name": "openapi.json"
    },
    {
      "name": "orders"
    },
    {
      "name": "prospects"
    },
    {
      "name": "replies"
    },
    {
      "name": "system"
    },
    {
      "name": "tools"
    },
    {
      "name": "unsubscribe"
    },
    {
      "name": "usage"
    },
    {
      "name": "webhooks"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    },
    {
      "ApiKeyHeader": []
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "get_root",
        "tags": [
          "system"
        ],
        "summary": "Pointer to the machine-readable docs",
        "description": "Plain text that points to /llms.txt and /openapi.json.",
        "x-scope": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "get_health",
        "tags": [
          "health"
        ],
        "summary": "Liveness check",
        "description": "Returns {\"status\": \"ok\"} while the server is running. Does not touch any vendor.",
        "x-scope": "public",
        "x-metered": false,
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetHealthResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "get_openapi_json",
        "tags": [
          "openapi.json"
        ],
        "summary": "OpenAPI 3.1 document",
        "description": "Every endpoint with its schemas, errors and per-operation scope (`x-scope`).",
        "x-scope": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOpenapiJsonResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "get_llms_txt",
        "tags": [
          "llms.txt"
        ],
        "summary": "Plain-text index for AI agents",
        "description": "How to use the API, the pricing status (owner-approved), every endpoint and the capabilities that are unavailable on this server and why.",
        "x-scope": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/docs/{name}": {
      "get": {
        "operationId": "get_docs_by_name",
        "tags": [
          "docs"
        ],
        "summary": "Markdown documentation page",
        "description": "Pages: api, plans, capabilities, errors. Add a .md suffix or send Accept: text/markdown for markdown; browsers get a readable HTML page.",
        "x-scope": "public",
        "security": [],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/export": {
      "get": {
        "operationId": "get_account_export",
        "tags": [
          "account"
        ],
        "summary": "Everything the account holds, as one JSON document",
        "description": "Every row the account has: profile, keys (by prefix), credit ledger, invoices and payments, domains, mailboxes, campaigns, leads, replies and the rest. Secrets (key hashes, tokens, sealed mailbox credentials) are left out and named under redacted_columns. Three requests per account every ten minutes.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAccountExportResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "operationId": "get_account",
        "tags": [
          "account"
        ],
        "summary": "Account, plan, credits, keys and usage",
        "description": "Returns the account, its plan and subscription, both credit wallets (plan credits and never-expiring top-up credits), the API keys with their scopes (never the key itself) and usage against the plan caps.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAccountResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "get_usage",
        "tags": [
          "usage"
        ],
        "summary": "Usage against plan caps for the current billing period",
        "description": "Emails sent, active contacts and IMAP mailboxes against the plan caps, for the subscription period (or the UTC calendar month without a subscription), plus the credit wallets.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUsageResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/keys": {
      "post": {
        "operationId": "post_account_keys",
        "tags": [
          "account"
        ],
        "summary": "Create an API key",
        "description": "Creates a key for this account with the chosen scope (read or write; read by default). The secret is in the response once and cannot be shown again. A key can only be created with a write key.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostAccountKeysRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostAccountKeysResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/keys/{id}": {
      "delete": {
        "operationId": "delete_account_keys_by_id",
        "tags": [
          "account"
        ],
        "summary": "Revoke an API key",
        "description": "Revokes one of this account's keys immediately. A revoked key is rejected with 401 from then on.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteAccountKeysByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/capabilities": {
      "get": {
        "operationId": "get_capabilities",
        "tags": [
          "capabilities"
        ],
        "summary": "What works on this server and what is blocked",
        "description": "Lists every capability slot (mailbox transports, domain registrars, mailbox provisioners, email verifiers, contact data, blocklists, seed panels, competitor import, plus the platform language model and billing) with each configured adapter, whether it is available and, when it is not, the blocker and the reason. Agents should read this before choosing a flow. Nothing blocked is ever simulated.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCapabilitiesResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/compliance": {
      "get": {
        "operationId": "get_account_compliance",
        "tags": [
          "account"
        ],
        "summary": "Postal address and sender identity",
        "description": "Returns the postal address and sender identity printed in the footer of every campaign email.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAccountComplianceResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "put_account_compliance",
        "tags": [
          "account"
        ],
        "summary": "Set the postal address and sender identity",
        "description": "Sets the physical postal address that CAN-SPAM requires in every commercial email, and optionally the sender identity shown with it. Send either or both; a part you omit stays as it is. A campaign cannot start until the postal address is set.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutAccountComplianceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PutAccountComplianceResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes": {
      "get": {
        "operationId": "get_mailboxes",
        "tags": [
          "mailboxes"
        ],
        "summary": "List connected mailboxes",
        "description": "The mailboxes in this account, oldest first, one page at a time, with status, daily limit, ramp setting and health. Pass next_cursor as cursor for the next page. Credentials are never returned.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Items per page, 1 to 100 (default 20)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "description": "`next_cursor` from the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetMailboxesResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_mailboxes",
        "tags": [
          "mailboxes"
        ],
        "summary": "Connect an IMAP/SMTP mailbox",
        "description": "Connects any mailbox that offers IMAP and SMTP. The connection is verified against the mail server first and nothing is stored if it fails. The credentials are encrypted at rest and never returned. Counts toward the plan IMAP mailbox cap. Gmail and Microsoft 365 use their own connect endpoints.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMailboxesRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostMailboxesResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/gmail/connect": {
      "post": {
        "operationId": "post_mailboxes_gmail_connect",
        "tags": [
          "mailboxes"
        ],
        "summary": "Start connecting a Gmail mailbox",
        "description": "Returns the Gmail consent URL for the mailbox owner to open and approve. After approval the provider redirects to a page on this API that shows a code and a state: the owner gives both back to you, and you finish with POST /v1/mailboxes/gmail/complete using this account's key within 10 minutes. Gmail connects up to 100 distinct Google accounts, counted across all Meralume Labs products; beyond that this answers 503. Connect over IMAP/SMTP instead.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMailboxesGmailConnectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostMailboxesGmailConnectResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/gmail/callback": {
      "get": {
        "operationId": "get_mailboxes_gmail_callback",
        "tags": [
          "mailboxes"
        ],
        "summary": "Gmail OAuth callback",
        "description": "Where Gmail sends the browser after the person approves. Not called by API clients. Shows the authorization code and the state for the person to give to whoever asked them to connect the mailbox, and stores nothing: the mailbox is stored only when that code and state reach POST /v1/mailboxes/gmail/complete with the key of the account that started the connection.",
        "x-scope": "public",
        "security": [],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 4096
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 4096
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/gmail/complete": {
      "post": {
        "operationId": "post_mailboxes_gmail_complete",
        "tags": [
          "mailboxes"
        ],
        "summary": "Finish connecting a Gmail mailbox",
        "description": "Takes the code and state the mailbox owner got on the approval page, exchanges the code and stores the mailbox in this account. The state must come from a connect request made with this account's key, be used once, and be under 10 minutes old; any other state answers 400 and exchanges nothing. Connecting an address that is already connected replaces its stored credentials.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMailboxesGmailCompleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostMailboxesGmailCompleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/microsoft/connect": {
      "post": {
        "operationId": "post_mailboxes_microsoft_connect",
        "tags": [
          "mailboxes"
        ],
        "summary": "Start connecting a Microsoft 365 mailbox",
        "description": "Returns the Microsoft 365 consent URL for the mailbox owner to open and approve. After approval the provider redirects to a page on this API that shows a code and a state: the owner gives both back to you, and you finish with POST /v1/mailboxes/microsoft/complete using this account's key within 10 minutes. Needs a Microsoft Entra app registration on the server; without one this answers 503 naming credentials.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMailboxesMicrosoftConnectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostMailboxesMicrosoftConnectResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/microsoft/callback": {
      "get": {
        "operationId": "get_mailboxes_microsoft_callback",
        "tags": [
          "mailboxes"
        ],
        "summary": "Microsoft 365 OAuth callback",
        "description": "Where Microsoft 365 sends the browser after the person approves. Not called by API clients. Shows the authorization code and the state for the person to give to whoever asked them to connect the mailbox, and stores nothing: the mailbox is stored only when that code and state reach POST /v1/mailboxes/microsoft/complete with the key of the account that started the connection.",
        "x-scope": "public",
        "security": [],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 4096
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 4096
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/microsoft/complete": {
      "post": {
        "operationId": "post_mailboxes_microsoft_complete",
        "tags": [
          "mailboxes"
        ],
        "summary": "Finish connecting a Microsoft 365 mailbox",
        "description": "Takes the code and state the mailbox owner got on the approval page, exchanges the code and stores the mailbox in this account. The state must come from a connect request made with this account's key, be used once, and be under 10 minutes old; any other state answers 400 and exchanges nothing. Connecting an address that is already connected replaces its stored credentials.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMailboxesMicrosoftCompleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostMailboxesMicrosoftCompleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/{id}": {
      "get": {
        "operationId": "get_mailboxes_by_id",
        "tags": [
          "mailboxes"
        ],
        "summary": "Get a mailbox",
        "description": "One mailbox with its status, limits and health.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetMailboxesByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_mailboxes_by_id",
        "tags": [
          "mailboxes"
        ],
        "summary": "Change a mailbox",
        "description": "Changes the display name, the daily send limit (0 to 2000) or the volume ramp. Turning the ramp on starts it now: 5 emails a day in week 1, 5 more each week, holding at 50 a day. The ramp only limits our own sending and is off by default.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchMailboxesByIdRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatchMailboxesByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_mailboxes_by_id",
        "tags": [
          "mailboxes"
        ],
        "summary": "Disconnect and delete a mailbox",
        "description": "Removes the mailbox and its stored credentials. Campaigns that rotated across it stop using it.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteMailboxesByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/{id}/check": {
      "post": {
        "operationId": "post_mailboxes_by_id_check",
        "tags": [
          "mailboxes"
        ],
        "summary": "Check a mailbox connection and its domain authentication",
        "description": "Proves the stored credentials still work (without sending anything) and checks SPF, DKIM and DMARC for the mailbox domain. DKIM selectors cannot be listed in DNS, so common ones are tried unless you pass your own. A passing check on a disconnected mailbox reconnects it.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMailboxesByIdCheckRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostMailboxesByIdCheckResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns": {
      "get": {
        "operationId": "get_campaigns",
        "tags": [
          "campaigns"
        ],
        "summary": "List campaigns",
        "description": "Campaigns in this account, oldest first, one page at a time. Pass next_cursor as cursor for the next page.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "active",
                "paused",
                "completed"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCampaignsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_campaigns",
        "tags": [
          "campaigns"
        ],
        "summary": "Create a campaign",
        "description": "Creates a draft campaign with its schedule (IANA time zone, sending days, daily window), optional daily limit, stop-on-reply (default on) and the mailboxes it rotates across. Add the sequence and leads, then start it.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostCampaignsRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostCampaignsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}": {
      "get": {
        "operationId": "get_campaigns_by_id",
        "tags": [
          "campaigns"
        ],
        "summary": "Get a campaign",
        "description": "One campaign with its schedule, limits, status and mailbox rotation.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCampaignsByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_campaigns_by_id",
        "tags": [
          "campaigns"
        ],
        "summary": "Change a campaign",
        "description": "Changes the name, schedule, daily limit, stop-on-reply or mailbox rotation. Send only the fields to change; mailbox_ids replaces the whole rotation set. Takes effect on the next send cycle, also for an active campaign.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchCampaignsByIdRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatchCampaignsByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_campaigns_by_id",
        "tags": [
          "campaigns"
        ],
        "summary": "Delete a campaign",
        "description": "Deletes a campaign that has never sent anything, with its steps and lead enrollments. A campaign with send history, or an active one, is refused: pause it instead.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteCampaignsByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/sequence": {
      "get": {
        "operationId": "get_campaigns_by_id_sequence",
        "tags": [
          "campaigns"
        ],
        "summary": "Get the sequence",
        "description": "The campaign steps in order, each with its wait in days, A/B subject variants and body.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCampaignsByIdSequenceResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "put_campaigns_by_id_sequence",
        "tags": [
          "campaigns"
        ],
        "summary": "Replace the sequence",
        "description": "Replaces the whole sequence atomically. Each step has wait_days after the previous step, 1 to 26 subject variants (A/B, one variant per lead chosen deterministically), and a body. Merge fields look like {{first_name|there}} (the text after | is the fallback; a field with no value and no fallback fails that send). Spintax like {Hi|Hello} is expanded per lead and validated here.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutCampaignsByIdSequenceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PutCampaignsByIdSequenceResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/render-check": {
      "get": {
        "operationId": "get_campaigns_by_id_render_check",
        "tags": [
          "campaigns"
        ],
        "summary": "Check every email before starting",
        "description": "Renders every email still to be sent, for every lead that will be mailed, exactly as the send cycle will (same subject variant per lead, same spintax, same merge rules), and reports how many render and, for each lead that would fail, the step, the subject or body and the merge field with no value and no fallback. Leads that will never be mailed (suppressed, verified invalid, bounced, unsubscribed, already replied) are left out. Sends nothing and changes nothing. POST /v1/campaigns/{id}/start runs the same check and refuses while any email fails.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCampaignsByIdRenderCheckResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/start": {
      "post": {
        "operationId": "post_campaigns_by_id_start",
        "tags": [
          "campaigns"
        ],
        "summary": "Start a campaign",
        "description": "Makes the campaign active so the send cycle mails its leads inside the schedule. Refused until the account has a postal address, the campaign has at least one connected mailbox and at least one step, and the kill switch is off. It also renders every email first (see GET /v1/campaigns/{id}/render-check) and is refused while any lead has an email that would fail, for example a merge field with no value and no fallback; the message names the leads and fields. Send skip_failing_leads: true to start anyway: those leads are skipped for this campaign (their remaining steps are cancelled and never sent, even if their fields are fixed later) and every other lead is mailed. Nothing is sent by this call itself; the send cycle does the sending. Starting an active campaign changes nothing and skips nobody; the check applies when starting a draft or resuming a paused campaign.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostCampaignsByIdStartRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostCampaignsByIdStartResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/pause": {
      "post": {
        "operationId": "post_campaigns_by_id_pause",
        "tags": [
          "campaigns"
        ],
        "summary": "Pause a campaign",
        "description": "Stops further sends for the campaign at the next send cycle. Leads keep their place in the sequence; start it again to continue. Pausing a paused campaign changes nothing.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostCampaignsByIdPauseResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/preview": {
      "post": {
        "operationId": "post_campaigns_by_id_preview",
        "tags": [
          "campaigns"
        ],
        "summary": "Preview a step for a real lead",
        "description": "Renders one step exactly as it would be sent to one of your leads: merge fields filled, spintax expanded, subject variant chosen, footer added. Sends nothing and changes nothing. A merge field with no value and no fallback is reported as invalid_input, as it would fail the real send.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostCampaignsByIdPreviewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostCampaignsByIdPreviewResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/analytics": {
      "get": {
        "operationId": "get_campaigns_by_id_analytics",
        "tags": [
          "campaigns"
        ],
        "summary": "Campaign analytics",
        "description": "Sent, replied, positive replies, bounces and unsubscribes for the campaign, counted per distinct lead from the send log, plus a per-step, per-variant readout for A/B subjects. Rates are null until something has been sent.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCampaignsByIdAnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/leads": {
      "post": {
        "operationId": "post_campaigns_by_id_leads",
        "tags": [
          "campaigns"
        ],
        "summary": "Add leads to a campaign",
        "description": "Accepts at most 1,000 leads per call, deduplicated by email (case-insensitive) against the request and the account. A row that cannot be added is reported with the reason and does not fail the others: an invalid address, an address on the suppression list, or a new address beyond the plan active-contact cap. An address already in the account is updated with the fields given and enrolled in this campaign.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostCampaignsByIdLeadsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostCampaignsByIdLeadsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_campaigns_by_id_leads",
        "tags": [
          "campaigns"
        ],
        "summary": "List the leads in a campaign",
        "description": "Leads enrolled in the campaign, oldest first, optionally filtered by status. Pass next_cursor as cursor for the next page.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "contacted",
                "replied",
                "interested",
                "meeting_booked",
                "not_interested",
                "bounced",
                "unsubscribed",
                "blocked"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCampaignsByIdLeadsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/leads/import": {
      "post": {
        "operationId": "post_campaigns_by_id_leads_import",
        "tags": [
          "campaigns"
        ],
        "summary": "Import leads from CSV",
        "description": "Send the CSV text as the request body (Content-Type text/plain, at most 5 MB and 1,000 data rows). The first row is the header; the email column is found by name (email, work email, and similar). First name, last name, company and title are mapped from their usual headers, and every other column becomes a custom field usable as a merge field. layout=smartlead reads a Smartlead export and skips its activity columns. Duplicate headers are made unique, a byte order mark and CRLF line ends are handled, and cells starting with = + - @ are kept as text and counted in flagged_cells. Suppression, plan cap and per-row reporting work as for the JSON endpoint.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "layout",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "generic",
                "smartlead"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostCampaignsByIdLeadsImportResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/leads/{id}": {
      "patch": {
        "operationId": "patch_leads_by_id",
        "tags": [
          "leads"
        ],
        "summary": "Change a lead status",
        "description": "Sets the lead status (for example interested or not_interested). Setting unsubscribed honors an opt-out: the address is suppressed and its pending sends are cancelled. A lead that opted out cannot be moved to another status.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchLeadsByIdRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatchLeadsByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/blocklist": {
      "get": {
        "operationId": "get_blocklist",
        "tags": [
          "blocklist"
        ],
        "summary": "List the do-not-contact list",
        "description": "Suppressed addresses and domains for this account, oldest first. A domain entry also covers its subdomains. Nothing on this list is ever mailed.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "email",
                "domain"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBlocklistResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_blocklist",
        "tags": [
          "blocklist"
        ],
        "summary": "Add an address or domain to the do-not-contact list",
        "description": "Suppresses an email address or a whole domain (kind is inferred from the value). Idempotent: adding a value that is already listed returns the existing entry with created false. Entries that record a recipient opting out can never be removed.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostBlocklistRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostBlocklistResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/blocklist/{id}": {
      "delete": {
        "operationId": "delete_blocklist_by_id",
        "tags": [
          "blocklist"
        ],
        "summary": "Remove an entry from the do-not-contact list",
        "description": "Removes a manual or imported entry. Entries recording an unsubscribe, complaint or opt-out request are protected and answer 403.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteBlocklistByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/unsubscribe/{token}": {
      "get": {
        "operationId": "get_unsubscribe_by_token",
        "tags": [
          "unsubscribe"
        ],
        "summary": "Unsubscribe confirmation page",
        "description": "A page that asks the recipient to confirm unsubscribing. It changes nothing by itself.",
        "x-scope": "public",
        "x-metered": false,
        "security": [],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_unsubscribe_by_token",
        "tags": [
          "unsubscribe"
        ],
        "summary": "Unsubscribe (RFC 8058 one-click and confirmed)",
        "description": "Unsubscribes the recipient the token was issued for: the address is suppressed for the sender account and the rest of its sequences are cancelled. Accepts the `List-Unsubscribe=One-Click` form body that mail clients send, or the confirmation form. Idempotent. A token that was altered or does not verify answers 400 and changes nothing.",
        "x-scope": "public",
        "x-metered": false,
        "security": [],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/replies": {
      "get": {
        "operationId": "get_replies",
        "tags": [
          "replies"
        ],
        "summary": "List replies (unibox)",
        "description": "Replies to your campaign emails across every mailbox, newest first, optionally filtered by category or campaign. Categories are assigned by fixed rules (out of office, unsubscribe requests and bounces) and by explicit marks; meeting_booked is only ever set by an explicit mark.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "interested",
                "not_interested",
                "out_of_office",
                "unsubscribe",
                "bounce",
                "other",
                "meeting_booked"
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepliesResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/replies/{id}/category": {
      "patch": {
        "operationId": "patch_replies_by_id_category",
        "tags": [
          "replies"
        ],
        "summary": "Mark a reply category",
        "description": "Sets the category of a reply by an explicit mark, which is the only way to set meeting_booked. The lead status follows (interested, not_interested, meeting_booked, replied). Marking a reply unsubscribe opts the sender out and cancels their remaining sends.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRepliesByIdCategoryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatchRepliesByIdCategoryResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/replies/{id}/draft": {
      "post": {
        "operationId": "post_replies_by_id_draft",
        "tags": [
          "replies"
        ],
        "summary": "Draft an answer to a reply with AI",
        "description": "Asks the language model for a short suggested answer. Nothing is sent and nothing is stored: review it, then send with POST /v1/replies/{id}/send. Refused for unsubscribe requests, bounces and out-of-office replies, for an email whose formatting could hide text from its reader, and while the account kill switch is on. 503 when no language model is configured on this server. Costs no credit; limited to 200 drafts per account per UTC day.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostRepliesByIdDraftRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostRepliesByIdDraftResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/replies/{id}/send": {
      "post": {
        "operationId": "post_replies_by_id_send",
        "tags": [
          "replies"
        ],
        "summary": "Send an answer to a reply",
        "description": "Sends your answer to the person who replied, from the mailbox that received the reply and in the same thread, with the compliance footer and unsubscribe headers. Refused while the kill switch is on, for unsubscribe requests and bounces, for anyone on the suppression list or who opted out, and until the account has a postal address.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostRepliesByIdSendRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostRepliesByIdSendResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/email-verification": {
      "post": {
        "operationId": "post_email_verification",
        "tags": [
          "email-verification"
        ],
        "summary": "Verify a batch of email addresses",
        "description": "Verifies up to 1,000 addresses. Each is checked by one provider, and by a second when the first answer is not a clear valid or invalid. Billed per provider check through the credit wallet (plan credits first). A recent result is reused for free. During the trial at most 100 addresses are verified. Send an Idempotency-Key header to make a retry free; the same key with different addresses is refused.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostEmailVerificationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostEmailVerificationResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "The trial allowance is used up. Error code: trial_allowance_exhausted.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/email-verification/{id}": {
      "get": {
        "operationId": "get_email_verification_by_id",
        "tags": [
          "email-verification"
        ],
        "summary": "Read an earlier verification batch",
        "description": "Returns the stored outcome of a batch created by this account. It never calls a provider or charges credits.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEmailVerificationByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/credits": {
      "get": {
        "operationId": "get_credits",
        "tags": [
          "credits"
        ],
        "summary": "Credit balances",
        "description": "Returns the plan wallet (granted each billing month, expires unspent at the month end, spent first) and the top-up wallet (bought in packs, never expires), plus the pack prices.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCreditsResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/checkout": {
      "post": {
        "operationId": "post_billing_checkout",
        "tags": [
          "billing"
        ],
        "summary": "Start a Stripe checkout for a plan or a credit pack",
        "description": "Creates a Stripe Checkout Session and returns its url. A plan checkout bills monthly or annually (annual is 10 months for 12) and, while the account is eligible (it never held a plan and its trial was not used), starts with a 7-day trial that costs $1 at signup (a one-time line beside the plan, cards only) and charges the plan nothing until the trial ends (it grants 12 credits in place of plan credits, and they end with the trial); a credit pack is one of the sizes 1000, 2000, 3000, 4000, 5000, 10000, 20000, 50000, 100000 credits and never expires. A first paid month can be refunded within 7 days; a person decides each refund. Credits and the plan arrive only after Stripe confirms payment. Returns 409 conflict when the account already has a subscription, and 503 provider_unavailable with the fix named when Stripe or the return site is not configured.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostBillingCheckoutRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostBillingCheckoutResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the current state of the resource. Error code: conflict.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/start-plan": {
      "post": {
        "operationId": "post_billing_start_plan",
        "tags": [
          "billing"
        ],
        "summary": "Start my plan now (ends the trial early)",
        "description": "The customer's own click. Ends the running trial now, so the plan's first invoice is raised and charged at once and the plan's full credits and caps start. Nothing else ever starts the plan early: a used-up trial allowance only pauses credit spending (trial_allowance_exhausted). Answers 409 when the account has no running trial. A read key cannot do this.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostBillingStartPlanResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the current state of the resource. Error code: conflict.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/portal": {
      "post": {
        "operationId": "post_billing_portal",
        "tags": [
          "billing"
        ],
        "summary": "Open the Stripe customer portal",
        "description": "Returns a Stripe customer portal url for this account, where the customer changes the card, reads invoices and cancels. A cancel ends the plan at the end of the period already paid for, with no reason asked. Send `flow: \"cancel\"` to open straight on the cancel step for the running plan (one click to confirm); 404 when there is no running plan to cancel. The account needs a Stripe customer, which a checkout creates.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostBillingPortalRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostBillingPortalResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Nothing exists at this address. Error code: not_found.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing": {
      "get": {
        "operationId": "get_billing",
        "tags": [
          "billing"
        ],
        "summary": "Plan, invoices and what can be bought",
        "description": "The account's plan and subscription state, its recent invoices and the offers on sale, from the local copy of Stripe's state. Never calls Stripe.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBillingResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/webhook": {
      "post": {
        "operationId": "post_billing_webhook",
        "tags": [
          "billing"
        ],
        "summary": "Stripe webhook receiver",
        "description": "Public endpoint for Stripe. The signature over the exact raw body is verified first (5 minute tolerance); a bad signature answers 400 signature_invalid and writes nothing. A verified event is applied once, in one transaction with its record: a paid subscription invoice grants that period's plan credits, a paid credit pack grants top-up credits, subscription events update the plan, and a dispute is queued for review. A replay answers 200 and changes nothing.",
        "x-scope": "public",
        "x-metered": false,
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostBillingWebhookResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request signature is missing or does not match. Error code: signature_invalid.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/autopilot/runs": {
      "post": {
        "operationId": "post_autopilot_runs",
        "tags": [
          "autopilot"
        ],
        "summary": "Create an autopilot run",
        "description": "Reads the website, derives an ideal customer profile and a 4-step sequence with the language model, sizes the audience for free, drafts a DRAFT campaign and stops at one approval record that lists who, what and the cost. Nothing is revealed, verified, ordered or sent before approval. One run may wait for approval at a time, and at most 5 runs can be created in 24 hours. Reply mode is \"draft\" (an AI draft a person sends) unless \"auto\" is asked for here. Returns 503 provider_unavailable when no language model is configured. Done-for-you domain and mailbox orders need billing for them on the account; without it they answer 503 provider_unavailable with the blocker named.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostAutopilotRunsRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostAutopilotRunsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "The trial allowance is used up. Error code: trial_allowance_exhausted.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_autopilot_runs",
        "tags": [
          "autopilot"
        ],
        "summary": "List autopilot runs",
        "description": "This account's runs, oldest first, one page at a time. Filter by status.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Items per page, 1 to 100 (default 20)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "description": "`next_cursor` from the previous page."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "estimating",
                "awaiting_approval",
                "approved",
                "running",
                "paused",
                "completed",
                "cancelled",
                "failed"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAutopilotRunsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/autopilot/runs/{id}": {
      "get": {
        "operationId": "get_autopilot_runs_by_id",
        "tags": [
          "autopilot"
        ],
        "summary": "Read one autopilot run",
        "description": "The run with its plan (who, what, cost, blocked steps), step states and approval record, if any.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAutopilotRunsByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/autopilot/runs/{id}/approve": {
      "post": {
        "operationId": "post_autopilot_runs_by_id_approve",
        "tags": [
          "autopilot"
        ],
        "summary": "Approve an autopilot run",
        "description": "Approves the plan exactly as shown and starts the run. A write key may approve a run that is not a starter kit; a starter kit run returns 403 and must be approved in the app as a person. One approval per run: a second call is refused. The wallet must still cover the plan's worst-case cost. Blocked while the kill switch is on.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostAutopilotRunsByIdApproveResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "The trial allowance is used up. Error code: trial_allowance_exhausted.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/autopilot/runs/{id}/resume": {
      "post": {
        "operationId": "post_autopilot_runs_by_id_resume",
        "tags": [
          "autopilot"
        ],
        "summary": "Resume a paused autopilot run",
        "description": "Retries a paused run's unfinished steps, for example after connecting a mailbox or configuring a vendor. Blocked while the kill switch is on.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostAutopilotRunsByIdResumeResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/autopilot/runs/{id}/cancel": {
      "post": {
        "operationId": "post_autopilot_runs_by_id_cancel",
        "tags": [
          "autopilot"
        ],
        "summary": "Cancel an autopilot run",
        "description": "Cancels a run that has not finished and pauses its campaign if it had started. A finished run cannot be cancelled.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostAutopilotRunsByIdCancelResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/autopilot/kill-switch": {
      "get": {
        "operationId": "get_autopilot_kill_switch",
        "tags": [
          "autopilot"
        ],
        "summary": "Read the kill switch",
        "description": "Whether this account's kill switch is on. While it is on, sending, top-ups, reply drafting and autopilot spending all stop.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAutopilotKillSwitchResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_autopilot_kill_switch",
        "tags": [
          "autopilot"
        ],
        "summary": "Turn the kill switch on or off",
        "description": "Turning it on pauses the account's running autopilot runs and stops sending, top-ups, reply drafting and autopilot spending at once. Turning it off does not resume paused runs; resume each with POST /v1/autopilot/runs/{id}/resume.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostAutopilotKillSwitchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostAutopilotKillSwitchResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/search": {
      "get": {
        "operationId": "get_domains_search",
        "tags": [
          "domains"
        ],
        "summary": "Search sending domains",
        "description": "Checks whether a name is available as a .com or .org domain and the price. A name without a dot is checked as .com and .org. Free: nothing is registered or reserved. Returns 503 provider_unavailable with the blocker named when no registrar is configured or funded.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "A name such as \"acme\" or \"acme.com\"."
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetDomainsSearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/orders": {
      "post": {
        "operationId": "post_domains_orders",
        "tags": [
          "domains"
        ],
        "summary": "Order a sending domain",
        "description": "Registers a .com or .org domain. Final and paid: send `confirmed: true` and `max_price_cents`; the order is refused when the live price is above it. The customer is charged before the registrar is paid. Returns 503 provider_unavailable (blocker named) when no registrar is funded or customer billing for done-for-you orders is not set up. Returns the order, which ends connected or failed.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostDomainsOrdersRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDomainsOrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailbox-orders": {
      "post": {
        "operationId": "post_mailbox_orders",
        "tags": [
          "mailbox-orders"
        ],
        "summary": "Order done-for-you mailboxes",
        "description": "Orders 1 to 10 mailboxes on a domain you own. Final and paid: send `confirmed: true` and `max_price_cents` (setup plus the first month); the order is refused when the live quote is above it. The customer is charged before the vendor is paid. The order is `provisioning` until the vendor hands over the mailboxes; GET /v1/orders/{id} then connects them. Returns 503 provider_unavailable (blocker named) when no provisioner is under contract or customer billing for done-for-you orders is not set up.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMailboxOrdersRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostMailboxOrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders": {
      "get": {
        "operationId": "get_orders",
        "tags": [
          "orders"
        ],
        "summary": "List done-for-you orders",
        "description": "This account's domain and mailbox orders, oldest first. Mailbox orders that are still provisioning are checked with the vendor, and their mailboxes are connected when the vendor hands them over.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Items per page, 1 to 100 (default 20)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "description": "`next_cursor` from the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{id}": {
      "get": {
        "operationId": "get_orders_by_id",
        "tags": [
          "orders"
        ],
        "summary": "Read one done-for-you order",
        "description": "The order. A mailbox order that is still provisioning is checked with the vendor first, and its mailboxes are connected when the vendor hands them over.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrdersByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/prospects/source": {
      "post": {
        "operationId": "post_prospects_source",
        "tags": [
          "prospects"
        ],
        "summary": "Find and reveal prospects",
        "description": "Searches the licensed contact-data provider for an ideal customer profile (free) and reveals up to 500 contacts (default 50) as leads, at 1 credit per contact delivered. People on your suppression list and contacts you already hold are dropped and not charged; a partial answer is charged only for what was delivered. Give an `icp` or the id of a saved one. Returns 503 provider_unavailable (blocker vendor_contract) with zero credits charged when no licensed provider is configured. Send an Idempotency-Key header to make a retry free. Blocked while the kill switch is on.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostProspectsSourceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostProspectsSourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "The trial allowance is used up. Error code: trial_allowance_exhausted.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/icps": {
      "post": {
        "operationId": "post_icps",
        "tags": [
          "icps"
        ],
        "summary": "Save an ideal customer profile",
        "description": "Stores a named profile (titles, seniorities, industries, locations, company size, keywords) to reuse with POST /v1/prospects/source. Free.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostIcpsRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostIcpsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_icps",
        "tags": [
          "icps"
        ],
        "summary": "List saved ideal customer profiles",
        "description": "This account's saved profiles, oldest first, one page at a time.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Items per page, 1 to 100 (default 20)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "description": "`next_cursor` from the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetIcpsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks": {
      "post": {
        "operationId": "post_webhooks",
        "tags": [
          "webhooks"
        ],
        "summary": "Register a webhook endpoint",
        "description": "Registers an https URL for the events you choose (EmailSent, EmailReply, EmailBounce, LeadCreated, EmailUnsubscribe, CreditBalanceLow, AutopilotRunStatusChanged, DfyOrderCompleted, MailboxDisconnected, CampaignCompleted). The response includes the signing secret once; it cannot be shown again. Every delivery carries X-ColdAgentAI-Timestamp and X-ColdAgentAI-Signature (v1=hex HMAC-SHA256 of \"timestamp.body\"); reject anything more than 5 minutes old. Private, loopback and metadata addresses are refused, at registration and again at every delivery. At most 20 endpoints per account.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostWebhooksRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostWebhooksResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_webhooks",
        "tags": [
          "webhooks"
        ],
        "summary": "List webhook endpoints",
        "description": "This account's endpoints, oldest first. The signing secret is never returned.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Items per page, 1 to 100 (default 20)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "description": "`next_cursor` from the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWebhooksResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{id}": {
      "patch": {
        "operationId": "patch_webhooks_by_id",
        "tags": [
          "webhooks"
        ],
        "summary": "Change a webhook endpoint",
        "description": "Changes the URL, the events, the description or whether it is enabled. Endpoints created by an import arrive disabled; enable them here.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchWebhooksByIdRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatchWebhooksByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_webhooks_by_id",
        "tags": [
          "webhooks"
        ],
        "summary": "Delete a webhook endpoint",
        "description": "Deletes the endpoint and its delivery log. Deliveries still pending are dropped.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteWebhooksByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{id}/test": {
      "post": {
        "operationId": "post_webhooks_by_id_test",
        "tags": [
          "webhooks"
        ],
        "summary": "Send a signed test event",
        "description": "Delivers a real, signed `webhook.test` event to the endpoint now, through the same delivery code as live events, and reports what happened. The attempt is logged; if it fails it follows the normal retry schedule.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostWebhooksByIdTestResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{id}/deliveries": {
      "get": {
        "operationId": "get_webhooks_by_id_deliveries",
        "tags": [
          "webhooks"
        ],
        "summary": "Read an endpoint's delivery log",
        "description": "Deliveries to this endpoint, oldest first, with attempts, the last HTTP status and the last error. Filter by status.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Items per page, 1 to 100 (default 20)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "description": "`next_cursor` from the previous page."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "succeeded",
                "dead",
                "cancelled"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWebhooksByIdDeliveriesResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/dns-auth": {
      "get": {
        "operationId": "get_tools_dns_auth",
        "tags": [
          "tools"
        ],
        "summary": "Check SPF, DKIM and DMARC for a domain",
        "description": "Looks up the domain's SPF, DKIM (the selectors you name, or a list of common ones) and DMARC records and returns parsed records, a verdict for each, and fix text. SPF is checked against the 10 DNS lookup limit and DMARC for a policy tag. With `providers` (comma separated: google, microsoft, zoho, sendgrid, mailgun, amazon_ses, postmark) it also returns the records to publish for those sending services. Free; nothing is sent.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 253
            },
            "description": "A domain such as example.com."
          },
          {
            "name": "selectors",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "description": "Comma separated DKIM selectors to look up. Default: a list of common selectors."
          },
          {
            "name": "providers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "description": "Comma separated sending services to generate SPF, DMARC and DKIM guidance for."
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetToolsDnsAuthResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/mx": {
      "get": {
        "operationId": "get_tools_mx",
        "tags": [
          "tools"
        ],
        "summary": "Look up where a domain receives mail",
        "description": "Returns the MX records sorted by priority, the mail provider behind the preferred one and a verdict. A resolver error is `lookup_failed`, never \"no mail server\". Free.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 253
            },
            "description": "A domain such as example.com."
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetToolsMxResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/spintax": {
      "post": {
        "operationId": "post_tools_spintax",
        "tags": [
          "tools"
        ],
        "summary": "Validate and expand spintax",
        "description": "Checks braces, nesting depth and length of text such as \"Hi {there|friend}\" and counts the variants it can produce. With a `seed` it also returns one expansion; the same seed always gives the same text. Up to 20000 characters. Free.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostToolsSpintaxRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostToolsSpintaxResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/subject-lint": {
      "post": {
        "operationId": "post_tools_subject_lint",
        "tags": [
          "tools"
        ],
        "summary": "Lint an email subject line",
        "description": "Reports length, shouting, spam-trigger words and fake reply prefixes, with the reason each matters. It never rewrites the subject and promises nothing about placement. Free.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostToolsSubjectLintRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostToolsSubjectLintResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/email-pattern": {
      "get": {
        "operationId": "get_tools_email_pattern",
        "tags": [
          "tools"
        ],
        "summary": "Guess email address patterns for a person",
        "description": "Builds up to 13 candidate addresses (first.last, flast, and so on) from a name and a company domain. They are guesses, never probed against any mail server: verify each with POST /v1/email-verification before sending. Free, limited to 3 uses per account per UTC day; the next day the count resets.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "first_name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "last_name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 253
            },
            "description": "A domain such as example.com."
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetToolsEmailPatternResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/import/instantly": {
      "post": {
        "operationId": "post_import_instantly",
        "tags": [
          "import"
        ],
        "summary": "Import from Instantly",
        "description": "Reads your campaigns, leads and blocklist from Instantly with your Instantly API key (used for this request only, never stored) and creates them here: campaigns as DRAFTS with their sequence, leads (people on your suppression list and new leads beyond your plan's contact cap are skipped and counted), and the blocklist as suppression entries. Reads everything first and writes only if every read succeeded, so a vendor error changes nothing. Mailbox passwords cannot be imported: reconnect every mailbox and add it to each campaign. Limits per import: 25 campaigns, 5000 leads, 5000 blocklist entries; anything beyond is listed in `truncated`.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostImportInstantlyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostImportInstantlyResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data source for this product is unavailable right now. Error code: provider_unavailable.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/import/smartlead-csv": {
      "post": {
        "operationId": "post_import_smartlead_csv",
        "tags": [
          "import"
        ],
        "summary": "Import a Smartlead lead export",
        "description": "Imports a Smartlead (or generic) lead CSV into a campaign you own. Send the CSV text as the request body and name the campaign in `campaign_id`. Handles a byte-order mark, quoted fields, CRLF and duplicate headers; at most 1000 rows. Cells that start with = + - or @ are kept as text and listed in `flagged_cells`. People on your suppression list and new leads beyond your plan's contact cap are skipped and counted. Smartlead has no API import here: export the CSV from Smartlead and send it.",
        "x-scope": "write",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "The campaign to add the leads to."
          },
          {
            "name": "layout",
            "in": "query",
            "required": false,
            "schema": {
              "default": "smartlead",
              "type": "string",
              "enum": [
                "smartlead",
                "generic"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostImportSmartleadCsvResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request input is invalid. Error code: invalid_input.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "This API key is not allowed to make this request. Error code: forbidden.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No product exists at this path. Error code: unknown_product.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large. Error code: payload_too_large.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp": {
      "post": {
        "operationId": "post_mcp",
        "tags": [
          "mcp"
        ],
        "summary": "MCP endpoint (Model Context Protocol)",
        "description": "Streamable HTTP MCP server, stateless, JSON responses. Authenticate with the same Bearer API key. Tools map one to one onto REST endpoints and obey the key's scope: a read key can list and read but any tool that changes state, spends credits or sends email needs a write key. Tools that spend or send say so in their descriptions.",
        "x-scope": "read",
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "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"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostMcpResponse"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, revoked or unknown. Error code: unauthorized.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this API key. Error code: rate_limited.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred. Error code: internal_error.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer <key>"
      },
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "The same key in an X-API-Key header."
      }
    },
    "headers": {
      "RequestId": {
        "description": "Unique id of this request. Matches request_id in an error body.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimitLimit": {
        "description": "Requests allowed per window per key (default 200 per 10 seconds).",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Requests left in the current window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitReset": {
        "description": "Unix time in seconds when the window is full again.",
        "schema": {
          "type": "integer"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "The single error envelope every endpoint returns.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "fix",
              "docs_url",
              "retryable",
              "request_id"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthorized",
                  "forbidden",
                  "insufficient_credits",
                  "plan_limit",
                  "subscription_required",
                  "trial_expired",
                  "trial_allowance_exhausted",
                  "rate_limited",
                  "invalid_input",
                  "unknown_product",
                  "not_found",
                  "method_not_allowed",
                  "payload_too_large",
                  "conflict",
                  "signature_invalid",
                  "provider_unavailable",
                  "internal_error"
                ],
                "description": "Stable machine-readable code. Branch on this, never on message."
              },
              "message": {
                "type": "string",
                "description": "What went wrong, for this request."
              },
              "fix": {
                "type": "string",
                "description": "What to do next."
              },
              "docs_url": {
                "type": "string",
                "description": "Link to the error documentation."
              },
              "retryable": {
                "type": "boolean",
                "description": "Whether sending the same request again can succeed."
              },
              "request_id": {
                "type": "string",
                "description": "Quote this when contacting support."
              }
            }
          }
        }
      },
      "ErrorResponse": {
        "$ref": "#/components/schemas/Error"
      },
      "GetHealthResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "ok"
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "GetOpenapiJsonResponse": {
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "GetAccountExportResponse": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string"
          },
          "account_id": {
            "type": "string"
          },
          "exported_at": {
            "type": "string"
          },
          "profile": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "tables": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "description": "Rows per table; only tables with at least one row appear."
          },
          "redacted_columns": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Per table, the columns left out because they hold a secret."
          },
          "truncated": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "description": "Tables cut at the row cap, with the number of rows the account has there."
          }
        },
        "required": [
          "brand",
          "account_id",
          "exported_at",
          "profile",
          "tables",
          "redacted_columns",
          "truncated"
        ],
        "additionalProperties": false
      },
      "GetAccountResponse": {
        "type": "object",
        "properties": {
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "created_at": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "created_at"
            ],
            "additionalProperties": false
          },
          "plan": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "monthly_price_cents": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "pricing_status": {
                    "type": "string",
                    "const": "owner-approved"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "monthly_price_cents",
                  "pricing_status"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "subscription": {
            "type": "object",
            "properties": {
              "plan": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "starter",
                      "pro",
                      "max",
                      "enterprise"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "null while the account has no plan (never subscribed, cancelled, or a subscription held for review)."
              },
              "status": {
                "type": "string",
                "enum": [
                  "none",
                  "trialing",
                  "active",
                  "past_due",
                  "canceled",
                  "unpaid",
                  "incomplete",
                  "paused"
                ]
              },
              "interval": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "month",
                      "year"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "current_period_end": {
                "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))$",
                    "description": "ISO 8601 time in UTC"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trial_ends_at": {
                "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))$",
                    "description": "ISO 8601 time in UTC"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancel_at_period_end": {
                "type": "boolean"
              }
            },
            "required": [
              "plan",
              "status",
              "interval",
              "current_period_end",
              "trial_ends_at",
              "cancel_at_period_end"
            ],
            "additionalProperties": false
          },
          "credits": {
            "type": "object",
            "properties": {
              "plan_wallet": {
                "type": "object",
                "properties": {
                  "granted": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "spent": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "reserved": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Credits held by operations still in flight."
                  },
                  "available": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Credits you can spend now."
                  }
                },
                "required": [
                  "granted",
                  "spent",
                  "reserved",
                  "available"
                ],
                "additionalProperties": false,
                "description": "Plan credits: granted each billing month, expire unspent at the month end. Spent first."
              },
              "top_up_wallet": {
                "type": "object",
                "properties": {
                  "granted": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "spent": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "reserved": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Credits held by operations still in flight."
                  },
                  "available": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Credits you can spend now."
                  }
                },
                "required": [
                  "granted",
                  "spent",
                  "reserved",
                  "available"
                ],
                "additionalProperties": false,
                "description": "Top-up credits: bought in packs, never expire."
              },
              "total_available": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "plan_wallet",
              "top_up_wallet",
              "total_available"
            ],
            "additionalProperties": false
          },
          "keys": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Public key id. The key itself is never returned."
                },
                "prefix": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "read",
                    "write"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "revoked": {
                  "type": "boolean"
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "prefix",
                "name",
                "scope",
                "created_at",
                "revoked",
                "revoked_at"
              ],
              "additionalProperties": false
            }
          },
          "usage": {
            "type": "object",
            "properties": {
              "period": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "string"
                  },
                  "end": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "subscription",
                      "calendar_month"
                    ]
                  }
                },
                "required": [
                  "start",
                  "end",
                  "source"
                ],
                "additionalProperties": false
              },
              "plan_id": {
                "description": "null when the account has no plan. There is no free tier.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "pricing_status": {
                "type": "string",
                "const": "owner-approved",
                "description": "Plan prices and caps follow the published plans."
              },
              "emails": {
                "type": "object",
                "properties": {
                  "used": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "cap": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "used",
                  "cap"
                ],
                "additionalProperties": false,
                "description": "Emails sent this period against the plan. The cap is the plan's; an account with no plan has no allowance, so every cap is zero."
              },
              "active_contacts": {
                "type": "object",
                "properties": {
                  "used": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "cap": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "used",
                  "cap"
                ],
                "additionalProperties": false,
                "description": "Leads that are not unsubscribed, bounced or blocked. The cap is the plan's; an account with no plan has no allowance, so every cap is zero."
              },
              "imap_mailboxes": {
                "type": "object",
                "properties": {
                  "used": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "cap": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "used",
                  "cap"
                ],
                "additionalProperties": false,
                "description": "IMAP/SMTP mailboxes connected (Google and Microsoft mailboxes are not capped). The cap is the plan's; an account with no plan has no allowance, so every cap is zero."
              }
            },
            "required": [
              "period",
              "plan_id",
              "pricing_status",
              "emails",
              "active_contacts",
              "imap_mailboxes"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "account",
          "plan",
          "subscription",
          "credits",
          "keys",
          "usage"
        ],
        "additionalProperties": false
      },
      "GetUsageResponse": {
        "type": "object",
        "properties": {
          "usage": {
            "type": "object",
            "properties": {
              "period": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "string"
                  },
                  "end": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "subscription",
                      "calendar_month"
                    ]
                  }
                },
                "required": [
                  "start",
                  "end",
                  "source"
                ],
                "additionalProperties": false
              },
              "plan_id": {
                "description": "null when the account has no plan. There is no free tier.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "pricing_status": {
                "type": "string",
                "const": "owner-approved",
                "description": "Plan prices and caps follow the published plans."
              },
              "emails": {
                "type": "object",
                "properties": {
                  "used": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "cap": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "used",
                  "cap"
                ],
                "additionalProperties": false,
                "description": "Emails sent this period against the plan. The cap is the plan's; an account with no plan has no allowance, so every cap is zero."
              },
              "active_contacts": {
                "type": "object",
                "properties": {
                  "used": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "cap": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "used",
                  "cap"
                ],
                "additionalProperties": false,
                "description": "Leads that are not unsubscribed, bounced or blocked. The cap is the plan's; an account with no plan has no allowance, so every cap is zero."
              },
              "imap_mailboxes": {
                "type": "object",
                "properties": {
                  "used": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "cap": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "used",
                  "cap"
                ],
                "additionalProperties": false,
                "description": "IMAP/SMTP mailboxes connected (Google and Microsoft mailboxes are not capped). The cap is the plan's; an account with no plan has no allowance, so every cap is zero."
              }
            },
            "required": [
              "period",
              "plan_id",
              "pricing_status",
              "emails",
              "active_contacts",
              "imap_mailboxes"
            ],
            "additionalProperties": false
          },
          "credits": {
            "type": "object",
            "properties": {
              "plan_wallet": {
                "type": "object",
                "properties": {
                  "granted": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "spent": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "reserved": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Credits held by operations still in flight."
                  },
                  "available": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Credits you can spend now."
                  }
                },
                "required": [
                  "granted",
                  "spent",
                  "reserved",
                  "available"
                ],
                "additionalProperties": false,
                "description": "Plan credits: granted each billing month, expire unspent at the month end. Spent first."
              },
              "top_up_wallet": {
                "type": "object",
                "properties": {
                  "granted": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "spent": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "reserved": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Credits held by operations still in flight."
                  },
                  "available": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Credits you can spend now."
                  }
                },
                "required": [
                  "granted",
                  "spent",
                  "reserved",
                  "available"
                ],
                "additionalProperties": false,
                "description": "Top-up credits: bought in packs, never expire."
              },
              "total_available": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "plan_wallet",
              "top_up_wallet",
              "total_available"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "usage",
          "credits"
        ],
        "additionalProperties": false
      },
      "PostAccountKeysRequest": {
        "type": "object",
        "properties": {
          "name": {
            "description": "A label for the key.",
            "type": "string",
            "maxLength": 100
          },
          "scope": {
            "default": "read",
            "description": "`read` can only read; `write` can change state, send mail and spend credits.",
            "type": "string",
            "enum": [
              "read",
              "write"
            ]
          }
        }
      },
      "PostAccountKeysResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "description": "The full key. Store it now; it is not saved and cannot be shown again."
          },
          "prefix": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "read",
              "write"
            ]
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "prefix",
          "name",
          "scope",
          "created_at"
        ],
        "additionalProperties": false
      },
      "DeleteAccountKeysByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "revoked": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "revoked"
        ],
        "additionalProperties": false
      },
      "GetCapabilitiesResponse": {
        "type": "object",
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slot": {
                  "type": "string"
                },
                "capability": {
                  "type": "string"
                },
                "available": {
                  "type": "boolean",
                  "description": "True when at least one configured adapter can run now."
                },
                "blocked_by": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "owner_money",
                        "vendor_contract",
                        "platform_review",
                        "legal_setup",
                        "credentials",
                        "owner_decision"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "adapters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "vendor": {
                        "type": "string"
                      },
                      "docs_url": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "available": {
                        "type": "boolean"
                      },
                      "blocked_by": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "owner_money",
                              "vendor_contract",
                              "platform_review",
                              "legal_setup",
                              "credentials",
                              "owner_decision"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "reason": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "vendor",
                      "docs_url",
                      "available",
                      "blocked_by",
                      "reason"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "slot",
                "capability",
                "available",
                "blocked_by",
                "reason",
                "adapters"
              ],
              "additionalProperties": false
            }
          },
          "blockers": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            },
            "description": "What each blocker code means."
          }
        },
        "required": [
          "capabilities",
          "blockers"
        ],
        "additionalProperties": false
      },
      "GetAccountComplianceResponse": {
        "type": "object",
        "properties": {
          "postal_address": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "line2": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "city": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "region": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "postal_code": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 20
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "country": {
                    "type": "string",
                    "pattern": "^[A-Za-z]{2}$"
                  }
                },
                "required": [
                  "line1",
                  "city",
                  "country"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Printed in the footer of every campaign email (CAN-SPAM). Campaigns cannot start without it."
          },
          "sender": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "company_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "sender_name": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reply_to": {
                    "anyOf": [
                      {},
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "company_name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the footer says the email is from."
          },
          "ready_to_send": {
            "type": "boolean",
            "description": "True when a postal address is set."
          },
          "updated_at": {
            "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": [
          "postal_address",
          "sender",
          "ready_to_send",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "PutAccountComplianceRequest": {
        "type": "object",
        "properties": {
          "postal_address": {
            "type": "object",
            "properties": {
              "line1": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "line2": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "city": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "region": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "postal_code": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "country": {
                "type": "string",
                "pattern": "^[A-Za-z]{2}$"
              }
            },
            "required": [
              "line1",
              "city",
              "country"
            ],
            "additionalProperties": false
          },
          "sender": {
            "type": "object",
            "properties": {
              "company_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "sender_name": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reply_to": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 320
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "company_name"
            ],
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "PutAccountComplianceResponse": {
        "type": "object",
        "properties": {
          "postal_address": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "line2": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "city": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "region": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "postal_code": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 20
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "country": {
                    "type": "string",
                    "pattern": "^[A-Za-z]{2}$"
                  }
                },
                "required": [
                  "line1",
                  "city",
                  "country"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Printed in the footer of every campaign email (CAN-SPAM). Campaigns cannot start without it."
          },
          "sender": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "company_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "sender_name": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reply_to": {
                    "anyOf": [
                      {},
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "company_name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the footer says the email is from."
          },
          "ready_to_send": {
            "type": "boolean",
            "description": "True when a postal address is set."
          },
          "updated_at": {
            "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": [
          "postal_address",
          "sender",
          "ready_to_send",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "GetMailboxesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "provider": {
                  "type": "string",
                  "enum": [
                    "gmail",
                    "microsoft_graph",
                    "imap_smtp"
                  ]
                },
                "address": {
                  "type": "string"
                },
                "display_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "connected",
                    "disconnected",
                    "error"
                  ]
                },
                "daily_limit": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "ramp_enabled": {
                  "type": "boolean"
                },
                "ramp_started_at": {
                  "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))$",
                      "description": "ISO 8601 time in UTC"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "health": {
                  "type": "object",
                  "properties": {
                    "last_checked_at": {
                      "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))$",
                          "description": "ISO 8601 time in UTC"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "consecutive_failures": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "last_error": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "last_checked_at",
                    "consecutive_failures",
                    "last_error"
                  ],
                  "additionalProperties": false
                },
                "created_at": {
                  "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))$",
                  "description": "ISO 8601 time in UTC"
                },
                "updated_at": {
                  "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))$",
                  "description": "ISO 8601 time in UTC"
                }
              },
              "required": [
                "id",
                "provider",
                "address",
                "display_name",
                "status",
                "daily_limit",
                "ramp_enabled",
                "ramp_started_at",
                "health",
                "created_at",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PostMailboxesRequest": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "maxLength": 320
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "daily_limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2000
          },
          "ramp_enabled": {
            "type": "boolean"
          },
          "imap": {
            "type": "object",
            "properties": {
              "host": {
                "type": "string",
                "minLength": 1,
                "maxLength": 253
              },
              "port": {
                "type": "integer",
                "minimum": 1,
                "maximum": 65535
              },
              "secure": {
                "type": "boolean",
                "description": "true for TLS from the first byte (465, 993); false requires STARTTLS"
              },
              "user": {
                "type": "string",
                "minLength": 1,
                "maxLength": 320
              },
              "pass": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              }
            },
            "required": [
              "host",
              "port",
              "secure",
              "user",
              "pass"
            ],
            "additionalProperties": false
          },
          "smtp": {
            "type": "object",
            "properties": {
              "host": {
                "type": "string",
                "minLength": 1,
                "maxLength": 253
              },
              "port": {
                "type": "integer",
                "minimum": 1,
                "maximum": 65535
              },
              "secure": {
                "type": "boolean",
                "description": "true for TLS from the first byte (465, 993); false requires STARTTLS"
              },
              "user": {
                "type": "string",
                "minLength": 1,
                "maxLength": 320
              },
              "pass": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              }
            },
            "required": [
              "host",
              "port",
              "secure",
              "user",
              "pass"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "address",
          "imap",
          "smtp"
        ],
        "additionalProperties": false
      },
      "PostMailboxesResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "gmail",
              "microsoft_graph",
              "imap_smtp"
            ]
          },
          "address": {
            "type": "string"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "connected",
              "disconnected",
              "error"
            ]
          },
          "daily_limit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "ramp_enabled": {
            "type": "boolean"
          },
          "ramp_started_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "health": {
            "type": "object",
            "properties": {
              "last_checked_at": {
                "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))$",
                    "description": "ISO 8601 time in UTC"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "consecutive_failures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "last_error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "last_checked_at",
              "consecutive_failures",
              "last_error"
            ],
            "additionalProperties": false
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "updated_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          }
        },
        "required": [
          "id",
          "provider",
          "address",
          "display_name",
          "status",
          "daily_limit",
          "ramp_enabled",
          "ramp_started_at",
          "health",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "PostMailboxesGmailConnectRequest": {
        "type": "object",
        "properties": {
          "login_hint": {
            "type": "string",
            "maxLength": 320
          }
        },
        "additionalProperties": false
      },
      "PostMailboxesGmailConnectResponse": {
        "type": "object",
        "properties": {
          "authorization_url": {
            "type": "string",
            "description": "Open this in a browser signed in to the mailbox owner."
          },
          "expires_at": {
            "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))$",
            "description": "The link stops working after this time; start again."
          }
        },
        "required": [
          "authorization_url",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "PostMailboxesGmailCompleteRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "code",
          "state"
        ],
        "additionalProperties": false
      },
      "PostMailboxesGmailCompleteResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "gmail",
              "microsoft_graph",
              "imap_smtp"
            ]
          },
          "address": {
            "type": "string"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "connected",
              "disconnected",
              "error"
            ]
          },
          "daily_limit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "ramp_enabled": {
            "type": "boolean"
          },
          "ramp_started_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "health": {
            "type": "object",
            "properties": {
              "last_checked_at": {
                "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))$",
                    "description": "ISO 8601 time in UTC"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "consecutive_failures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "last_error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "last_checked_at",
              "consecutive_failures",
              "last_error"
            ],
            "additionalProperties": false
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "updated_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          }
        },
        "required": [
          "id",
          "provider",
          "address",
          "display_name",
          "status",
          "daily_limit",
          "ramp_enabled",
          "ramp_started_at",
          "health",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "PostMailboxesMicrosoftConnectRequest": {
        "type": "object",
        "properties": {
          "login_hint": {
            "type": "string",
            "maxLength": 320
          }
        },
        "additionalProperties": false
      },
      "PostMailboxesMicrosoftConnectResponse": {
        "type": "object",
        "properties": {
          "authorization_url": {
            "type": "string",
            "description": "Open this in a browser signed in to the mailbox owner."
          },
          "expires_at": {
            "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))$",
            "description": "The link stops working after this time; start again."
          }
        },
        "required": [
          "authorization_url",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "PostMailboxesMicrosoftCompleteRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "code",
          "state"
        ],
        "additionalProperties": false
      },
      "PostMailboxesMicrosoftCompleteResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "gmail",
              "microsoft_graph",
              "imap_smtp"
            ]
          },
          "address": {
            "type": "string"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "connected",
              "disconnected",
              "error"
            ]
          },
          "daily_limit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "ramp_enabled": {
            "type": "boolean"
          },
          "ramp_started_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "health": {
            "type": "object",
            "properties": {
              "last_checked_at": {
                "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))$",
                    "description": "ISO 8601 time in UTC"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "consecutive_failures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "last_error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "last_checked_at",
              "consecutive_failures",
              "last_error"
            ],
            "additionalProperties": false
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "updated_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          }
        },
        "required": [
          "id",
          "provider",
          "address",
          "display_name",
          "status",
          "daily_limit",
          "ramp_enabled",
          "ramp_started_at",
          "health",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "GetMailboxesByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "gmail",
              "microsoft_graph",
              "imap_smtp"
            ]
          },
          "address": {
            "type": "string"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "connected",
              "disconnected",
              "error"
            ]
          },
          "daily_limit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "ramp_enabled": {
            "type": "boolean"
          },
          "ramp_started_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "health": {
            "type": "object",
            "properties": {
              "last_checked_at": {
                "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))$",
                    "description": "ISO 8601 time in UTC"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "consecutive_failures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "last_error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "last_checked_at",
              "consecutive_failures",
              "last_error"
            ],
            "additionalProperties": false
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "updated_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          }
        },
        "required": [
          "id",
          "provider",
          "address",
          "display_name",
          "status",
          "daily_limit",
          "ramp_enabled",
          "ramp_started_at",
          "health",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "PatchMailboxesByIdRequest": {
        "type": "object",
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "daily_limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2000
          },
          "ramp_enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PatchMailboxesByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "gmail",
              "microsoft_graph",
              "imap_smtp"
            ]
          },
          "address": {
            "type": "string"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "connected",
              "disconnected",
              "error"
            ]
          },
          "daily_limit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "ramp_enabled": {
            "type": "boolean"
          },
          "ramp_started_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "health": {
            "type": "object",
            "properties": {
              "last_checked_at": {
                "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))$",
                    "description": "ISO 8601 time in UTC"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "consecutive_failures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "last_error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "last_checked_at",
              "consecutive_failures",
              "last_error"
            ],
            "additionalProperties": false
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "updated_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          }
        },
        "required": [
          "id",
          "provider",
          "address",
          "display_name",
          "status",
          "daily_limit",
          "ramp_enabled",
          "ramp_started_at",
          "health",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "DeleteMailboxesByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": false
      },
      "PostMailboxesByIdCheckRequest": {
        "type": "object",
        "properties": {
          "dkim_selectors": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9._-]{0,62})$"
            }
          }
        },
        "additionalProperties": false
      },
      "PostMailboxesByIdCheckResponse": {
        "type": "object",
        "properties": {
          "mailbox": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "provider": {
                "type": "string",
                "enum": [
                  "gmail",
                  "microsoft_graph",
                  "imap_smtp"
                ]
              },
              "address": {
                "type": "string"
              },
              "display_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "connected",
                  "disconnected",
                  "error"
                ]
              },
              "daily_limit": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "ramp_enabled": {
                "type": "boolean"
              },
              "ramp_started_at": {
                "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))$",
                    "description": "ISO 8601 time in UTC"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "health": {
                "type": "object",
                "properties": {
                  "last_checked_at": {
                    "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))$",
                        "description": "ISO 8601 time in UTC"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "consecutive_failures": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "last_error": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "last_checked_at",
                  "consecutive_failures",
                  "last_error"
                ],
                "additionalProperties": false
              },
              "created_at": {
                "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))$",
                "description": "ISO 8601 time in UTC"
              },
              "updated_at": {
                "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))$",
                "description": "ISO 8601 time in UTC"
              }
            },
            "required": [
              "id",
              "provider",
              "address",
              "display_name",
              "status",
              "daily_limit",
              "ramp_enabled",
              "ramp_started_at",
              "health",
              "created_at",
              "updated_at"
            ],
            "additionalProperties": false
          },
          "connectivity": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "const": "ok"
                  }
                },
                "required": [
                  "status"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "blocked_by": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "blocked_by",
                  "reason"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "const": "failed"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "retryable": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "status",
                  "reason",
                  "retryable"
                ],
                "additionalProperties": false
              }
            ]
          },
          "dns": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  },
                  "overall": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "warn",
                      "fail",
                      "missing",
                      "unknown"
                    ]
                  },
                  "spf": {
                    "type": "object",
                    "properties": {
                      "verdict": {
                        "type": "string",
                        "enum": [
                          "pass",
                          "warn",
                          "fail",
                          "missing",
                          "unknown"
                        ]
                      },
                      "record": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lookup_count": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "DNS-querying terms counted across includes; the limit is lookup_limit."
                      },
                      "lookup_limit": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "issues": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "severity": {
                              "type": "string",
                              "enum": [
                                "fail",
                                "warn",
                                "info"
                              ]
                            },
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "fix": {
                              "type": "string",
                              "description": "What to change, in plain words."
                            }
                          },
                          "required": [
                            "severity",
                            "code",
                            "message",
                            "fix"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "verdict",
                      "record",
                      "lookup_count",
                      "lookup_limit",
                      "issues"
                    ],
                    "additionalProperties": false
                  },
                  "dkim": {
                    "type": "object",
                    "properties": {
                      "verdict": {
                        "type": "string",
                        "enum": [
                          "pass",
                          "warn",
                          "fail",
                          "missing",
                          "unknown"
                        ]
                      },
                      "selectors_tried": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "keys": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "selector": {
                              "type": "string"
                            },
                            "key_bits": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "valid": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "selector",
                            "key_bits",
                            "valid"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "issues": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "severity": {
                              "type": "string",
                              "enum": [
                                "fail",
                                "warn",
                                "info"
                              ]
                            },
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "fix": {
                              "type": "string",
                              "description": "What to change, in plain words."
                            }
                          },
                          "required": [
                            "severity",
                            "code",
                            "message",
                            "fix"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "verdict",
                      "selectors_tried",
                      "keys",
                      "issues"
                    ],
                    "additionalProperties": false
                  },
                  "dmarc": {
                    "type": "object",
                    "properties": {
                      "verdict": {
                        "type": "string",
                        "enum": [
                          "pass",
                          "warn",
                          "fail",
                          "missing",
                          "unknown"
                        ]
                      },
                      "record": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "policy": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "issues": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "severity": {
                              "type": "string",
                              "enum": [
                                "fail",
                                "warn",
                                "info"
                              ]
                            },
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "fix": {
                              "type": "string",
                              "description": "What to change, in plain words."
                            }
                          },
                          "required": [
                            "severity",
                            "code",
                            "message",
                            "fix"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "verdict",
                      "record",
                      "policy",
                      "issues"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "domain",
                  "overall",
                  "spf",
                  "dkim",
                  "dmarc"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when the lookup could not run; see dns_error."
          },
          "dns_error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "mailbox",
          "connectivity",
          "dns",
          "dns_error"
        ],
        "additionalProperties": false
      },
      "GetCampaignsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "active",
                    "paused",
                    "completed"
                  ]
                },
                "schedule": {
                  "type": "object",
                  "properties": {
                    "timezone": {
                      "type": "string"
                    },
                    "sending_days": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "mon",
                          "tue",
                          "wed",
                          "thu",
                          "fri",
                          "sat",
                          "sun"
                        ]
                      }
                    },
                    "start_hour": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "end_hour": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "timezone",
                    "sending_days",
                    "start_hour",
                    "end_hour"
                  ],
                  "additionalProperties": false
                },
                "daily_limit": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "stop_on_reply": {
                  "type": "boolean"
                },
                "mailbox_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "created_at": {
                  "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))$",
                  "description": "ISO 8601 time in UTC"
                },
                "updated_at": {
                  "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))$",
                  "description": "ISO 8601 time in UTC"
                },
                "started_at": {
                  "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))$",
                      "description": "ISO 8601 time in UTC"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "completed_at": {
                  "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))$",
                      "description": "ISO 8601 time in UTC"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "status",
                "schedule",
                "daily_limit",
                "stop_on_reply",
                "mailbox_ids",
                "created_at",
                "updated_at",
                "started_at",
                "completed_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PostCampaignsRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "schedule": {
            "type": "object",
            "properties": {
              "timezone": {
                "type": "string",
                "maxLength": 64
              },
              "sending_days": {
                "minItems": 1,
                "maxItems": 7,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "mon",
                    "tue",
                    "wed",
                    "thu",
                    "fri",
                    "sat",
                    "sun"
                  ]
                }
              },
              "start_hour": {
                "type": "integer",
                "minimum": 0,
                "maximum": 23
              },
              "end_hour": {
                "type": "integer",
                "minimum": 1,
                "maximum": 24
              }
            },
            "required": [
              "timezone",
              "sending_days",
              "start_hour",
              "end_hour"
            ],
            "additionalProperties": false
          },
          "daily_limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "stop_on_reply": {
            "type": "boolean"
          },
          "mailbox_ids": {
            "maxItems": 1000,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "schedule"
        ],
        "additionalProperties": false
      },
      "PostCampaignsResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "paused",
              "completed"
            ]
          },
          "schedule": {
            "type": "object",
            "properties": {
              "timezone": {
                "type": "string"
              },
              "sending_days": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "mon",
                    "tue",
                    "wed",
                    "thu",
                    "fri",
                    "sat",
                    "sun"
                  ]
                }
              },
              "start_hour": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "end_hour": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "timezone",
              "sending_days",
              "start_hour",
              "end_hour"
            ],
            "additionalProperties": false
          },
          "daily_limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "stop_on_reply": {
            "type": "boolean"
          },
          "mailbox_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "updated_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "started_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "schedule",
          "daily_limit",
          "stop_on_reply",
          "mailbox_ids",
          "created_at",
          "updated_at",
          "started_at",
          "completed_at"
        ],
        "additionalProperties": false
      },
      "GetCampaignsByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "paused",
              "completed"
            ]
          },
          "schedule": {
            "type": "object",
            "properties": {
              "timezone": {
                "type": "string"
              },
              "sending_days": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "mon",
                    "tue",
                    "wed",
                    "thu",
                    "fri",
                    "sat",
                    "sun"
                  ]
                }
              },
              "start_hour": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "end_hour": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "timezone",
              "sending_days",
              "start_hour",
              "end_hour"
            ],
            "additionalProperties": false
          },
          "daily_limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "stop_on_reply": {
            "type": "boolean"
          },
          "mailbox_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "updated_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "started_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "schedule",
          "daily_limit",
          "stop_on_reply",
          "mailbox_ids",
          "created_at",
          "updated_at",
          "started_at",
          "completed_at"
        ],
        "additionalProperties": false
      },
      "PatchCampaignsByIdRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "schedule": {
            "type": "object",
            "properties": {
              "timezone": {
                "type": "string",
                "maxLength": 64
              },
              "sending_days": {
                "minItems": 1,
                "maxItems": 7,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "mon",
                    "tue",
                    "wed",
                    "thu",
                    "fri",
                    "sat",
                    "sun"
                  ]
                }
              },
              "start_hour": {
                "type": "integer",
                "minimum": 0,
                "maximum": 23
              },
              "end_hour": {
                "type": "integer",
                "minimum": 1,
                "maximum": 24
              }
            },
            "required": [
              "timezone",
              "sending_days",
              "start_hour",
              "end_hour"
            ],
            "additionalProperties": false
          },
          "daily_limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "stop_on_reply": {
            "type": "boolean"
          },
          "mailbox_ids": {
            "maxItems": 1000,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "PatchCampaignsByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "paused",
              "completed"
            ]
          },
          "schedule": {
            "type": "object",
            "properties": {
              "timezone": {
                "type": "string"
              },
              "sending_days": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "mon",
                    "tue",
                    "wed",
                    "thu",
                    "fri",
                    "sat",
                    "sun"
                  ]
                }
              },
              "start_hour": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "end_hour": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "timezone",
              "sending_days",
              "start_hour",
              "end_hour"
            ],
            "additionalProperties": false
          },
          "daily_limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "stop_on_reply": {
            "type": "boolean"
          },
          "mailbox_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "updated_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "started_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "schedule",
          "daily_limit",
          "stop_on_reply",
          "mailbox_ids",
          "created_at",
          "updated_at",
          "started_at",
          "completed_at"
        ],
        "additionalProperties": false
      },
      "DeleteCampaignsByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": false
      },
      "GetCampaignsByIdSequenceResponse": {
        "type": "object",
        "properties": {
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "order": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "wait_days": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "subjects": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "A/B subject variants; variant A is the first"
                },
                "body": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "order",
                "wait_days",
                "subjects",
                "body"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "steps"
        ],
        "additionalProperties": false
      },
      "PutCampaignsByIdSequenceRequest": {
        "type": "object",
        "properties": {
          "steps": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "wait_days": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 365
                },
                "subjects": {
                  "minItems": 1,
                  "maxItems": 26,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "body": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 50000
                }
              },
              "required": [
                "wait_days",
                "subjects",
                "body"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "steps"
        ],
        "additionalProperties": false
      },
      "PutCampaignsByIdSequenceResponse": {
        "type": "object",
        "properties": {
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "order": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "wait_days": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "subjects": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "A/B subject variants; variant A is the first"
                },
                "body": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "order",
                "wait_days",
                "subjects",
                "body"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "steps"
        ],
        "additionalProperties": false
      },
      "GetCampaignsByIdRenderCheckResponse": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string"
          },
          "ready": {
            "type": "boolean",
            "description": "True when every email renders, so the campaign can start without skipping anyone."
          },
          "leads_enrolled": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "leads_excluded": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Enrolled leads that will never be mailed (suppressed, verified invalid, bounced, unsubscribed or already replied), so they were not rendered and cannot hold a start."
          },
          "leads_checked": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "leads_rendering": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Checked leads for whom every email still to be sent renders."
          },
          "leads_failing": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "emails_checked": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Lead-and-step emails rendered; steps already sent are not rendered again."
          },
          "emails_rendering": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "emails_failing": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "failures": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lead_id": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "problems": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "step": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "1-based step number."
                      },
                      "variant": {
                        "type": "string",
                        "description": "The subject variant this lead gets for the step."
                      },
                      "part": {
                        "type": "string",
                        "enum": [
                          "subject",
                          "body"
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "missing_field",
                          "invalid_spintax"
                        ]
                      },
                      "field": {
                        "description": "The merge field with no value and no fallback; null for a spintax error.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "step",
                      "variant",
                      "part",
                      "kind",
                      "field",
                      "message"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "lead_id",
                "email",
                "problems"
              ],
              "additionalProperties": false
            },
            "description": "Failing leads in enrollment order, at most 200; leads_failing is the full count."
          },
          "failures_truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "campaign_id",
          "ready",
          "leads_enrolled",
          "leads_excluded",
          "leads_checked",
          "leads_rendering",
          "leads_failing",
          "emails_checked",
          "emails_rendering",
          "emails_failing",
          "failures",
          "failures_truncated"
        ],
        "additionalProperties": false
      },
      "PostCampaignsByIdStartRequest": {
        "type": "object",
        "properties": {
          "skip_failing_leads": {
            "description": "Start although some leads have an email that would not render, skipping those leads. Default false.",
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PostCampaignsByIdStartResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "paused",
              "completed"
            ]
          },
          "schedule": {
            "type": "object",
            "properties": {
              "timezone": {
                "type": "string"
              },
              "sending_days": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "mon",
                    "tue",
                    "wed",
                    "thu",
                    "fri",
                    "sat",
                    "sun"
                  ]
                }
              },
              "start_hour": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "end_hour": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "timezone",
              "sending_days",
              "start_hour",
              "end_hour"
            ],
            "additionalProperties": false
          },
          "daily_limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "stop_on_reply": {
            "type": "boolean"
          },
          "mailbox_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "updated_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "started_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Things that will keep mail from going out even though the campaign is active."
          },
          "skipped_leads": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Leads whose emails would not render and were skipped because skip_failing_leads was set; 0 otherwise."
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "schedule",
          "daily_limit",
          "stop_on_reply",
          "mailbox_ids",
          "created_at",
          "updated_at",
          "started_at",
          "completed_at",
          "warnings",
          "skipped_leads"
        ],
        "additionalProperties": false
      },
      "PostCampaignsByIdPauseResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "paused",
              "completed"
            ]
          },
          "schedule": {
            "type": "object",
            "properties": {
              "timezone": {
                "type": "string"
              },
              "sending_days": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "mon",
                    "tue",
                    "wed",
                    "thu",
                    "fri",
                    "sat",
                    "sun"
                  ]
                }
              },
              "start_hour": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "end_hour": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "timezone",
              "sending_days",
              "start_hour",
              "end_hour"
            ],
            "additionalProperties": false
          },
          "daily_limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "stop_on_reply": {
            "type": "boolean"
          },
          "mailbox_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "updated_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "started_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "schedule",
          "daily_limit",
          "stop_on_reply",
          "mailbox_ids",
          "created_at",
          "updated_at",
          "started_at",
          "completed_at"
        ],
        "additionalProperties": false
      },
      "PostCampaignsByIdPreviewRequest": {
        "type": "object",
        "properties": {
          "lead_id": {
            "type": "string",
            "minLength": 1
          },
          "step": {
            "description": "1-based step number; default 1.",
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "variant": {
            "description": "Subject variant letter; default A.",
            "type": "string",
            "pattern": "^[A-Z]$"
          }
        },
        "required": [
          "lead_id"
        ],
        "additionalProperties": false
      },
      "PostCampaignsByIdPreviewResponse": {
        "type": "object",
        "properties": {
          "step": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "variant": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "text_with_footer": {
            "description": "The plain-text message with the compliance footer; null until a postal address is set. The unsubscribe link is signed per recipient at send time.",
            "type": [
              "string",
              "null"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "step",
          "variant",
          "subject",
          "body",
          "text_with_footer",
          "warnings"
        ],
        "additionalProperties": false
      },
      "GetCampaignsByIdAnalyticsResponse": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string"
          },
          "totals": {
            "type": "object",
            "properties": {
              "sent": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Messages the mail provider accepted."
              },
              "recipients": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Distinct leads that were sent at least one message."
              },
              "replied": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Distinct leads with a human reply (not out-of-office or bounce)."
              },
              "positive_replies": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Distinct leads with an interested or meeting-booked reply."
              },
              "meetings_booked": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "bounced": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "unsubscribed": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "failed": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Sends that failed for good."
              },
              "blocked": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Sends held back because a mailbox, credential or adapter is unavailable."
              },
              "pending": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Sends waiting to retry."
              },
              "reply_rate": {
                "description": "replied / recipients; null while nothing has been sent.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "positive_reply_rate": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "bounce_rate": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "sent",
              "recipients",
              "replied",
              "positive_replies",
              "meetings_booked",
              "bounced",
              "unsubscribed",
              "failed",
              "blocked",
              "pending",
              "reply_rate",
              "positive_reply_rate",
              "bounce_rate"
            ],
            "additionalProperties": false
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "step": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "variant": {
                  "type": "string"
                },
                "sent": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "replied": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "step",
                "variant",
                "sent",
                "replied"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "campaign_id",
          "totals",
          "variants"
        ],
        "additionalProperties": false
      },
      "PostCampaignsByIdLeadsRequest": {
        "type": "object",
        "properties": {
          "leads": {
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "maxLength": 320
                },
                "first_name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "company_name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "custom_fields": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              },
              "required": [
                "email"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "leads"
        ],
        "additionalProperties": false
      },
      "PostCampaignsByIdLeadsResponse": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string"
          },
          "created": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "updated": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Rows for an address already in the account; the fields given were applied."
          },
          "duplicates": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Rows repeating an address earlier in the same request."
          },
          "rejected": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Position of the row in the request, starting at 0."
                },
                "email": {
                  "type": "string"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "created",
                    "updated",
                    "duplicate",
                    "rejected"
                  ]
                },
                "lead_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reason": {
                  "description": "Why the row was rejected, in plain language; null otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "index",
                "email",
                "outcome",
                "lead_id",
                "reason"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "campaign_id",
          "created",
          "updated",
          "duplicates",
          "rejected",
          "rows"
        ],
        "additionalProperties": false
      },
      "GetCampaignsByIdLeadsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "first_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "company_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "custom_fields": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "new",
                    "contacted",
                    "replied",
                    "interested",
                    "meeting_booked",
                    "not_interested",
                    "bounced",
                    "unsubscribed",
                    "blocked"
                  ]
                },
                "verification": {
                  "type": "string",
                  "enum": [
                    "unverified",
                    "valid",
                    "invalid",
                    "catch_all",
                    "unknown",
                    "risky"
                  ]
                },
                "verified_at": {
                  "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))$",
                      "description": "ISO 8601 time in UTC"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "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))$",
                  "description": "ISO 8601 time in UTC"
                },
                "updated_at": {
                  "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))$",
                  "description": "ISO 8601 time in UTC"
                }
              },
              "required": [
                "id",
                "email",
                "first_name",
                "last_name",
                "company_name",
                "title",
                "custom_fields",
                "status",
                "verification",
                "verified_at",
                "source",
                "created_at",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PostCampaignsByIdLeadsImportResponse": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string"
          },
          "created": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "updated": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Rows for an address already in the account; the fields given were applied."
          },
          "duplicates": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Rows repeating an address earlier in the same request."
          },
          "rejected": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Position of the row in the request, starting at 0."
                },
                "email": {
                  "type": "string"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "created",
                    "updated",
                    "duplicate",
                    "rejected"
                  ]
                },
                "lead_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reason": {
                  "description": "Why the row was rejected, in plain language; null otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "index",
                "email",
                "outcome",
                "lead_id",
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "csv_rejected": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "line": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "line",
                "email",
                "reason"
              ],
              "additionalProperties": false
            },
            "description": "Rows the parser refused, by line number in the file."
          },
          "flagged_cells": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Cells that begin with = + - @ and could act as spreadsheet formulas if written back to a sheet."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "campaign_id",
          "created",
          "updated",
          "duplicates",
          "rejected",
          "rows",
          "csv_rejected",
          "flagged_cells",
          "warnings"
        ],
        "additionalProperties": false
      },
      "PatchLeadsByIdRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "new",
              "contacted",
              "replied",
              "interested",
              "meeting_booked",
              "not_interested",
              "bounced",
              "unsubscribed",
              "blocked"
            ]
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "PatchLeadsByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "custom_fields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "contacted",
              "replied",
              "interested",
              "meeting_booked",
              "not_interested",
              "bounced",
              "unsubscribed",
              "blocked"
            ]
          },
          "verification": {
            "type": "string",
            "enum": [
              "unverified",
              "valid",
              "invalid",
              "catch_all",
              "unknown",
              "risky"
            ]
          },
          "verified_at": {
            "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))$",
                "description": "ISO 8601 time in UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "updated_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          }
        },
        "required": [
          "id",
          "email",
          "first_name",
          "last_name",
          "company_name",
          "title",
          "custom_fields",
          "status",
          "verification",
          "verified_at",
          "source",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "GetBlocklistResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "email",
                    "domain"
                  ]
                },
                "value": {
                  "type": "string"
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "unsubscribe",
                    "bounce",
                    "complaint",
                    "opt_out_request",
                    "manual",
                    "import"
                  ]
                },
                "source": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "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))$",
                  "description": "ISO 8601 time in UTC"
                }
              },
              "required": [
                "id",
                "kind",
                "value",
                "reason",
                "source",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PostBlocklistRequest": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "minLength": 1,
            "maxLength": 320,
            "description": "An email address or a domain; a domain also covers its subdomains"
          },
          "kind": {
            "type": "string",
            "enum": [
              "email",
              "domain"
            ]
          },
          "reason": {
            "type": "string",
            "enum": [
              "manual",
              "opt_out_request",
              "unsubscribe",
              "complaint"
            ]
          }
        },
        "required": [
          "value"
        ],
        "additionalProperties": false
      },
      "PostBlocklistResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "email",
              "domain"
            ]
          },
          "value": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "enum": [
              "unsubscribe",
              "bounce",
              "complaint",
              "opt_out_request",
              "manual",
              "import"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "created": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "kind",
          "value",
          "reason",
          "source",
          "created_at",
          "created"
        ],
        "additionalProperties": false
      },
      "DeleteBlocklistByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "removed": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "removed"
        ],
        "additionalProperties": false
      },
      "GetRepliesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "mailbox_id": {
                  "type": "string"
                },
                "campaign_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lead_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "send_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "from": {
                  "type": "string"
                },
                "subject": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "received_at": {
                  "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))$",
                  "description": "ISO 8601 time in UTC"
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "interested",
                    "not_interested",
                    "out_of_office",
                    "unsubscribe",
                    "bounce",
                    "other",
                    "meeting_booked"
                  ]
                },
                "category_source": {
                  "type": "string",
                  "enum": [
                    "rule",
                    "classifier",
                    "manual"
                  ],
                  "description": "meeting_booked only ever comes from manual"
                },
                "hidden_text": {
                  "type": "boolean",
                  "description": "True when the email has formatting that could hide text from its reader, so its text cannot be proven to be what a person sees. `text` is then empty, no AI categorises the reply or drafts an answer to it, and you should read it yourself in the mailbox."
                },
                "created_at": {
                  "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))$",
                  "description": "ISO 8601 time in UTC"
                }
              },
              "required": [
                "id",
                "mailbox_id",
                "campaign_id",
                "lead_id",
                "send_id",
                "from",
                "subject",
                "text",
                "received_at",
                "category",
                "category_source",
                "hidden_text",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PatchRepliesByIdCategoryRequest": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "interested",
              "not_interested",
              "out_of_office",
              "unsubscribe",
              "bounce",
              "other",
              "meeting_booked"
            ]
          }
        },
        "required": [
          "category"
        ],
        "additionalProperties": false
      },
      "PatchRepliesByIdCategoryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "mailbox_id": {
            "type": "string"
          },
          "campaign_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "lead_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "send_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "from": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "received_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          },
          "category": {
            "type": "string",
            "enum": [
              "interested",
              "not_interested",
              "out_of_office",
              "unsubscribe",
              "bounce",
              "other",
              "meeting_booked"
            ]
          },
          "category_source": {
            "type": "string",
            "enum": [
              "rule",
              "classifier",
              "manual"
            ],
            "description": "meeting_booked only ever comes from manual"
          },
          "hidden_text": {
            "type": "boolean",
            "description": "True when the email has formatting that could hide text from its reader, so its text cannot be proven to be what a person sees. `text` is then empty, no AI categorises the reply or drafts an answer to it, and you should read it yourself in the mailbox."
          },
          "created_at": {
            "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))$",
            "description": "ISO 8601 time in UTC"
          }
        },
        "required": [
          "id",
          "mailbox_id",
          "campaign_id",
          "lead_id",
          "send_id",
          "from",
          "subject",
          "text",
          "received_at",
          "category",
          "category_source",
          "hidden_text",
          "created_at"
        ],
        "additionalProperties": false
      },
      "PostRepliesByIdDraftRequest": {
        "type": "object",
        "properties": {
          "instruction": {
            "description": "What the answer should do, in your words.",
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "additionalProperties": false
      },
      "PostRepliesByIdDraftResponse": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        },
        "required": [
          "subject",
          "body",
          "model"
        ],
        "additionalProperties": false
      },
      "PostRepliesByIdSendRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50000
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "body"
        ],
        "additionalProperties": false
      },
      "PostRepliesByIdSendResponse": {
        "type": "object",
        "properties": {
          "sent": {
            "type": "boolean",
            "const": true
          },
          "to": {
            "type": "string"
          },
          "message_id": {
            "type": "string"
          },
          "provider_message_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "sent",
          "to",
          "message_id",
          "provider_message_id"
        ],
        "additionalProperties": false
      },
      "PostEmailVerificationRequest": {
        "type": "object",
        "properties": {
          "emails": {
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 320
            },
            "description": "1 to 1000 addresses."
          },
          "valid_only": {
            "description": "When true, catch-all addresses are not sendable.",
            "type": "boolean"
          }
        },
        "required": [
          "emails"
        ]
      },
      "PostEmailVerificationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Use it with GET /v1/email-verification/{id}."
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "verified",
                    "failed",
                    "skipped"
                  ],
                  "description": "verified: checked, see `result`. failed: the providers could not answer, nothing was charged for it. skipped: not checked, see `reason`."
                },
                "result": {
                  "description": "Only when verified.",
                  "type": "string",
                  "enum": [
                    "valid",
                    "invalid",
                    "catch_all",
                    "unknown",
                    "risky"
                  ]
                },
                "sendable": {
                  "description": "valid, or catch_all unless valid_only was set. invalid, risky and unknown are never sendable.",
                  "type": "boolean"
                },
                "providers": {
                  "description": "Providers that produced the result.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "cached": {
                  "description": "True when a recent result was reused and nothing was billed.",
                  "type": "boolean"
                },
                "checks": {
                  "description": "Provider checks billed when this address was verified.",
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "verified_at": {
                  "type": "string"
                },
                "reason": {
                  "description": "Why a result is failed or skipped (trial_cap, insufficient_credits, or the provider message).",
                  "type": "string"
                },
                "retryable": {
                  "type": "boolean"
                }
              },
              "required": [
                "email",
                "outcome"
              ],
              "additionalProperties": false
            },
            "description": "One entry per distinct valid address, in request order."
          },
          "rejected": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "value": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "index",
                "value",
                "reason"
              ],
              "additionalProperties": false
            },
            "description": "Input that is not an email address. Never billed."
          },
          "checks_billed": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "credits_charged": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "stopped_by": {
            "anyOf": [
              {
                "type": "string",
                "const": "insufficient_credits"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when the wallet ran dry part way; the rest of the addresses are skipped."
          }
        },
        "required": [
          "id",
          "results",
          "rejected",
          "checks_billed",
          "credits_charged",
          "stopped_by"
        ],
        "additionalProperties": false
      },
      "GetEmailVerificationByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Use it with GET /v1/email-verification/{id}."
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "verified",
                    "failed",
                    "skipped"
                  ],
                  "description": "verified: checked, see `result`. failed: the providers could not answer, nothing was charged for it. skipped: not checked, see `reason`."
                },
                "result": {
                  "description": "Only when verified.",
                  "type": "string",
                  "enum": [
                    "valid",
                    "invalid",
                    "catch_all",
                    "unknown",
                    "risky"
                  ]
                },
                "sendable": {
                  "description": "valid, or catch_all unless valid_only was set. invalid, risky and unknown are never sendable.",
                  "type": "boolean"
                },
                "providers": {
                  "description": "Providers that produced the result.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "cached": {
                  "description": "True when a recent result was reused and nothing was billed.",
                  "type": "boolean"
                },
                "checks": {
                  "description": "Provider checks billed when this address was verified.",
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "verified_at": {
                  "type": "string"
                },
                "reason": {
                  "description": "Why a result is failed or skipped (trial_cap, insufficient_credits, or the provider message).",
                  "type": "string"
                },
                "retryable": {
                  "type": "boolean"
                }
              },
              "required": [
                "email",
                "outcome"
              ],
              "additionalProperties": false
            },
            "description": "One entry per distinct valid address, in request order."
          },
          "rejected": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "value": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "index",
                "value",
                "reason"
              ],
              "additionalProperties": false
            },
            "description": "Input that is not an email address. Never billed."
          },
          "checks_billed": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "credits_charged": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "stopped_by": {
            "anyOf": [
              {
                "type": "string",
                "const": "insufficient_credits"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when the wallet ran dry part way; the rest of the addresses are skipped."
          }
        },
        "required": [
          "id",
          "results",
          "rejected",
          "checks_billed",
          "credits_charged",
          "stopped_by"
        ],
        "additionalProperties": false
      },
      "GetCreditsResponse": {
        "type": "object",
        "properties": {
          "plan_wallet": {
            "type": "object",
            "properties": {
              "granted": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "spent": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "reserved": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Credits held by operations still in flight."
              },
              "available": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Credits you can spend now."
              }
            },
            "required": [
              "granted",
              "spent",
              "reserved",
              "available"
            ],
            "additionalProperties": false,
            "description": "Plan credits: granted each billing month, expire unspent at the month end. Spent first."
          },
          "top_up_wallet": {
            "type": "object",
            "properties": {
              "granted": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "spent": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "reserved": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Credits held by operations still in flight."
              },
              "available": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Credits you can spend now."
              }
            },
            "required": [
              "granted",
              "spent",
              "reserved",
              "available"
            ],
            "additionalProperties": false,
            "description": "Top-up credits: bought in packs, never expire."
          },
          "total_available": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "pricing_status": {
            "type": "string",
            "const": "owner-approved"
          },
          "credit_pack": {
            "type": "object",
            "properties": {
              "pack_size": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "cents_per_pack": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "volume_threshold_credits": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "volume_cents_per_pack": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "pack_size",
              "cents_per_pack",
              "volume_threshold_credits",
              "volume_cents_per_pack"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "plan_wallet",
          "top_up_wallet",
          "total_available",
          "pricing_status",
          "credit_pack"
        ],
        "additionalProperties": false
      },
      "PostBillingCheckoutRequest": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "plan"
              },
              "plan_id": {
                "type": "string",
                "enum": [
                  "starter",
                  "pro",
                  "max",
                  "enterprise"
                ],
                "description": "starter, pro, max. Enterprise is set up on a call and is refused here with the booking page named."
              },
              "interval": {
                "default": "monthly",
                "description": "annual bills 10 months for 12.",
                "type": "string",
                "enum": [
                  "monthly",
                  "annual"
                ]
              },
              "success_url": {
                "type": "string",
                "maxLength": 2048,
                "format": "uri",
                "description": "Where Stripe sends the customer after paying. Must be on this service's own site."
              },
              "cancel_url": {
                "type": "string",
                "maxLength": 2048,
                "format": "uri",
                "description": "Where Stripe sends the customer if they leave checkout. Must be on this service's own site."
              },
              "attempt_id": {
                "description": "A random id your client makes once per buy and sends again on every retry of it. A repeat with the same id returns the same Checkout instead of making another.",
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{16,64}$"
              }
            },
            "required": [
              "kind",
              "plan_id",
              "success_url",
              "cancel_url"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "credit_pack"
              },
              "credits": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "One of 1000, 2000, 3000, 4000, 5000, 10000, 20000, 50000, 100000. Top-up credits never expire."
              },
              "success_url": {
                "type": "string",
                "maxLength": 2048,
                "format": "uri",
                "description": "Where Stripe sends the customer after paying. Must be on this service's own site."
              },
              "cancel_url": {
                "type": "string",
                "maxLength": 2048,
                "format": "uri",
                "description": "Where Stripe sends the customer if they leave checkout. Must be on this service's own site."
              },
              "attempt_id": {
                "description": "A random id your client makes once per buy and sends again on every retry of it. A repeat with the same id returns the same Checkout instead of making another.",
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{16,64}$"
              }
            },
            "required": [
              "kind",
              "credits",
              "success_url",
              "cancel_url"
            ]
          }
        ]
      },
      "PostBillingCheckoutResponse": {
        "type": "object",
        "properties": {
          "session_id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The price, at the working prices: per billing interval for a plan, once for a credit pack."
          },
          "trial_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Days of trial this session really gives before the plan first charges; null when it gives none (a credit pack, or an account whose trial was used or that held a plan, which pays the plan from the start)."
          },
          "trial_fee_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "What this session's trial costs at signup, charged once to the card; null when the session gives no trial."
          },
          "pricing_status": {
            "type": "string",
            "const": "owner-approved"
          }
        },
        "required": [
          "session_id",
          "url",
          "amount_cents",
          "trial_days",
          "trial_fee_cents",
          "pricing_status"
        ],
        "additionalProperties": false
      },
      "PostBillingStartPlanResponse": {
        "type": "object",
        "properties": {
          "started": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "started"
        ],
        "additionalProperties": false
      },
      "PostBillingPortalRequest": {
        "type": "object",
        "properties": {
          "return_url": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri",
            "description": "Where the portal sends the customer back to. Must be on this service's own site."
          },
          "flow": {
            "description": "\"cancel\" opens straight on the cancel step for the running plan. Left out, the portal opens on its home page.",
            "type": "string",
            "enum": [
              "cancel"
            ]
          }
        },
        "required": [
          "return_url"
        ]
      },
      "PostBillingPortalResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      },
      "GetBillingResponse": {
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "PostBillingWebhookResponse": {
        "type": "object",
        "properties": {
          "received": {
            "type": "boolean",
            "const": true
          },
          "outcome": {
            "type": "string",
            "enum": [
              "applied",
              "duplicate",
              "ignored",
              "ignored_foreign_brand",
              "ignored_wrong_mode",
              "needs_review"
            ]
          },
          "type": {
            "type": "string"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "received",
          "outcome",
          "type",
          "detail"
        ],
        "additionalProperties": false
      },
      "PostAutopilotRunsRequest": {
        "type": "object",
        "properties": {
          "website_url": {
            "type": "string",
            "minLength": 4,
            "maxLength": 2048,
            "description": "The business website the agent reads (public http or https)."
          },
          "budget_credits": {
            "type": "integer",
            "minimum": 2,
            "maximum": 1000000,
            "description": "The most credits the run may spend. 2 covers one prospect; about 50 prospects are planned when the budget allows."
          },
          "reply_mode": {
            "default": "draft",
            "type": "string",
            "enum": [
              "draft",
              "auto"
            ]
          },
          "starter_kit": {
            "default": false,
            "description": "A starter kit run can only be approved by a person in the app, never by an API key.",
            "type": "boolean"
          },
          "timezone": {
            "description": "IANA time zone for the campaign schedule (default America/New_York).",
            "type": "string",
            "maxLength": 64
          },
          "mailbox_ids": {
            "description": "Connected mailboxes to send from.",
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            }
          },
          "domain_order": {
            "description": "Also register a sending domain and order mailboxes on it, within the stated price ceiling.",
            "type": "object",
            "properties": {
              "domain": {
                "type": "string",
                "minLength": 3,
                "maxLength": 253,
                "description": "A .com or .org domain to register for sending."
              },
              "max_price_cents": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991,
                "description": "The most the owner approves paying for the domain, in cents. Registration refuses above it."
              },
              "mailboxes": {
                "minItems": 1,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "local_part": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "first_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "last_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "required": [
                    "local_part",
                    "first_name",
                    "last_name"
                  ]
                }
              }
            },
            "required": [
              "domain",
              "max_price_cents",
              "mailboxes"
            ]
          }
        },
        "required": [
          "website_url",
          "budget_credits"
        ]
      },
      "PostAutopilotRunsResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "estimating",
              "awaiting_approval",
              "approved",
              "running",
              "paused",
              "completed",
              "cancelled",
              "failed"
            ]
          },
          "website_url": {
            "type": "string"
          },
          "budget_credits": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "reply_mode": {
            "type": "string",
            "enum": [
              "draft",
              "auto"
            ]
          },
          "starter_kit": {
            "type": "boolean"
          },
          "timezone": {
            "type": "string"
          },
          "mailbox_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "icp": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "The ideal customer profile the agent derived from the website."
          },
          "plan": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "What approval covers: who (ICP, audience size, target prospects), what (draft campaign, sequence, steps, reply mode, domain order) and cost (credits and cents), plus `blocked` steps that cannot run yet and why."
          },
          "campaign_id": {
            "description": "The DRAFT campaign. Nothing sends before approval.",
            "type": [
              "string",
              "null"
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": {}
            },
            "description": "Each step with its status (pending, done, blocked, failed) and, when blocked, who or what blocks it."
          },
          "pause_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "approval": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "approver_kind": {
                    "type": "string",
                    "enum": [
                      "person",
                      "agent"
                    ]
                  },
                  "approver_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cost_credits": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "approved_at": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "approver_kind",
                  "approver_ref",
                  "cost_credits",
                  "approved_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "website_url",
          "budget_credits",
          "reply_mode",
          "starter_kit",
          "timezone",
          "mailbox_ids",
          "icp",
          "plan",
          "campaign_id",
          "steps",
          "pause_reason",
          "error",
          "created_at",
          "updated_at",
          "completed_at",
          "approval"
        ],
        "additionalProperties": false
      },
      "GetAutopilotRunsResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "estimating",
                    "awaiting_approval",
                    "approved",
                    "running",
                    "paused",
                    "completed",
                    "cancelled",
                    "failed"
                  ]
                },
                "website_url": {
                  "type": "string"
                },
                "budget_credits": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "reply_mode": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "auto"
                  ]
                },
                "starter_kit": {
                  "type": "boolean"
                },
                "timezone": {
                  "type": "string"
                },
                "mailbox_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "icp": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": {}
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The ideal customer profile the agent derived from the website."
                },
                "plan": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": {}
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "What approval covers: who (ICP, audience size, target prospects), what (draft campaign, sequence, steps, reply mode, domain order) and cost (credits and cents), plus `blocked` steps that cannot run yet and why."
                },
                "campaign_id": {
                  "description": "The DRAFT campaign. Nothing sends before approval.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "steps": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {}
                  },
                  "description": "Each step with its status (pending, done, blocked, failed) and, when blocked, who or what blocks it."
                },
                "pause_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                },
                "completed_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approval": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "approver_kind": {
                          "type": "string",
                          "enum": [
                            "person",
                            "agent"
                          ]
                        },
                        "approver_ref": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "cost_credits": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "approved_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "approver_kind",
                        "approver_ref",
                        "cost_credits",
                        "approved_at"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "status",
                "website_url",
                "budget_credits",
                "reply_mode",
                "starter_kit",
                "timezone",
                "mailbox_ids",
                "icp",
                "plan",
                "campaign_id",
                "steps",
                "pause_reason",
                "error",
                "created_at",
                "updated_at",
                "completed_at",
                "approval"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "GetAutopilotRunsByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "estimating",
              "awaiting_approval",
              "approved",
              "running",
              "paused",
              "completed",
              "cancelled",
              "failed"
            ]
          },
          "website_url": {
            "type": "string"
          },
          "budget_credits": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "reply_mode": {
            "type": "string",
            "enum": [
              "draft",
              "auto"
            ]
          },
          "starter_kit": {
            "type": "boolean"
          },
          "timezone": {
            "type": "string"
          },
          "mailbox_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "icp": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "The ideal customer profile the agent derived from the website."
          },
          "plan": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "What approval covers: who (ICP, audience size, target prospects), what (draft campaign, sequence, steps, reply mode, domain order) and cost (credits and cents), plus `blocked` steps that cannot run yet and why."
          },
          "campaign_id": {
            "description": "The DRAFT campaign. Nothing sends before approval.",
            "type": [
              "string",
              "null"
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": {}
            },
            "description": "Each step with its status (pending, done, blocked, failed) and, when blocked, who or what blocks it."
          },
          "pause_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "approval": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "approver_kind": {
                    "type": "string",
                    "enum": [
                      "person",
                      "agent"
                    ]
                  },
                  "approver_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cost_credits": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "approved_at": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "approver_kind",
                  "approver_ref",
                  "cost_credits",
                  "approved_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "website_url",
          "budget_credits",
          "reply_mode",
          "starter_kit",
          "timezone",
          "mailbox_ids",
          "icp",
          "plan",
          "campaign_id",
          "steps",
          "pause_reason",
          "error",
          "created_at",
          "updated_at",
          "completed_at",
          "approval"
        ],
        "additionalProperties": false
      },
      "PostAutopilotRunsByIdApproveResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "estimating",
              "awaiting_approval",
              "approved",
              "running",
              "paused",
              "completed",
              "cancelled",
              "failed"
            ]
          },
          "website_url": {
            "type": "string"
          },
          "budget_credits": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "reply_mode": {
            "type": "string",
            "enum": [
              "draft",
              "auto"
            ]
          },
          "starter_kit": {
            "type": "boolean"
          },
          "timezone": {
            "type": "string"
          },
          "mailbox_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "icp": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "The ideal customer profile the agent derived from the website."
          },
          "plan": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "What approval covers: who (ICP, audience size, target prospects), what (draft campaign, sequence, steps, reply mode, domain order) and cost (credits and cents), plus `blocked` steps that cannot run yet and why."
          },
          "campaign_id": {
            "description": "The DRAFT campaign. Nothing sends before approval.",
            "type": [
              "string",
              "null"
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": {}
            },
            "description": "Each step with its status (pending, done, blocked, failed) and, when blocked, who or what blocks it."
          },
          "pause_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "approval": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "approver_kind": {
                    "type": "string",
                    "enum": [
                      "person",
                      "agent"
                    ]
                  },
                  "approver_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cost_credits": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "approved_at": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "approver_kind",
                  "approver_ref",
                  "cost_credits",
                  "approved_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "website_url",
          "budget_credits",
          "reply_mode",
          "starter_kit",
          "timezone",
          "mailbox_ids",
          "icp",
          "plan",
          "campaign_id",
          "steps",
          "pause_reason",
          "error",
          "created_at",
          "updated_at",
          "completed_at",
          "approval"
        ],
        "additionalProperties": false
      },
      "PostAutopilotRunsByIdResumeResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "estimating",
              "awaiting_approval",
              "approved",
              "running",
              "paused",
              "completed",
              "cancelled",
              "failed"
            ]
          },
          "website_url": {
            "type": "string"
          },
          "budget_credits": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "reply_mode": {
            "type": "string",
            "enum": [
              "draft",
              "auto"
            ]
          },
          "starter_kit": {
            "type": "boolean"
          },
          "timezone": {
            "type": "string"
          },
          "mailbox_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "icp": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "The ideal customer profile the agent derived from the website."
          },
          "plan": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "What approval covers: who (ICP, audience size, target prospects), what (draft campaign, sequence, steps, reply mode, domain order) and cost (credits and cents), plus `blocked` steps that cannot run yet and why."
          },
          "campaign_id": {
            "description": "The DRAFT campaign. Nothing sends before approval.",
            "type": [
              "string",
              "null"
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": {}
            },
            "description": "Each step with its status (pending, done, blocked, failed) and, when blocked, who or what blocks it."
          },
          "pause_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "approval": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "approver_kind": {
                    "type": "string",
                    "enum": [
                      "person",
                      "agent"
                    ]
                  },
                  "approver_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cost_credits": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "approved_at": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "approver_kind",
                  "approver_ref",
                  "cost_credits",
                  "approved_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "website_url",
          "budget_credits",
          "reply_mode",
          "starter_kit",
          "timezone",
          "mailbox_ids",
          "icp",
          "plan",
          "campaign_id",
          "steps",
          "pause_reason",
          "error",
          "created_at",
          "updated_at",
          "completed_at",
          "approval"
        ],
        "additionalProperties": false
      },
      "PostAutopilotRunsByIdCancelResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "estimating",
              "awaiting_approval",
              "approved",
              "running",
              "paused",
              "completed",
              "cancelled",
              "failed"
            ]
          },
          "website_url": {
            "type": "string"
          },
          "budget_credits": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "reply_mode": {
            "type": "string",
            "enum": [
              "draft",
              "auto"
            ]
          },
          "starter_kit": {
            "type": "boolean"
          },
          "timezone": {
            "type": "string"
          },
          "mailbox_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "icp": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "The ideal customer profile the agent derived from the website."
          },
          "plan": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "What approval covers: who (ICP, audience size, target prospects), what (draft campaign, sequence, steps, reply mode, domain order) and cost (credits and cents), plus `blocked` steps that cannot run yet and why."
          },
          "campaign_id": {
            "description": "The DRAFT campaign. Nothing sends before approval.",
            "type": [
              "string",
              "null"
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": {}
            },
            "description": "Each step with its status (pending, done, blocked, failed) and, when blocked, who or what blocks it."
          },
          "pause_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "approval": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "approver_kind": {
                    "type": "string",
                    "enum": [
                      "person",
                      "agent"
                    ]
                  },
                  "approver_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cost_credits": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "approved_at": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "approver_kind",
                  "approver_ref",
                  "cost_credits",
                  "approved_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "website_url",
          "budget_credits",
          "reply_mode",
          "starter_kit",
          "timezone",
          "mailbox_ids",
          "icp",
          "plan",
          "campaign_id",
          "steps",
          "pause_reason",
          "error",
          "created_at",
          "updated_at",
          "completed_at",
          "approval"
        ],
        "additionalProperties": false
      },
      "GetAutopilotKillSwitchResponse": {
        "type": "object",
        "properties": {
          "killed": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "killed",
          "reason",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "PostAutopilotKillSwitchRequest": {
        "type": "object",
        "properties": {
          "killed": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "maxLength": 300
          }
        },
        "required": [
          "killed"
        ]
      },
      "PostAutopilotKillSwitchResponse": {
        "type": "object",
        "properties": {
          "killed": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "paused_runs": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "killed",
          "reason",
          "updated_at",
          "paused_runs"
        ],
        "additionalProperties": false
      },
      "GetDomainsSearchResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "domain": {
                  "type": "string"
                },
                "available": {
                  "type": "boolean"
                },
                "price_cents": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "First year, in cents."
                },
                "renewal_price_cents": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "type": "string",
                  "const": "USD"
                },
                "premium": {
                  "type": "boolean"
                }
              },
              "required": [
                "domain",
                "available",
                "price_cents",
                "renewal_price_cents",
                "currency",
                "premium"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "results"
        ],
        "additionalProperties": false
      },
      "PostDomainsOrdersRequest": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "minLength": 3,
            "maxLength": 253
          },
          "confirmed": {
            "type": "boolean",
            "const": true,
            "description": "Must be true. A domain or mailbox order is final and spends money; it is never placed without this."
          },
          "max_price_cents": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "The most the order may cost in cents. It is refused when the live price is higher."
          },
          "contact": {
            "description": "Registrant contact, for registrars that need one.",
            "type": "object",
            "properties": {
              "first_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "last_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "organization": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "type": "string",
                "maxLength": 320
              },
              "phone": {
                "type": "string",
                "maxLength": 32,
                "description": "E.164, for example +14155550100."
              },
              "address1": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "address2": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "city": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "region": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "postal_code": {
                "type": "string",
                "minLength": 1,
                "maxLength": 20
              },
              "country": {
                "type": "string",
                "minLength": 2,
                "maxLength": 2,
                "description": "ISO 3166-1 alpha-2."
              }
            },
            "required": [
              "first_name",
              "last_name",
              "email",
              "phone",
              "address1",
              "city",
              "region",
              "postal_code",
              "country"
            ]
          }
        },
        "required": [
          "domain",
          "confirmed",
          "max_price_cents"
        ]
      },
      "PostDomainsOrdersResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "domain",
              "mailboxes"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "provisioning",
              "connected",
              "failed"
            ],
            "description": "requested, then provisioning (the customer is charged and the vendor is working), then connected or failed."
          },
          "domain": {
            "type": "string"
          },
          "quoted_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "The price the customer was quoted and charged, in cents."
          },
          "charged_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "vendor_order_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "failure_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "detail": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "domain",
          "quoted_cents",
          "charged_cents",
          "vendor_order_id",
          "failure_reason",
          "detail",
          "created_at",
          "updated_at",
          "completed_at"
        ],
        "additionalProperties": false
      },
      "PostMailboxOrdersRequest": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "minLength": 3,
            "maxLength": 253
          },
          "mailboxes": {
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "local_part": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$",
                  "description": "The part before the @."
                },
                "first_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "last_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                }
              },
              "required": [
                "local_part",
                "first_name",
                "last_name"
              ]
            }
          },
          "confirmed": {
            "type": "boolean",
            "const": true,
            "description": "Must be true. A domain or mailbox order is final and spends money; it is never placed without this."
          },
          "max_price_cents": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "The most the order may cost in cents. It is refused when the live price is higher."
          }
        },
        "required": [
          "domain",
          "mailboxes",
          "confirmed",
          "max_price_cents"
        ]
      },
      "PostMailboxOrdersResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "domain",
              "mailboxes"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "provisioning",
              "connected",
              "failed"
            ],
            "description": "requested, then provisioning (the customer is charged and the vendor is working), then connected or failed."
          },
          "domain": {
            "type": "string"
          },
          "quoted_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "The price the customer was quoted and charged, in cents."
          },
          "charged_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "vendor_order_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "failure_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "detail": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "domain",
          "quoted_cents",
          "charged_cents",
          "vendor_order_id",
          "failure_reason",
          "detail",
          "created_at",
          "updated_at",
          "completed_at"
        ],
        "additionalProperties": false
      },
      "GetOrdersResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "domain",
                    "mailboxes"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "requested",
                    "provisioning",
                    "connected",
                    "failed"
                  ],
                  "description": "requested, then provisioning (the customer is charged and the vendor is working), then connected or failed."
                },
                "domain": {
                  "type": "string"
                },
                "quoted_cents": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The price the customer was quoted and charged, in cents."
                },
                "charged_cents": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "vendor_order_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "failure_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "detail": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": {}
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                },
                "completed_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "status",
                "domain",
                "quoted_cents",
                "charged_cents",
                "vendor_order_id",
                "failure_reason",
                "detail",
                "created_at",
                "updated_at",
                "completed_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "GetOrdersByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "domain",
              "mailboxes"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "provisioning",
              "connected",
              "failed"
            ],
            "description": "requested, then provisioning (the customer is charged and the vendor is working), then connected or failed."
          },
          "domain": {
            "type": "string"
          },
          "quoted_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "The price the customer was quoted and charged, in cents."
          },
          "charged_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "vendor_order_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "failure_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "detail": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "domain",
          "quoted_cents",
          "charged_cents",
          "vendor_order_id",
          "failure_reason",
          "detail",
          "created_at",
          "updated_at",
          "completed_at"
        ],
        "additionalProperties": false
      },
      "PostProspectsSourceRequest": {
        "type": "object",
        "properties": {
          "icp": {
            "description": "The profile to search. Give this or icp_id.",
            "type": "object",
            "properties": {
              "titles": {
                "default": [],
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "seniorities": {
                "default": [],
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                }
              },
              "industries": {
                "default": [],
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "locations": {
                "default": [],
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "employee_count_min": {
                "default": null,
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "employee_count_max": {
                "default": null,
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "keywords": {
                "default": [],
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              }
            }
          },
          "icp_id": {
            "description": "A profile saved with POST /v1/icps.",
            "type": "string",
            "maxLength": 100
          },
          "count": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 500
          },
          "campaign_id": {
            "description": "Add the revealed leads to this campaign.",
            "type": "string",
            "maxLength": 100
          },
          "list_id": {
            "description": "Add the revealed leads to this lead list.",
            "type": "string",
            "maxLength": 100
          }
        }
      },
      "PostProspectsSourceResponse": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "delivered": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ref": {
                  "type": "string"
                },
                "lead_id": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                }
              },
              "required": [
                "ref",
                "lead_id",
                "email"
              ],
              "additionalProperties": false
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ref": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "ref",
                "reason"
              ],
              "additionalProperties": false
            },
            "description": "Contacts that cost nothing, with why."
          },
          "credits_charged": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "candidates_found": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "provider",
          "delivered",
          "skipped",
          "credits_charged",
          "candidates_found"
        ],
        "additionalProperties": false
      },
      "PostIcpsRequest": {
        "type": "object",
        "properties": {
          "titles": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "seniorities": {
            "default": [],
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "industries": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "locations": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "employee_count_min": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000000
              },
              {
                "type": "null"
              }
            ]
          },
          "employee_count_max": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000000
              },
              {
                "type": "null"
              }
            ]
          },
          "keywords": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        },
        "required": [
          "name"
        ]
      },
      "PostIcpsResponse": {
        "type": "object",
        "properties": {
          "titles": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "seniorities": {
            "default": [],
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "industries": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "locations": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "employee_count_min": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000000
              },
              {
                "type": "null"
              }
            ]
          },
          "employee_count_max": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000000
              },
              {
                "type": "null"
              }
            ]
          },
          "keywords": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "titles",
          "seniorities",
          "industries",
          "locations",
          "employee_count_min",
          "employee_count_max",
          "keywords",
          "id",
          "name",
          "created_at"
        ],
        "additionalProperties": false
      },
      "GetIcpsResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "titles": {
                  "default": [],
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "seniorities": {
                  "default": [],
                  "maxItems": 10,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  }
                },
                "industries": {
                  "default": [],
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "locations": {
                  "default": [],
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "employee_count_min": {
                  "default": null,
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 10000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "employee_count_max": {
                  "default": null,
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 10000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "keywords": {
                  "default": [],
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string"
                }
              },
              "required": [
                "titles",
                "seniorities",
                "industries",
                "locations",
                "employee_count_min",
                "employee_count_max",
                "keywords",
                "id",
                "name",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PostWebhooksRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "description": "An https URL on a public host."
          },
          "events": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "EmailSent",
                "EmailReply",
                "EmailBounce",
                "LeadCreated",
                "EmailUnsubscribe",
                "CreditBalanceLow",
                "AutopilotRunStatusChanged",
                "DfyOrderCompleted",
                "MailboxDisconnected",
                "CampaignCompleted"
              ]
            },
            "description": "The events to deliver."
          },
          "description": {
            "type": "string",
            "maxLength": 200
          },
          "enabled": {
            "default": true,
            "type": "boolean"
          }
        },
        "required": [
          "url",
          "events"
        ]
      },
      "PostWebhooksResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "EmailSent",
                "EmailReply",
                "EmailBounce",
                "LeadCreated",
                "EmailUnsubscribe",
                "CreditBalanceLow",
                "AutopilotRunStatusChanged",
                "DfyOrderCompleted",
                "MailboxDisconnected",
                "CampaignCompleted"
              ]
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "secret": {
            "type": "string",
            "description": "The signing secret. Store it now; it is not shown again."
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "events",
          "enabled",
          "created_at",
          "updated_at",
          "secret"
        ],
        "additionalProperties": false
      },
      "GetWebhooksResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "events": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "EmailSent",
                      "EmailReply",
                      "EmailBounce",
                      "LeadCreated",
                      "EmailUnsubscribe",
                      "CreditBalanceLow",
                      "AutopilotRunStatusChanged",
                      "DfyOrderCompleted",
                      "MailboxDisconnected",
                      "CampaignCompleted"
                    ]
                  }
                },
                "enabled": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "url",
                "description",
                "events",
                "enabled",
                "created_at",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PatchWebhooksByIdRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          },
          "events": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "EmailSent",
                "EmailReply",
                "EmailBounce",
                "LeadCreated",
                "EmailUnsubscribe",
                "CreditBalanceLow",
                "AutopilotRunStatusChanged",
                "DfyOrderCompleted",
                "MailboxDisconnected",
                "CampaignCompleted"
              ]
            }
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "PatchWebhooksByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "EmailSent",
                "EmailReply",
                "EmailBounce",
                "LeadCreated",
                "EmailUnsubscribe",
                "CreditBalanceLow",
                "AutopilotRunStatusChanged",
                "DfyOrderCompleted",
                "MailboxDisconnected",
                "CampaignCompleted"
              ]
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "events",
          "enabled",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "DeleteWebhooksByIdResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": false
      },
      "PostWebhooksByIdTestResponse": {
        "type": "object",
        "properties": {
          "delivery": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "endpoint_id": {
                "type": "string"
              },
              "event_id": {
                "type": "string"
              },
              "event_type": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "succeeded",
                  "dead",
                  "cancelled"
                ],
                "description": "dead: every attempt failed. Retries back off from 30 seconds up to 6 hours, 8 attempts in all."
              },
              "attempts": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "next_attempt_at": {
                "type": "string"
              },
              "last_attempt_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_http_status": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_error": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string"
              },
              "completed_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "endpoint_id",
              "event_id",
              "event_type",
              "status",
              "attempts",
              "next_attempt_at",
              "last_attempt_at",
              "last_http_status",
              "last_error",
              "created_at",
              "completed_at"
            ],
            "additionalProperties": false
          },
          "result": {
            "type": "object",
            "properties": {
              "outcome": {
                "type": "string",
                "enum": [
                  "succeeded",
                  "retry_scheduled",
                  "dead",
                  "cancelled",
                  "skipped"
                ]
              },
              "http_status": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "outcome",
              "http_status",
              "error"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "delivery",
          "result"
        ],
        "additionalProperties": false
      },
      "GetWebhooksByIdDeliveriesResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "endpoint_id": {
                  "type": "string"
                },
                "event_id": {
                  "type": "string"
                },
                "event_type": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "succeeded",
                    "dead",
                    "cancelled"
                  ],
                  "description": "dead: every attempt failed. Retries back off from 30 seconds up to 6 hours, 8 attempts in all."
                },
                "attempts": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "next_attempt_at": {
                  "type": "string"
                },
                "last_attempt_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_http_status": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_error": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "completed_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "endpoint_id",
                "event_id",
                "event_type",
                "status",
                "attempts",
                "next_attempt_at",
                "last_attempt_at",
                "last_http_status",
                "last_error",
                "created_at",
                "completed_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "GetToolsDnsAuthResponse": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "overall": {
            "type": "string",
            "enum": [
              "pass",
              "warn",
              "fail",
              "missing",
              "unknown"
            ]
          },
          "spf": {
            "type": "object",
            "properties": {},
            "additionalProperties": {}
          },
          "dkim": {
            "type": "object",
            "properties": {},
            "additionalProperties": {}
          },
          "dmarc": {
            "type": "object",
            "properties": {},
            "additionalProperties": {}
          },
          "recommended_records": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "Present only when `providers` was given."
          }
        },
        "required": [
          "domain",
          "overall",
          "spf",
          "dkim",
          "dmarc",
          "recommended_records"
        ],
        "additionalProperties": false
      },
      "GetToolsMxResponse": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "records": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "exchange": {
                  "type": "string"
                },
                "priority": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "provider": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "exchange",
                "priority",
                "provider"
              ],
              "additionalProperties": false
            }
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "verdict": {
            "type": "string",
            "enum": [
              "ok",
              "no_mx",
              "null_mx",
              "implicit_mx",
              "lookup_failed"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "domain",
          "records",
          "provider",
          "verdict",
          "message"
        ],
        "additionalProperties": false
      },
      "PostToolsSpintaxRequest": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 21000
          },
          "seed": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            ]
          }
        },
        "required": [
          "text"
        ]
      },
      "PostToolsSpintaxResponse": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "variants": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "position",
                "message"
              ],
              "additionalProperties": false
            }
          },
          "expanded": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "valid",
          "variants",
          "errors",
          "expanded"
        ],
        "additionalProperties": false
      },
      "PostToolsSubjectLintRequest": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "subject"
        ]
      },
      "PostToolsSubjectLintResponse": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "length": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "ok": {
            "type": "boolean"
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning",
                    "info"
                  ]
                },
                "message": {
                  "type": "string"
                },
                "matches": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "code",
                "severity",
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "subject",
          "length",
          "ok",
          "findings"
        ],
        "additionalProperties": false
      },
      "GetToolsEmailPatternResponse": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "address": {
                  "type": "string"
                },
                "pattern": {
                  "type": "string"
                }
              },
              "required": [
                "address",
                "pattern"
              ],
              "additionalProperties": false
            }
          },
          "must_verify_before_use": {
            "type": "boolean",
            "const": true
          },
          "notice": {
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "used": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "cap": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "remaining": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "resets_at": {
                "type": "string"
              }
            },
            "required": [
              "used",
              "cap",
              "remaining",
              "resets_at"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "domain",
          "candidates",
          "must_verify_before_use",
          "notice",
          "usage"
        ],
        "additionalProperties": false
      },
      "PostImportInstantlyRequest": {
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "An Instantly API v2 key. Used for this request only."
          }
        },
        "required": [
          "api_key"
        ]
      },
      "PostImportInstantlyResponse": {
        "type": "object",
        "properties": {
          "campaigns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "external_id": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "steps_imported": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "external_id",
                "id",
                "name",
                "steps_imported",
                "warnings"
              ],
              "additionalProperties": false
            }
          },
          "leads": {
            "type": "object",
            "properties": {
              "created": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "updated": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "rejected": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Rows that are not usable, for example an invalid address."
              },
              "skipped_suppressed": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "On your suppression list: not imported."
              },
              "skipped_over_plan_cap": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "New leads that would exceed the plan's active contact cap: not imported."
              }
            },
            "required": [
              "created",
              "updated",
              "rejected",
              "skipped_suppressed",
              "skipped_over_plan_cap"
            ],
            "additionalProperties": false
          },
          "suppression": {
            "type": "object",
            "properties": {
              "created": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "rejected": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "created",
              "rejected"
            ],
            "additionalProperties": false
          },
          "truncated": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What was cut at the per-import limit, so you can import in parts."
          },
          "mailboxes": {
            "type": "string",
            "description": "Mailboxes are not importable: reconnect them."
          },
          "webhooks": {
            "type": "string"
          }
        },
        "required": [
          "campaigns",
          "leads",
          "suppression",
          "truncated",
          "mailboxes",
          "webhooks"
        ],
        "additionalProperties": false
      },
      "PostImportSmartleadCsvResponse": {
        "type": "object",
        "properties": {
          "layout": {
            "type": "string",
            "enum": [
              "smartlead",
              "generic"
            ]
          },
          "rows_read": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "leads": {
            "type": "object",
            "properties": {
              "created": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "updated": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "rejected": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Rows that are not usable, for example an invalid address."
              },
              "skipped_suppressed": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "On your suppression list: not imported."
              },
              "skipped_over_plan_cap": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "New leads that would exceed the plan's active contact cap: not imported."
              }
            },
            "required": [
              "created",
              "updated",
              "rejected",
              "skipped_suppressed",
              "skipped_over_plan_cap"
            ],
            "additionalProperties": false
          },
          "rejected_rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "line": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "line",
                "email",
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "flagged_cells": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "line": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "column": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "line",
                "column",
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mailboxes": {
            "type": "string"
          }
        },
        "required": [
          "layout",
          "rows_read",
          "leads",
          "rejected_rows",
          "flagged_cells",
          "warnings",
          "mailboxes"
        ],
        "additionalProperties": false
      },
      "PostMcpResponse": {
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      }
    }
  },
  "servers": [
    {
      "url": "https://api.coldagentai.com"
    }
  ]
}
