{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/porkbun-com/json-schema/porkbun-com-dry-run-preview-response-schema.json",
  "title": "DryRunPreviewResponse",
  "description": "Returned (HTTP 200) by /domain/create, /domain/renew, and /domain/transfer when the request includes `dryRun: true`. All validation has run but nothing was created or charged. All money amounts are in pennies (USD cents).",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/porkbun-com-openapi.json#/components/schemas/DryRunPreviewResponse",
  "type": "object",
  "properties": {
    "status": {
      "type": "string"
    },
    "dryRun": {
      "type": "boolean",
      "description": "Always true on a dry-run preview — distinguishes it from a real success response."
    },
    "wouldSucceed": {
      "type": "boolean",
      "description": "True if the operation would complete given current funds and spend-limit state. (Hard validation failures — unavailable, bad price, ineligible — return a normal error response instead of a preview.)"
    },
    "operation": {
      "type": "string",
      "enum": [
        "registration",
        "renewal",
        "transfer"
      ]
    },
    "domain": {
      "type": "string"
    },
    "tld": {
      "type": "string"
    },
    "available": {
      "type": "string",
      "description": "Availability as reported by the registry check (e.g. `available` / `unavailable`)."
    },
    "premium": {
      "type": "boolean",
      "description": "Whether the domain is a premium/aftermarket name."
    },
    "duration": {
      "type": "integer",
      "description": "Term in years that would be purchased."
    },
    "cost": {
      "type": "integer",
      "description": "Total cost in pennies that would be charged."
    },
    "costDisplay": {
      "type": "string",
      "description": "Human-readable cost."
    },
    "balance": {
      "type": "integer",
      "description": "Current account credit balance in pennies."
    },
    "sufficientFunds": {
      "type": "boolean",
      "description": "Whether the balance covers the cost."
    },
    "monthlySpendLimit": {
      "type": "integer",
      "description": "The account's monthly API spend cap in pennies. Present only if a cap is configured."
    },
    "monthlySpendSoFar": {
      "type": "integer",
      "description": "API spend so far this calendar month in pennies. Present only if a cap is configured."
    },
    "withinMonthlySpendLimit": {
      "type": "boolean",
      "description": "Whether this cost stays within the monthly cap. Present only if a cap is configured."
    },
    "message": {
      "type": "string",
      "description": "Human-readable summary of the preview outcome."
    },
    "requestId": {
      "type": "string",
      "description": "Per-request UUID (also in the X-Request-Id header). Present on every API response."
    }
  },
  "required": [
    "status",
    "dryRun",
    "wouldSucceed",
    "operation",
    "domain",
    "cost"
  ]
}