{
  "openapi": "3.0.3",
  "info": {
    "title": "Further — Partner Webhook Events",
    "version": "v1",
    "description": "Signed webhook deliveries of the canonical buyer profile from Further to your HTTPS endpoint.\n\n**How to consume deliveries:**\n\n- Each delivery carries the full, current buyer profile — not a diff. Upsert it keyed on the stable\n  `buyerId`; delete that record when `BuyerDeleted` arrives.\n- Deliveries are **at-least-once** and can arrive out of order. Before applying a snapshot, compare\n  its `sentAt` with the `sentAt` you last stored for that buyer — apply if newer, skip if older.\n  (`BuyerDeleted` is the exception: always apply it.)\n- `deliveryId` and `eventId` identify the delivery attempt and the change that triggered it — quote\n  them in support requests. Do not use them for de-duplication or ordering.\n\n**Signing:** every delivery carries an HMAC-SHA256 signature over the exact raw body — see the\n`x-further-signature` header on each event and the Signature Verification guide.\n\n**Versioning:** the schema evolves additively — new optional fields and event types never break an\nintegration. A breaking change bumps `schemaVersion` and is announced in advance."
  },
  "paths": {},
  "x-webhooks": {
    "BuyerProfileChanged": {
      "post": {
        "operationId": "onBuyerProfileChanged",
        "summary": "BuyerProfileChanged",
        "description": "The buyer's profile changed. `data` is the full current canonical buyer snapshot.",
        "parameters": [
          {
            "name": "x-further-signature",
            "in": "header",
            "required": true,
            "description": "HMAC signature over the exact raw request body: `t=<unix_seconds>,v1=<hex hmac_sha256(secret, \"{t}.{rawBody}\")>`. Verify with your signing key and reject when `t` is outside ±300 s of now (replay protection). See the Signature Verification guide.",
            "schema": {
              "type": "string",
              "example": "t=1751848200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
            }
          },
          {
            "name": "x-further-delivery-id",
            "in": "header",
            "required": true,
            "description": "Mirrors `deliveryId` in the body — for tracing and support requests only.",
            "schema": {
              "type": "string",
              "example": "whd_1b7f8a2c-4b0e-4c8e-9f3a-2d6c1e5a9b0d"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BuyerProfileChangedEnvelope"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Acknowledged. Any 2xx acks the delivery. Respond quickly and process asynchronously — slow responses risk the 10 s delivery timeout and a redelivery."
          },
          "default": {
            "description": "`401`, `403`, `408`, `429`, `5xx`, network errors, and timeouts are retried with backoff; when retries exhaust, the delivery is parked for operator replay — deliveries are at-least-once. Any other non-2xx (including redirects, which are never followed) is treated as permanent: not retried, parked immediately for operator review. `410 Gone` marks the delivery permanently failed but does NOT unsubscribe your endpoint — new events still attempt delivery; contact Further to disable the subscription."
          }
        }
      }
    },
    "BuyerPlanChanged": {
      "post": {
        "operationId": "onBuyerPlanChanged",
        "summary": "BuyerPlanChanged",
        "description": "The buyer's homebuying plan (finances and/or location preferences) changed. `data` is the full current canonical buyer snapshot — one event type covers both, since the payload is a snapshot either way.",
        "parameters": [
          {
            "name": "x-further-signature",
            "in": "header",
            "required": true,
            "description": "HMAC signature over the exact raw request body: `t=<unix_seconds>,v1=<hex hmac_sha256(secret, \"{t}.{rawBody}\")>`. Verify with your signing key and reject when `t` is outside ±300 s of now (replay protection). See the Signature Verification guide.",
            "schema": {
              "type": "string",
              "example": "t=1751848200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
            }
          },
          {
            "name": "x-further-delivery-id",
            "in": "header",
            "required": true,
            "description": "Mirrors `deliveryId` in the body — for tracing and support requests only.",
            "schema": {
              "type": "string",
              "example": "whd_1b7f8a2c-4b0e-4c8e-9f3a-2d6c1e5a9b0d"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BuyerPlanChangedEnvelope"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Acknowledged. Any 2xx acks the delivery. Respond quickly and process asynchronously — slow responses risk the 10 s delivery timeout and a redelivery."
          },
          "default": {
            "description": "`401`, `403`, `408`, `429`, `5xx`, network errors, and timeouts are retried with backoff; when retries exhaust, the delivery is parked for operator replay — deliveries are at-least-once. Any other non-2xx (including redirects, which are never followed) is treated as permanent: not retried, parked immediately for operator review. `410 Gone` marks the delivery permanently failed but does NOT unsubscribe your endpoint — new events still attempt delivery; contact Further to disable the subscription."
          }
        }
      }
    },
    "LeadAssigned": {
      "post": {
        "operationId": "onLeadAssigned",
        "summary": "LeadAssigned",
        "description": "The buyer was assigned to an agent in your organization. `data` is the full current canonical buyer snapshot.",
        "parameters": [
          {
            "name": "x-further-signature",
            "in": "header",
            "required": true,
            "description": "HMAC signature over the exact raw request body: `t=<unix_seconds>,v1=<hex hmac_sha256(secret, \"{t}.{rawBody}\")>`. Verify with your signing key and reject when `t` is outside ±300 s of now (replay protection). See the Signature Verification guide.",
            "schema": {
              "type": "string",
              "example": "t=1751848200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
            }
          },
          {
            "name": "x-further-delivery-id",
            "in": "header",
            "required": true,
            "description": "Mirrors `deliveryId` in the body — for tracing and support requests only.",
            "schema": {
              "type": "string",
              "example": "whd_1b7f8a2c-4b0e-4c8e-9f3a-2d6c1e5a9b0d"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadAssignedEnvelope"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Acknowledged. Any 2xx acks the delivery. Respond quickly and process asynchronously — slow responses risk the 10 s delivery timeout and a redelivery."
          },
          "default": {
            "description": "`401`, `403`, `408`, `429`, `5xx`, network errors, and timeouts are retried with backoff; when retries exhaust, the delivery is parked for operator replay — deliveries are at-least-once. Any other non-2xx (including redirects, which are never followed) is treated as permanent: not retried, parked immediately for operator review. `410 Gone` marks the delivery permanently failed but does NOT unsubscribe your endpoint — new events still attempt delivery; contact Further to disable the subscription."
          }
        }
      }
    },
    "BuyerDeleted": {
      "post": {
        "operationId": "onBuyerDeleted",
        "summary": "BuyerDeleted",
        "description": "**Tombstone.** The buyer deleted their account: `data` is `null` and the envelope carries the same `buyerId` every prior delivery carried — delete the record you keyed on it, regardless of `sentAt`, and acknowledge like any other delivery (verify signature, respond 2xx). Keep the deletion itself on record and ignore any later delivery for this `buyerId`: it can only be a stale snapshot that was already in flight when the buyer deleted their account.",
        "parameters": [
          {
            "name": "x-further-signature",
            "in": "header",
            "required": true,
            "description": "HMAC signature over the exact raw request body: `t=<unix_seconds>,v1=<hex hmac_sha256(secret, \"{t}.{rawBody}\")>`. Verify with your signing key and reject when `t` is outside ±300 s of now (replay protection). See the Signature Verification guide.",
            "schema": {
              "type": "string",
              "example": "t=1751848200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
            }
          },
          {
            "name": "x-further-delivery-id",
            "in": "header",
            "required": true,
            "description": "Mirrors `deliveryId` in the body — for tracing and support requests only.",
            "schema": {
              "type": "string",
              "example": "whd_1b7f8a2c-4b0e-4c8e-9f3a-2d6c1e5a9b0d"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BuyerDeletedEnvelope"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Acknowledged. Any 2xx acks the delivery. Respond quickly and process asynchronously — slow responses risk the 10 s delivery timeout and a redelivery."
          },
          "default": {
            "description": "`401`, `403`, `408`, `429`, `5xx`, network errors, and timeouts are retried with backoff; when retries exhaust, the delivery is parked for operator replay — deliveries are at-least-once. Any other non-2xx (including redirects, which are never followed) is treated as permanent: not retried, parked immediately for operator review. `410 Gone` marks the delivery permanently failed but does NOT unsubscribe your endpoint — new events still attempt delivery; contact Further to disable the subscription."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CanonicalBuyerIdentity": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "nullable": true,
            "example": "Ada"
          },
          "lastName": {
            "type": "string",
            "nullable": true,
            "example": "Lovelace"
          },
          "email": {
            "type": "string",
            "nullable": true,
            "example": "ada@example.com"
          }
        },
        "required": [
          "firstName",
          "lastName",
          "email"
        ]
      },
      "CanonicalAssignedAgent": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "nullable": true,
            "description": "Assigned agent id in Further"
          },
          "organizationId": {
            "type": "string",
            "nullable": true,
            "description": "Organization the assigned agent belongs to"
          }
        },
        "required": [
          "agentId",
          "organizationId"
        ]
      },
      "CanonicalPropertyPreferences": {
        "type": "object",
        "properties": {
          "bedrooms": {
            "type": "number",
            "nullable": true,
            "example": 3
          },
          "bathrooms": {
            "type": "number",
            "nullable": true,
            "example": 2
          },
          "minSquareFeet": {
            "type": "string",
            "nullable": true,
            "example": "1500"
          }
        },
        "required": [
          "bedrooms",
          "bathrooms",
          "minSquareFeet"
        ]
      },
      "CanonicalPlan": {
        "type": "object",
        "properties": {
          "planCompleted": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the homebuyer plan is complete"
          },
          "onboarding": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the buyer is still in onboarding"
          },
          "financeProgress": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 100
          },
          "locationProgress": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 100
          },
          "primaryLocation": {
            "type": "string",
            "nullable": true,
            "example": "Austin, TX"
          },
          "neighborhoods": {
            "nullable": true,
            "example": [
              "Mueller",
              "East Austin"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "localAmenities": {
            "nullable": true,
            "example": [
              "good schools",
              "walkability"
            ],
            "description": "Neighborhood priorities — local amenities the buyer cares about",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "situation": {
            "type": "string",
            "nullable": true,
            "enum": [
              "first-home",
              "sold-buying-new",
              "sell-and-buy",
              "vacation-home",
              "rental-property",
              "short-term-rental",
              "flip-home"
            ],
            "example": "first-home",
            "description": "Buyer situation"
          },
          "timeline": {
            "type": "string",
            "nullable": true,
            "enum": [
              "within-3-months",
              "3-6-months",
              "6-12-months",
              "over-a-year"
            ],
            "example": "3-6-months",
            "description": "Buying timeline"
          },
          "timelineFlexibility": {
            "type": "string",
            "nullable": true,
            "enum": [
              "strict-deadline",
              "few-months-flexible",
              "no-rush"
            ],
            "example": "few-months-flexible"
          },
          "typeOfHome": {
            "type": "array",
            "nullable": true,
            "example": [
              "House",
              "Condo"
            ],
            "description": "Home types the buyer considers",
            "items": {
              "type": "string",
              "enum": [
                "House",
                "Townhouse",
                "Condo"
              ]
            }
          },
          "homeCharacteristics": {
            "nullable": true,
            "example": [
              "garage",
              "big backyard"
            ],
            "description": "Home features the buyer wants",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "propertyPreferences": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CanonicalPropertyPreferences"
              }
            ]
          },
          "whoIsBuying": {
            "type": "string",
            "nullable": true,
            "enum": [
              "myself",
              "me_and_cobuyer"
            ],
            "example": "myself",
            "description": "Whether the buyer purchases alone or with a co-buyer"
          },
          "targetHomeValue": {
            "type": "number",
            "nullable": true,
            "example": 550000,
            "description": "Target home value"
          },
          "maxBudget": {
            "type": "number",
            "nullable": true,
            "example": 600000
          },
          "downpayment": {
            "type": "number",
            "nullable": true,
            "example": 110000
          },
          "isAllCash": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "mortgageType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "30_30yr",
              "15_15yr",
              "30_10/1 ARM",
              "30_7/1 ARM",
              "30_5/1 ARM",
              "30_Interest Only"
            ],
            "example": "30_30yr",
            "description": "Mortgage product the buyer plans on — stored plan codes as supplied by onboarding"
          },
          "annualIncome": {
            "type": "number",
            "nullable": true,
            "example": 145000,
            "description": "SENSITIVE — the PRIMARY buyer’s annual income. Consent-gated per buyer; handling governed by partner contract."
          },
          "householdAnnualIncome": {
            "type": "number",
            "nullable": true,
            "example": 225000,
            "description": "SENSITIVE — combined household annual income: primary + co-buyer(s) on a me_and_cobuyer plan; equals annualIncome on a single-buyer plan. Computed at send, never persisted. Use this for qualifying income. null when no income data is provided."
          },
          "monthlyDebt": {
            "type": "number",
            "nullable": true,
            "example": 900,
            "description": "SENSITIVE — the PRIMARY buyer’s total monthly debt obligations (auto, student, credit card, other — aggregate only, never itemized). null when zero or not provided."
          },
          "householdMonthlyDebt": {
            "type": "number",
            "nullable": true,
            "example": 1400,
            "description": "SENSITIVE — combined household monthly debt: primary + co-buyer(s) on a me_and_cobuyer plan; equals monthlyDebt on a single-buyer plan. Computed at send, never persisted. Pairs with householdAnnualIncome for household DTI. null when zero or not provided."
          },
          "creditScore": {
            "type": "string",
            "nullable": true,
            "enum": [
              "800 - 850",
              "740 - 799",
              "670 - 739",
              "580 - 669",
              "350 - 579"
            ],
            "example": "740 - 799",
            "description": "SENSITIVE — credit score band as supplied by onboarding. Consent-gated per buyer."
          },
          "dti": {
            "type": "number",
            "nullable": true,
            "example": 0.31,
            "description": "SENSITIVE — projected debt-to-income ratio. Consent-gated per buyer."
          }
        },
        "required": [
          "planCompleted",
          "onboarding",
          "financeProgress",
          "locationProgress",
          "primaryLocation",
          "neighborhoods",
          "localAmenities",
          "situation",
          "timeline",
          "timelineFlexibility",
          "typeOfHome",
          "homeCharacteristics",
          "propertyPreferences",
          "whoIsBuying",
          "targetHomeValue",
          "maxBudget",
          "downpayment",
          "isAllCash",
          "mortgageType",
          "annualIncome",
          "householdAnnualIncome",
          "monthlyDebt",
          "householdMonthlyDebt",
          "creditScore",
          "dti"
        ]
      },
      "CanonicalLeadSubScores": {
        "type": "object",
        "properties": {
          "financialQualification": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 100
          },
          "planFeasibility": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 100
          },
          "engagement": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 100
          },
          "purchaseReadiness": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 100
          }
        },
        "required": [
          "financialQualification",
          "planFeasibility",
          "engagement",
          "purchaseReadiness"
        ]
      },
      "CanonicalLeadScore": {
        "type": "object",
        "properties": {
          "score": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 100,
            "description": "Headline 0-100 lead score; null when insufficientData"
          },
          "insufficientData": {
            "type": "boolean",
            "description": "True when no fit sub-score (financialQualification / planFeasibility / purchaseReadiness) was computable — the headline score is null. The engagement sub-score is computed independently and may still be present."
          },
          "confidence": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 1
          },
          "subScores": {
            "$ref": "#/components/schemas/CanonicalLeadSubScores"
          },
          "configVersion": {
            "type": "string",
            "nullable": true,
            "example": "v1.0.0"
          },
          "computedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "score",
          "insufficientData",
          "confidence",
          "subScores",
          "configVersion",
          "computedAt"
        ]
      },
      "CanonicalEngagement": {
        "type": "object",
        "properties": {
          "daysActive30d": {
            "type": "number",
            "nullable": true,
            "description": "Days active in the last 30 days"
          },
          "chatMessages30d": {
            "type": "number",
            "nullable": true,
            "description": "Chat messages sent in the last 30 days"
          },
          "listingsSaved30d": {
            "type": "number",
            "nullable": true,
            "description": "Listings saved in the last 30 days"
          },
          "scenariosSaved30d": {
            "type": "number",
            "nullable": true,
            "description": "Affordability/mortgage scenarios saved in the last 30 days"
          },
          "lastActiveAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "daysActive30d",
          "chatMessages30d",
          "listingsSaved30d",
          "scenariosSaved30d",
          "lastActiveAt"
        ]
      },
      "CanonicalBuyer": {
        "type": "object",
        "properties": {
          "buyerId": {
            "type": "string",
            "description": "Stable, opaque, org-scoped sync key — upsert/delete by this id"
          },
          "identity": {
            "$ref": "#/components/schemas/CanonicalBuyerIdentity"
          },
          "assignedAgent": {
            "$ref": "#/components/schemas/CanonicalAssignedAgent"
          },
          "plan": {
            "$ref": "#/components/schemas/CanonicalPlan"
          },
          "leadScore": {
            "$ref": "#/components/schemas/CanonicalLeadScore"
          },
          "engagement": {
            "$ref": "#/components/schemas/CanonicalEngagement"
          },
          "planUpdatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Latest plan (finance/location) update"
          }
        },
        "required": [
          "buyerId",
          "identity",
          "assignedAgent",
          "plan",
          "leadScore",
          "engagement",
          "planUpdatedAt"
        ]
      },
      "WebhookDeliveryEnvelope": {
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "example": "whd_9f4c…",
            "description": "Identifies this delivery attempt — for tracing and support requests only, not for de-duplication or ordering (use buyerId + sentAt for those)."
          },
          "eventId": {
            "type": "string",
            "description": "Identifies the change that triggered this delivery — for tracing and support requests only, not for de-duplication or ordering."
          },
          "organizationId": {
            "type": "string",
            "description": "Partner organization the delivery is scoped to"
          },
          "buyerId": {
            "type": "string",
            "description": "Stable buyer sync key (also inside data)"
          },
          "type": {
            "type": "string",
            "enum": [
              "BuyerProfileChanged",
              "BuyerPlanChanged",
              "LeadAssigned",
              "BuyerDeleted"
            ],
            "example": "BuyerPlanChanged"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the triggering event occurred"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this delivery payload snapshot was taken. Deliveries can arrive out of order: apply a snapshot only when its sentAt is newer than the last you stored for that buyerId, otherwise skip it — but always apply BuyerDeleted, regardless of sentAt. (occurredAt is when the change happened; it cannot order deliveries.)"
          },
          "schemaVersion": {
            "type": "number",
            "example": 1
          },
          "data": {
            "nullable": true,
            "description": "Canonical buyer snapshot. `null` for BuyerDeleted (tombstone — delete by buyerId).",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CanonicalBuyer"
              }
            ]
          }
        },
        "required": [
          "deliveryId",
          "eventId",
          "organizationId",
          "buyerId",
          "type",
          "occurredAt",
          "sentAt",
          "schemaVersion",
          "data"
        ]
      },
      "BuyerProfileChangedEnvelope": {
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "example": "whd_9f4c…",
            "description": "Identifies this delivery attempt — for tracing and support requests only, not for de-duplication or ordering (use buyerId + sentAt for those)."
          },
          "eventId": {
            "type": "string",
            "description": "Identifies the change that triggered this delivery — for tracing and support requests only, not for de-duplication or ordering."
          },
          "organizationId": {
            "type": "string",
            "description": "Partner organization the delivery is scoped to"
          },
          "buyerId": {
            "type": "string",
            "description": "Stable buyer sync key (also inside data)"
          },
          "type": {
            "type": "string",
            "enum": [
              "BuyerProfileChanged"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the triggering event occurred"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this delivery payload snapshot was taken. Deliveries can arrive out of order: apply a snapshot only when its sentAt is newer than the last you stored for that buyerId, otherwise skip it — but always apply BuyerDeleted, regardless of sentAt. (occurredAt is when the change happened; it cannot order deliveries.)"
          },
          "schemaVersion": {
            "type": "number",
            "example": 1
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CanonicalBuyer"
              }
            ],
            "description": "Full canonical buyer snapshot — never `null` for this event."
          }
        },
        "required": [
          "deliveryId",
          "eventId",
          "organizationId",
          "buyerId",
          "type",
          "occurredAt",
          "sentAt",
          "schemaVersion",
          "data"
        ]
      },
      "BuyerPlanChangedEnvelope": {
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "example": "whd_9f4c…",
            "description": "Identifies this delivery attempt — for tracing and support requests only, not for de-duplication or ordering (use buyerId + sentAt for those)."
          },
          "eventId": {
            "type": "string",
            "description": "Identifies the change that triggered this delivery — for tracing and support requests only, not for de-duplication or ordering."
          },
          "organizationId": {
            "type": "string",
            "description": "Partner organization the delivery is scoped to"
          },
          "buyerId": {
            "type": "string",
            "description": "Stable buyer sync key (also inside data)"
          },
          "type": {
            "type": "string",
            "enum": [
              "BuyerPlanChanged"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the triggering event occurred"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this delivery payload snapshot was taken. Deliveries can arrive out of order: apply a snapshot only when its sentAt is newer than the last you stored for that buyerId, otherwise skip it — but always apply BuyerDeleted, regardless of sentAt. (occurredAt is when the change happened; it cannot order deliveries.)"
          },
          "schemaVersion": {
            "type": "number",
            "example": 1
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CanonicalBuyer"
              }
            ],
            "description": "Full canonical buyer snapshot — never `null` for this event."
          }
        },
        "required": [
          "deliveryId",
          "eventId",
          "organizationId",
          "buyerId",
          "type",
          "occurredAt",
          "sentAt",
          "schemaVersion",
          "data"
        ]
      },
      "LeadAssignedEnvelope": {
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "example": "whd_9f4c…",
            "description": "Identifies this delivery attempt — for tracing and support requests only, not for de-duplication or ordering (use buyerId + sentAt for those)."
          },
          "eventId": {
            "type": "string",
            "description": "Identifies the change that triggered this delivery — for tracing and support requests only, not for de-duplication or ordering."
          },
          "organizationId": {
            "type": "string",
            "description": "Partner organization the delivery is scoped to"
          },
          "buyerId": {
            "type": "string",
            "description": "Stable buyer sync key (also inside data)"
          },
          "type": {
            "type": "string",
            "enum": [
              "LeadAssigned"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the triggering event occurred"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this delivery payload snapshot was taken. Deliveries can arrive out of order: apply a snapshot only when its sentAt is newer than the last you stored for that buyerId, otherwise skip it — but always apply BuyerDeleted, regardless of sentAt. (occurredAt is when the change happened; it cannot order deliveries.)"
          },
          "schemaVersion": {
            "type": "number",
            "example": 1
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CanonicalBuyer"
              }
            ],
            "description": "Full canonical buyer snapshot — never `null` for this event."
          }
        },
        "required": [
          "deliveryId",
          "eventId",
          "organizationId",
          "buyerId",
          "type",
          "occurredAt",
          "sentAt",
          "schemaVersion",
          "data"
        ]
      },
      "BuyerDeletedEnvelope": {
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "example": "whd_9f4c…",
            "description": "Identifies this delivery attempt — for tracing and support requests only, not for de-duplication or ordering (use buyerId + sentAt for those)."
          },
          "eventId": {
            "type": "string",
            "description": "Identifies the change that triggered this delivery — for tracing and support requests only, not for de-duplication or ordering."
          },
          "organizationId": {
            "type": "string",
            "description": "Partner organization the delivery is scoped to"
          },
          "buyerId": {
            "type": "string",
            "description": "Stable buyer sync key (also inside data)"
          },
          "type": {
            "type": "string",
            "enum": [
              "BuyerDeleted"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the triggering event occurred"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this delivery payload snapshot was taken. Deliveries can arrive out of order: apply a snapshot only when its sentAt is newer than the last you stored for that buyerId, otherwise skip it — but always apply BuyerDeleted, regardless of sentAt. (occurredAt is when the change happened; it cannot order deliveries.)"
          },
          "schemaVersion": {
            "type": "number",
            "example": 1
          },
          "data": {
            "nullable": true,
            "enum": [
              null
            ],
            "description": "Always `null` — BuyerDeleted is a tombstone."
          }
        },
        "required": [
          "deliveryId",
          "eventId",
          "organizationId",
          "buyerId",
          "type",
          "occurredAt",
          "sentAt",
          "schemaVersion",
          "data"
        ]
      }
    }
  }
}
