{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenOffer Properties approved agent integration",
    "version": "1.4",
    "description": "Approved discovery, namespace-aware resolution and separately customer-delegated buyer/seller preparation. Current native operator approval, credential and lane gate are required. A customer grants preparation for one asset, reviews exact fields and applies through their own session. Preparation never publishes, sends a response, submits an offer, accepts, pays or releases protected contact data.",
    "contact": {
      "email": "support@openofferproperties.com",
      "url": "https://www.openofferproperties.com/agents"
    }
  },
  "servers": [
    {
      "url": "https://www.openofferproperties.com"
    }
  ],
  "externalDocs": {
    "url": "https://www.openofferproperties.com/agents.md"
  },
  "paths": {
    "/agents/status": {
      "get": {
        "operationId": "getAgentAccessStatus",
        "summary": "Read the current external-access gate without credentials",
        "security": [],
        "responses": {
          "200": {
            "description": "Gate verified. Enabled status does not evaluate any principal or inventory.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentStatus"
                }
              }
            }
          },
          "503": {
            "description": "Gate could not be verified. Fail closed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentStatus"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent-rail/v1/opportunities": {
      "get": {
        "operationId": "discoverPropertyOpportunities",
        "summary": "Discover verified agent-safe opportunities",
        "description": "Current authorized discovery with exact asset/opportunity lookup, category, city, region and USD asking-price filters. Repeat all filters with nextCursor; it expires after15 minutes and is bound to lane/principal/delegation/filters. Each page rechecks authority and eligibility, including current ownership/privacy of customer publications. Pagination can return an empty page with hasMore=true after stale publications are hidden; continue with nextCursor. No immutable snapshot, registry-wide inventory or exhaustive coverage is promised. Identifier resolution uses the separate POST /api/agent-rail/v1/resolve endpoint.",
        "security": [
          {
            "AgentBearer": [],
            "AgentPrincipal": [],
            "RequestTimestamp": [],
            "RequestNonce": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "assetKey",
            "in": "query",
            "required": false,
            "description": "Exact existing assetKey from an authorized record; preserve its complete namespace and case. Not a raw plate/address owner lookup.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "opportunityId",
            "in": "query",
            "required": false,
            "description": "Exact opportunity identifier. Combined filters are intersected.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque nextCursor from the same lane, principal, delegation and filters; expires after 15 minutes. Generate a fresh authentication nonce for every page.",
            "schema": {
              "type": "string",
              "maxLength": 2048,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Z_]{1,40}$"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "minAskingPriceCents",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]{0,15})$",
              "description": "Integer cents within Number.MAX_SAFE_INTEGER; USD-priced records only."
            }
          },
          {
            "name": "maxAskingPriceCents",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]{0,15})$",
              "description": "Integer cents within Number.MAX_SAFE_INTEGER; USD-priced records only."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authenticated nonbinding discovery succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, missing nonce or stale timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "403": {
            "description": "External gate disabled or delegation missing/unsafe; stop and contact the operator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "409": {
            "description": "Nonce replay blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "429": {
            "description": "Per-principal rate limit; wait at least 60 seconds with jitter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; bounded retries only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid/duplicate/unknown query parameters, mismatched cursor or expired cursor. Restart pagination after cursor expiry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent-rail/v1/offer-preparations": {
      "post": {
        "operationId": "prepareCustomerReviewedOffer",
        "summary": "Prepare an offer for the authorizing customer to review",
        "description": "Uses the same bearer, principal, timestamp and fresh nonce as discovery. Body limit: 16000 bytes. Customer identity comes from the current delegation, never from caller-supplied identity or a borrowed session. Reuse requestId only for the exact same terms and delegation; use a fresh nonce on every retry. A replay can report a previously submitted offer, but this endpoint never submits it. No customer identity or terms are returned. Customer review and submission occur at /account/agents. Properties requires an existing customer-owned draft; this endpoint does not create or edit it.",
        "security": [
          {
            "AgentBearer": [],
            "AgentPrincipal": [],
            "RequestTimestamp": [],
            "RequestNonce": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "requestId",
                  "delegationId",
                  "offerId"
                ],
                "properties": {
                  "requestId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9._:-]{16,200}$"
                  },
                  "delegationId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9._:-]{1,200}$"
                  },
                  "offerId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9._:-]{1,200}$",
                    "description": "An existing DRAFT owned by the customer who granted permission, for the permitted property."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preparation created or exact request replayed; no submission performed by this request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferPreparationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential, timestamp or nonce is missing, stale or invalid."
          },
          "403": {
            "description": "Gate paused; operator or customer permission unavailable; wrong agent, asset or draft; permission limits exceeded."
          },
          "409": {
            "description": "Nonce replay, changed request retry, or stopped intent."
          },
          "422": {
            "description": "Invalid request or offer terms."
          },
          "429": {
            "description": "Shared per-principal rate limit or customer review queue limit reached."
          },
          "503": {
            "description": "Preparation unavailable. No submission performed."
          }
        }
      }
    },
    "/api/agent-rail/v1/customer-workflows": {
      "get": {
        "operationId": "getPropertiesCustomerWorkflowContext",
        "summary": "Read the current customer-authorized asset context or seller inbox",
        "security": [
          {
            "AgentBearer": [],
            "AgentPrincipal": [],
            "RequestTimestamp": [],
            "RequestNonce": []
          }
        ],
        "parameters": [
          {
            "name": "delegationId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Only the authorized asset context; no buyer contact data, credentials or customer identifiers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, missing nonce or stale timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "403": {
            "description": "External gate disabled or delegation missing/unsafe; stop and contact the operator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "409": {
            "description": "Nonce replay blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "429": {
            "description": "Per-principal rate limit; wait at least 60 seconds with jitter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; bounded retries only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid/duplicate/unknown query parameters, mismatched cursor or expired cursor. Restart pagination after cursor expiry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "preparePropertiesCustomerWorkflow",
        "summary": "Prepare a customer-reviewed seller listing, response or eligible buyer draft",
        "description": "Requires one current customer delegation with one of PREPARE_LISTING, PREPARE_RESPONSE, PREPARE_BUYER_DRAFT. This request stores a private review proposal only; no native customer action is applied. Use a stable requestId with identical proposal terms for uncertain retries.",
        "security": [
          {
            "AgentBearer": [],
            "AgentPrincipal": [],
            "RequestTimestamp": [],
            "RequestNonce": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "requestId",
                  "delegationId",
                  "proposal"
                ],
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 16,
                    "maxLength": 200
                  },
                  "delegationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "proposal": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ListingPreparationProposal"
                      },
                      {
                        "$ref": "#/components/schemas/SellerResponsePreparationProposal"
                      },
                      {
                        "$ref": "#/components/schemas/BuyerDraftPreparationProposal"
                      }
                    ],
                    "description": "The current delegation scope chooses the allowed proposal type; caller-supplied customer/asset authority is not accepted."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preparation or exact replay; applied=false until the customer applies the reviewed native action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowPreparationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, missing nonce or stale timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "403": {
            "description": "External gate disabled or delegation missing/unsafe; stop and contact the operator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "409": {
            "description": "Nonce replay blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "429": {
            "description": "Per-principal rate limit; wait at least 60 seconds with jitter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; bounded retries only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid/duplicate/unknown query parameters, mismatched cursor or expired cursor. Restart pagination after cursor expiry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent-rail/v1/resolve": {
      "post": {
        "operationId": "resolvePropertiesAuthorizedAsset",
        "summary": "Resolve a complete namespace into an already authorized, disclosure-approved opportunity",
        "description": "No records or ownership claims are created. A missing or ambiguous match never proves an asset absent, and no DMV/MLS/assessor coverage is claimed. Raw identifiers resolve only when the current seller publication permits exact-reference disclosure. Normal principal/delegation restrictions still apply.",
        "security": [
          {
            "AgentBearer": [],
            "AgentPrincipal": [],
            "RequestTimestamp": [],
            "RequestNonce": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "kind",
                      "address"
                    ],
                    "properties": {
                      "kind": {
                        "const": "ADDRESS"
                      },
                      "address": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "line1",
                          "city",
                          "region",
                          "postalCode",
                          "countryCode"
                        ],
                        "properties": {
                          "line1": {
                            "type": "string",
                            "maxLength": 160
                          },
                          "line2": {
                            "type": "string",
                            "maxLength": 80
                          },
                          "city": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "region": {
                            "type": "string",
                            "maxLength": 64
                          },
                          "postalCode": {
                            "type": "string",
                            "maxLength": 20
                          },
                          "countryCode": {
                            "type": "string",
                            "maxLength": 2
                          }
                        }
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "kind",
                      "parcelId",
                      "countryCode",
                      "region",
                      "city"
                    ],
                    "properties": {
                      "kind": {
                        "const": "PARCEL"
                      },
                      "parcelId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "countryCode": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2
                      },
                      "region": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "city": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "AUTHORIZED_MATCH or NO_AUTHORIZED_MATCH; only currently eligible agent-safe opportunities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials, missing nonce or stale timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "403": {
            "description": "External gate disabled or delegation missing/unsafe; stop and contact the operator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "409": {
            "description": "Nonce replay blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "429": {
            "description": "Per-principal rate limit; wait at least 60 seconds with jitter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; bounded retries only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid/duplicate/unknown query parameters, mismatched cursor or expired cursor. Restart pagination after cursor expiry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AgentBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Individually approved credential. Keep in a server-side secret store."
      },
      "AgentPrincipal": {
        "type": "apiKey",
        "in": "header",
        "name": "x-openoffer-principal",
        "description": "Issued principal identifier; maximum 200 characters."
      },
      "RequestTimestamp": {
        "type": "apiKey",
        "in": "header",
        "name": "x-openoffer-timestamp",
        "description": "Integer Unix epoch milliseconds, within five minutes of server time."
      },
      "RequestNonce": {
        "type": "apiKey",
        "in": "header",
        "name": "x-openoffer-nonce",
        "description": "Unique per request, 16\u2013200 characters. Generate fresh values for retries."
      }
    },
    "schemas": {
      "AgentStatus": {
        "type": "object",
        "required": [
          "schema",
          "lane",
          "machineAccess",
          "externalAccessEnabled",
          "bindingAuthority",
          "publicTransactionExecution",
          "checkedAt"
        ],
        "properties": {
          "schema": {
            "const": "openoffer-agent-status/v1"
          },
          "lane": {
            "const": "PROPERTIES"
          },
          "assetType": {
            "const": "PROPERTY"
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "referralReady": {
            "const": true
          },
          "machineAccess": {
            "type": "string",
            "enum": [
              "PAUSED",
              "UNAVAILABLE",
              "ENABLED_FOR_APPROVED_PRINCIPALS"
            ]
          },
          "externalAccessEnabled": {
            "type": "boolean"
          },
          "requiresOperatorApproval": {
            "const": true
          },
          "requiresActiveCredentialAndDelegation": {
            "const": true
          },
          "principalAuthorizationEvaluated": {
            "const": false
          },
          "supportedExternalScopes": {
            "type": "array",
            "items": {
              "const": "DISCOVER"
            }
          },
          "bindingAuthority": {
            "const": false
          },
          "publicTransactionExecution": {
            "const": false
          },
          "inventoryAvailabilityEvaluated": {
            "const": false
          },
          "rateLimitPerMinute": {
            "const": 30
          },
          "maximumCredentialLifetimeMinutes": {
            "const": 1440
          },
          "offerPreparation": {
            "type": "object",
            "properties": {
              "supported": {
                "const": true
              },
              "path": {
                "const": "/api/agent-rail/v1/offer-preparations"
              },
              "availability": {
                "enum": [
                  "PAUSED",
                  "UNAVAILABLE",
                  "REQUIRES_CUSTOMER_DELEGATION"
                ]
              },
              "requiresCustomerDelegation": {
                "const": true
              },
              "customerReviewRequired": {
                "const": true
              },
              "submitsOffer": {
                "const": false
              },
              "requiresExistingCustomerDraft": {
                "const": true
              }
            }
          },
          "workflowPreparation": {
            "type": "object",
            "properties": {
              "path": {
                "const": "/api/agent-rail/v1/customer-workflows"
              },
              "supportedCustomerScopes": {
                "type": "array",
                "items": {
                  "enum": [
                    "PREPARE_LISTING",
                    "PREPARE_RESPONSE",
                    "PREPARE_BUYER_DRAFT"
                  ]
                }
              },
              "customerReviewRequired": {
                "const": true
              },
              "agentAppliesNativeActions": {
                "const": false
              },
              "availability": {
                "enum": [
                  "PAUSED",
                  "UNAVAILABLE",
                  "REQUIRES_CUSTOMER_DELEGATION"
                ]
              }
            }
          }
        }
      },
      "DiscoveryError": {
        "type": "object",
        "required": [
          "ok",
          "error",
          "bindingExecuted"
        ],
        "properties": {
          "ok": {
            "const": false
          },
          "error": {
            "type": "string"
          },
          "bindingExecuted": {
            "const": false
          }
        }
      },
      "DiscoveryResponse": {
        "type": "object",
        "required": [
          "ok",
          "protocolVersion",
          "lane",
          "assetType",
          "opportunities",
          "count",
          "bindingDefault",
          "piiRedacted",
          "pagination"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "protocolVersion": {
            "const": "1.1"
          },
          "lane": {
            "const": "PROPERTIES"
          },
          "assetType": {
            "const": "PROPERTY"
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "bindingDefault": {
            "const": false
          },
          "piiRedacted": {
            "const": true
          },
          "publicFrontendChanged": {
            "const": false
          },
          "opportunities": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "object",
              "required": [
                "opportunityId",
                "lane",
                "assetType",
                "status",
                "evidenceState"
              ],
              "properties": {
                "opportunityId": {
                  "type": "string"
                },
                "lane": {
                  "const": "PROPERTIES"
                },
                "assetType": {
                  "const": "PROPERTY"
                },
                "assetKey": {
                  "type": "string"
                },
                "status": {
                  "const": "AVAILABLE"
                },
                "evidenceState": {
                  "const": "VERIFIED"
                },
                "sourceClass": {
                  "type": "string"
                },
                "sourcePolicy": {
                  "type": "string"
                },
                "allowedActions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Opportunity metadata only; does not grant additional scopes."
                },
                "terms": {
                  "type": "object",
                  "additionalProperties": true
                },
                "evidence": {
                  "type": "object",
                  "additionalProperties": true
                },
                "proofRefs": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "expiresAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "pagination": {
            "type": "object",
            "required": [
              "hasMore",
              "nextCursor",
              "snapshotAt",
              "cursorTtlSeconds",
              "consistency"
            ],
            "properties": {
              "hasMore": {
                "type": "boolean"
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "snapshotAt": {
                "type": "string",
                "format": "date-time"
              },
              "cursorTtlSeconds": {
                "const": 900
              },
              "consistency": {
                "const": "BOUNDED_WINDOW"
              }
            }
          }
        }
      },
      "OfferPreparationResponse": {
        "type": "object",
        "required": [
          "ok",
          "intentId",
          "state",
          "replayed",
          "submitted",
          "customerReviewRequired",
          "submissionPerformed",
          "reviewPath"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "intentId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,200}$"
          },
          "state": {
            "enum": [
              "AUTHORIZED",
              "EXECUTED"
            ]
          },
          "replayed": {
            "type": "boolean"
          },
          "submitted": {
            "type": "boolean",
            "description": "Whether this exact intent was already submitted by the customer."
          },
          "customerReviewRequired": {
            "const": true
          },
          "submissionPerformed": {
            "const": false
          },
          "reviewPath": {
            "const": "/account/agents"
          }
        }
      },
      "ListingPreparationProposal": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "title",
          "category",
          "city",
          "region",
          "askingPriceCents",
          "expiresAt",
          "discloseReference",
          "discoveryConsent"
        ],
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "When discloseReference=false, the server generates category/city/region title and the customer reviews that final title."
          },
          "category": {
            "enum": [
              "HOUSE",
              "CONDO",
              "MULTIFAMILY",
              "LAND",
              "COMMERCIAL",
              "INDUSTRIAL",
              "AGRICULTURAL",
              "OTHER_PROPERTY"
            ]
          },
          "city": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "askingPriceCents": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[1-9][0-9]{0,15}$",
            "description": "Positive integer cents within Number.MAX_SAFE_INTEGER, or null. Listing only; no offer acceptance."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "UTC ISO with milliseconds, in the future and within30 days."
          },
          "discloseReference": {
            "type": "boolean",
            "description": "Exact identifier disclosure is separately reviewed by the customer; Properties also needs native EXACT location privacy."
          },
          "discoveryConsent": {
            "const": true
          },
          "currency": {
            "const": "USD"
          }
        }
      },
      "SellerCounterPreparationTerms": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "counterOfferAmount",
          "counterFinancingType",
          "counterExpiresAt"
        ],
        "properties": {
          "counterOfferAmount": {
            "type": "string",
            "pattern": "^[0-9]{1,12}(\\.[0-9]{1,2})?$"
          },
          "counterEarnestMoneyAmount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]{1,12}(\\.[0-9]{1,2})?$"
          },
          "counterFinancingType": {
            "enum": [
              "CASH",
              "CONVENTIONAL",
              "FHA",
              "VA",
              "USDA",
              "HARD_MONEY",
              "PRIVATE_FINANCING",
              "SELLER_FINANCING",
              "OTHER"
            ]
          },
          "counterDownPaymentAmount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]{1,12}(\\.[0-9]{1,2})?$"
          },
          "counterRequestedClosingDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "counterPossessionDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "counterExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "otherContingencies": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 5000,
            "description": "Plain text only; no contact details, external links or instructions to change payment destinations."
          },
          "inspectionContingency": {
            "type": "boolean",
            "default": true
          },
          "financingContingency": {
            "type": "boolean",
            "default": true
          },
          "appraisalContingency": {
            "type": "boolean",
            "default": true
          },
          "saleOfPropertyContingency": {
            "type": "boolean",
            "default": false
          }
        },
        "description": "Future counter expiry and responseDeadline required; all native economics and date ordering apply. CASH requires financingContingency=false."
      },
      "SellerResponsePreparationProposal": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "offerId",
          "data"
        ],
        "properties": {
          "offerId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "enum": [
                  "DECLINED",
                  "IGNORED",
                  "COUNTERED"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 5000,
                "description": "Plain text only; no contact details, external links or instructions to change payment destinations."
              },
              "responseDeadline": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "counter": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SellerCounterPreparationTerms"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "allOf": [
              {
                "if": {
                  "properties": {
                    "action": {
                      "const": "COUNTERED"
                    }
                  }
                },
                "then": {
                  "required": [
                    "responseDeadline",
                    "counter"
                  ],
                  "properties": {
                    "responseDeadline": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "counter": {
                      "$ref": "#/components/schemas/SellerCounterPreparationTerms"
                    }
                  }
                },
                "else": {
                  "properties": {
                    "responseDeadline": {
                      "type": "null"
                    },
                    "counter": {
                      "type": "null"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "BuyerDraftPreparationProposal": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "propertyId",
          "offerAmount",
          "financingType"
        ],
        "properties": {
          "propertyId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "offerAmount": {
            "type": "string",
            "pattern": "^[0-9]{1,12}(\\.[0-9]{1,2})?$"
          },
          "earnestMoneyAmount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]{1,12}(\\.[0-9]{1,2})?$"
          },
          "financingType": {
            "enum": [
              "CASH",
              "CONVENTIONAL",
              "FHA",
              "VA",
              "USDA",
              "HARD_MONEY",
              "PRIVATE_FINANCING",
              "SELLER_FINANCING",
              "OTHER"
            ]
          },
          "downPaymentAmount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]{1,12}(\\.[0-9]{1,2})?$"
          },
          "requestedClosingDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "possessionDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "offerExpiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "otherContingencies": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 5000,
            "description": "Plain text only; no contact details, external links or instructions to change payment destinations."
          },
          "buyerMessage": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 5000,
            "description": "Plain text only; no contact details, external links or instructions to change payment destinations."
          },
          "privacyMode": {
            "const": "PRIVATE_UNTIL_ENGAGED"
          },
          "inspectionContingency": {
            "type": "boolean",
            "default": true
          },
          "financingContingency": {
            "type": "boolean",
            "default": true
          },
          "appraisalContingency": {
            "type": "boolean",
            "default": true
          },
          "saleOfPropertyContingency": {
            "type": "boolean",
            "default": false
          }
        },
        "description": "Creates a private draft only after customer review. Future dates, financing and amount checks use the native offer schema. CASH requires financingContingency=false."
      },
      "WorkflowPreparationResponse": {
        "type": "object",
        "required": [
          "ok",
          "intentId",
          "state",
          "replayed",
          "customerReviewRequired",
          "applied",
          "actionPerformed",
          "reviewPath"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "intentId": {
            "type": "string"
          },
          "state": {
            "enum": [
              "AUTHORIZED",
              "EXECUTED"
            ]
          },
          "replayed": {
            "type": "boolean"
          },
          "customerReviewRequired": {
            "const": true
          },
          "applied": {
            "type": "boolean",
            "description": "True only for a replay whose customer had already applied the action."
          },
          "actionPerformed": {
            "const": false
          },
          "reviewPath": {
            "const": "/account/agents"
          }
        }
      }
    }
  }
}
