{"openapi":"3.1.0","info":{"title":"RentMochi API","version":"1.0.0","summary":"Scoped access to the RentMochi v1 property API.","description":"The shipped RentMochi v1 API. Landlord and Portfolio accounts authenticate with a scoped API key. All writes use the same confirmation-first domain workflows as the app; creating a ledger entry produces a proposal, not a confirmed financial record."},"servers":[{"url":"/","description":"The RentMochi installation that issued the API key"}],"tags":[{"name":"Properties"},{"name":"Tenants"},{"name":"Ledger"},{"name":"Documents"},{"name":"Maintenance"},{"name":"Notifications"}],"security":[{"RentMochiApiKey":[]}],"x-webhook-delivery":{"signature-header":"X-RentMochi-Signature","signature-algorithm":"HMAC-SHA256","retry-delays-seconds":[60,300,1800,7200],"max-attempts":5},"paths":{"/api/v1/properties":{"get":{"operationId":"listProperties","summary":"List properties","tags":["Properties"],"x-required-scope":"read:properties","x-rate-limit":100,"x-rate-limit-window-seconds":60,"responses":{"200":{"description":"The caller's properties.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Property"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createProperty","summary":"Create a property","tags":["Properties"],"x-required-scope":"write:properties","x-rate-limit":100,"x-rate-limit-window-seconds":60,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyCreate"}}}},"responses":{"201":{"description":"Property created.","headers":{"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/PropertyCreated"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/ApiKeyRequired"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/properties/{id}/ledger":{"get":{"operationId":"listPropertyLedger","summary":"List one property's ledger entries","tags":["Ledger"],"x-required-scope":"read:ledger","x-rate-limit":100,"x-rate-limit-window-seconds":60,"parameters":[{"$ref":"#/components/parameters/PropertyId"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"$ref":"#/components/responses/LedgerPage"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/properties/{id}/tenants":{"get":{"operationId":"listPropertyTenants","summary":"List one property's tenants","tags":["Tenants"],"x-required-scope":"read:tenants","x-rate-limit":100,"x-rate-limit-window-seconds":60,"parameters":[{"$ref":"#/components/parameters/PropertyId"}],"responses":{"200":{"description":"Tenants for the requested property.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TenantSummary"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/tenants":{"get":{"operationId":"listTenants","summary":"List tenants across all properties","tags":["Tenants"],"x-required-scope":"read:tenants","x-rate-limit":100,"x-rate-limit-window-seconds":60,"responses":{"200":{"description":"The caller's tenants, newest first.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tenant"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createTenant","summary":"Create a tenant","tags":["Tenants"],"x-required-scope":"write:tenants","x-rate-limit":100,"x-rate-limit-window-seconds":60,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreate"}}}},"responses":{"201":{"description":"Tenant created.","headers":{"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/TenantRecord"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/ApiKeyRequired"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/TemporarilyUnavailable"}}}},"/api/v1/ledger":{"get":{"operationId":"listLedger","summary":"List ledger entries","tags":["Ledger"],"x-required-scope":"read:ledger","x-rate-limit":100,"x-rate-limit-window-seconds":60,"parameters":[{"name":"propertyId","in":"query","required":false,"description":"Restrict results to a property owned by the caller.","schema":{"type":"string"}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"$ref":"#/components/responses/LedgerPage"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createLedgerProposal","summary":"Create a proposed ledger entry","description":"Creates a proposed entry with confirmedByUser false. It does not create or modify a confirmed financial record.","tags":["Ledger"],"x-required-scope":"write:ledger","x-rate-limit":100,"x-rate-limit-window-seconds":60,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerCreate"}}}},"responses":{"201":{"description":"Ledger proposal created.","headers":{"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/LedgerProposalCreated"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/ApiKeyRequired"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/ledger/{id}":{"patch":{"operationId":"confirmLedgerProposal","summary":"Confirm a proposed ledger entry","description":"Explicitly moves one proposal to user_confirmed.","tags":["Ledger"],"x-required-scope":"write:ledger.confirm","x-rate-limit":100,"x-rate-limit-window-seconds":60,"parameters":[{"$ref":"#/components/parameters/LedgerEntryId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["action"],"properties":{"action":{"const":"confirm"}}}}}},"responses":{"200":{"description":"Ledger proposal confirmed.","headers":{"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","additionalProperties":false,"required":["id","lifecycleStatus","confirmedByUser"],"properties":{"id":{"type":"string"},"lifecycleStatus":{"const":"user_confirmed"},"confirmedByUser":{"const":true}}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/ApiKeyRequired"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/documents":{"post":{"operationId":"createDocumentProposal","summary":"Analyze a document into a pending proposal","description":"Sends a base64-encoded source through the normal document-ingestion workflow and returns a proposal that still requires user confirmation.","tags":["Documents"],"x-required-scope":"write:documents","x-rate-limit":100,"x-rate-limit-window-seconds":60,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCreate"}}}},"responses":{"202":{"description":"Document analyzed and pending user confirmation.","headers":{"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/DocumentProposal"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/ApiKeyRequired"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/TemporarilyUnavailable"}}}},"/api/v1/maintenance":{"post":{"operationId":"createMaintenanceRecord","summary":"Create a maintenance record","tags":["Maintenance"],"x-required-scope":"write:maintenance","x-rate-limit":100,"x-rate-limit-window-seconds":60,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceCreate"}}}},"responses":{"201":{"description":"Maintenance record created.","headers":{"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/MaintenanceRecord"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/ApiKeyRequired"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/TemporarilyUnavailable"}}}},"/api/v1/notifications":{"get":{"operationId":"listUnreadNotifications","summary":"List unread notifications","tags":["Notifications"],"x-required-scope":"read:notifications","x-rate-limit":100,"x-rate-limit-window-seconds":60,"responses":{"200":{"description":"The caller's unread notifications, newest first.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/InsufficientScope"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"webhooks":{"tenantAdded":{"post":{"operationId":"webhookTenantAdded","summary":"Tenant added","x-event-name":"tenant.added","parameters":[{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantAddedEvent"}}}},"responses":{"2XX":{"description":"Receiver acknowledgement; any 2xx response stops retries."}}}},"ledgerCreated":{"post":{"operationId":"webhookLedgerCreated","summary":"Ledger entry created","x-event-name":"ledger.created","parameters":[{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerCreatedEvent"}}}},"responses":{"2XX":{"description":"Receiver acknowledgement; any 2xx response stops retries."}}}},"ledgerConfirmed":{"post":{"operationId":"webhookLedgerConfirmed","summary":"Ledger entry confirmed","x-event-name":"ledger.confirmed","parameters":[{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerConfirmedEvent"}}}},"responses":{"2XX":{"description":"Receiver acknowledgement; any 2xx response stops retries."}}}},"documentFiled":{"post":{"operationId":"webhookDocumentFiled","summary":"Document filed","x-event-name":"document.filed","parameters":[{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentFiledEvent"}}}},"responses":{"2XX":{"description":"Receiver acknowledgement; any 2xx response stops retries."}}}},"maintenanceReported":{"post":{"operationId":"webhookMaintenanceReported","summary":"Maintenance reported","x-event-name":"maintenance.reported","parameters":[{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceReportedEvent"}}}},"responses":{"2XX":{"description":"Receiver acknowledgement; any 2xx response stops retries."}}}},"maintenanceUpdated":{"post":{"operationId":"webhookMaintenanceUpdated","summary":"Maintenance updated","x-event-name":"maintenance.updated","parameters":[{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceUpdatedEvent"}}}},"responses":{"2XX":{"description":"Receiver acknowledgement; any 2xx response stops retries."}}}},"paymentRecorded":{"post":{"operationId":"webhookPaymentRecorded","summary":"Payment recorded","x-event-name":"payment.recorded","parameters":[{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRecordedEvent"}}}},"responses":{"2XX":{"description":"Receiver acknowledgement; any 2xx response stops retries."}}}},"leaseRenewed":{"post":{"operationId":"webhookLeaseRenewed","summary":"Lease renewed","x-event-name":"lease.renewed","parameters":[{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseRenewedEvent"}}}},"responses":{"2XX":{"description":"Receiver acknowledgement; any 2xx response stops retries."}}}},"propertyAdded":{"post":{"operationId":"webhookPropertyAdded","summary":"Property added","x-event-name":"property.added","parameters":[{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyAddedEvent"}}}},"responses":{"2XX":{"description":"Receiver acknowledgement; any 2xx response stops retries."}}}}},"components":{"securitySchemes":{"RentMochiApiKey":{"type":"http","scheme":"bearer","bearerFormat":"rpb_...","description":"Create a scoped key under Settings → Developer API and send it as Authorization: Bearer rpb_....","x-scopes":{"read:ledger":"Read ledger entries.","read:properties":"Read properties.","read:tenants":"Read tenants.","read:notifications":"Read unread notifications.","write:ledger":"Create proposed ledger entries.","write:ledger.confirm":"Explicitly confirm proposed ledger entries.","write:documents":"Analyze documents into pending proposals.","write:maintenance":"Create maintenance records.","write:properties":"Create properties.","write:tenants":"Create tenants."}}},"headers":{"IdempotentReplay":{"description":"Present with value true when a stored response is replayed.","schema":{"type":"string","const":"true"}},"RetryAfter":{"description":"Seconds until the shared per-key rate-limit window resets.","required":true,"schema":{"type":"integer","minimum":1}}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"A caller-chosen key of 1–200 characters. The response is retained for 24 hours per account and endpoint. Reuse with a different body returns 409.","schema":{"type":"string","minLength":1,"maxLength":200}},"PropertyId":{"name":"id","in":"path","required":true,"description":"Property ID.","schema":{"type":"string"}},"LedgerEntryId":{"name":"id","in":"path","required":true,"description":"Proposed ledger-entry ID.","schema":{"type":"string"}},"Cursor":{"name":"cursor","in":"query","required":false,"description":"The last item ID returned by the previous page.","schema":{"type":"string"}},"Limit":{"name":"limit","in":"query","required":false,"description":"Page size. Defaults to 50 and is capped at 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},"WebhookSignature":{"name":"X-RentMochi-Signature","in":"header","required":true,"description":"Lowercase hexadecimal HMAC-SHA256 of the exact JSON body.","schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}}},"responses":{"Unauthorized":{"description":"The bearer key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ApiKeyRequired":{"description":"Writes require a valid scoped API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PlanRequired":{"description":"The v1 API is unavailable on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InsufficientScope":{"description":"The API key does not carry the operation's required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InvalidRequest":{"description":"The JSON body, action, or Idempotency-Key is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"IdempotencyConflict":{"description":"The Idempotency-Key was already used with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The requested record is missing or belongs to another account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TemporarilyUnavailable":{"description":"The underlying domain operation could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"The shared limit of 100 v1 requests per API key per minute was exceeded.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"LedgerPage":{"description":"A cursor-paginated ledger page.","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LedgerEntry"}},"nextCursor":{"type":["string","null"]}}}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"issues":{"type":"object"},"driver":{"type":"string"},"label":{"type":"string"}}},"Property":{"type":"object","additionalProperties":false,"required":["id","name","slug","city","state","unitCount","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"unitCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}},"PropertyCreated":{"type":"object","additionalProperties":false,"required":["id","name","city","state","unitCount"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"unitCount":{"type":"integer"}}},"PropertyCreate":{"type":"object","additionalProperties":false,"required":["name","city","state","units"],"properties":{"name":{"type":"string","minLength":2,"maxLength":120},"streetAddress":{"type":"string","maxLength":160},"city":{"type":"string","minLength":2,"maxLength":80},"state":{"type":"string","minLength":2,"maxLength":2},"postalCode":{"type":"string","maxLength":20},"timezone":{"type":"string","minLength":3,"maxLength":80,"default":"America/Chicago"},"units":{"type":"integer","minimum":1,"maximum":500}}},"TenantSummary":{"type":"object","additionalProperties":false,"required":["id","name","status","rentAmount","leaseStart","leaseEnd","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":["string","null"],"format":"email"},"status":{"enum":["active","inactive"]},"rentAmount":{"type":["number","null"]},"leaseStart":{"type":["string","null"],"format":"date"},"leaseEnd":{"type":["string","null"],"format":"date"},"createdAt":{"type":"string","format":"date-time"}}},"Tenant":{"allOf":[{"$ref":"#/components/schemas/TenantSummary"},{"type":"object","required":["propertyId"],"properties":{"propertyId":{"type":"string"}}}]},"TenantRecord":{"type":"object","required":["id","propertyId","name","isActive","createdAt"],"properties":{"id":{"type":"string"},"propertyId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"unit":{"type":"string"},"leaseStart":{"type":"string","format":"date"},"leaseEnd":{"type":"string","format":"date"},"monthlyRent":{"type":"number"},"securityDeposit":{"type":"number"},"isActive":{"type":"boolean"},"lifecycleStatus":{"enum":["active","archived"]},"createdAt":{"type":"string","format":"date-time"}}},"TenantCreate":{"type":"object","additionalProperties":false,"required":["propertyId","name"],"properties":{"propertyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":30},"unit":{"type":"string","maxLength":30},"leaseStart":{"type":"string","format":"date"},"leaseEnd":{"type":"string","format":"date"},"monthlyRent":{"type":"number","exclusiveMinimum":0,"maximum":99999.99,"multipleOf":0.01},"securityDeposit":{"type":"number","minimum":0,"maximum":99999.99,"multipleOf":0.01},"petPolicy":{"type":"string","maxLength":500},"utilities":{"type":"string","maxLength":500},"noticeDays":{"type":"integer","minimum":1,"maximum":365},"lateFeePolicy":{"type":"string","maxLength":500},"renewalTerms":{"type":"string","maxLength":500},"notes":{"type":"string","maxLength":1000}}},"LedgerEntry":{"type":"object","additionalProperties":false,"required":["id","date","type","amount","vendor","category","description","confirmedByUser","lifecycleStatus"],"properties":{"id":{"type":"string"},"propertyId":{"type":"string","description":"Present on the global ledger endpoint."},"date":{"type":"string","format":"date"},"type":{"type":"string"},"amount":{"type":"number"},"vendor":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"confirmedByUser":{"type":"boolean"},"lifecycleStatus":{"enum":["proposed","user_confirmed","provider_confirmed","reconciled","exported","filed","corrected","voided"]}}},"LedgerCreate":{"type":"object","additionalProperties":false,"required":["propertyId","type","date","amount","category","description"],"properties":{"propertyId":{"type":"string","minLength":1},"type":{"enum":["expense","income","transfer","owner_draw","capital_contribution"]},"date":{"type":"string","format":"date"},"amount":{"type":"number","exclusiveMinimum":0},"vendor":{"type":"string","maxLength":160},"category":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":280}}},"LedgerProposalCreated":{"type":"object","additionalProperties":false,"required":["id","propertyId","lifecycleStatus","confirmedByUser"],"properties":{"id":{"type":"string"},"propertyId":{"type":"string"},"lifecycleStatus":{"const":"proposed"},"confirmedByUser":{"const":false}}},"DocumentCreate":{"type":"object","additionalProperties":false,"required":["propertyId","filename","mimeType","sourceFileBase64"],"properties":{"propertyId":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1,"maxLength":240},"mimeType":{"type":"string","minLength":1,"maxLength":160},"sourceFileBase64":{"type":"string","minLength":1,"contentEncoding":"base64"}}},"DocumentProposal":{"type":"object","required":["documentId","status","proposal"],"properties":{"documentId":{"type":"string"},"status":{"const":"pending_confirmation"},"proposal":{"type":"object","description":"The confirmation-first extraction proposal returned by document ingestion."}}},"MaintenanceCreate":{"type":"object","additionalProperties":false,"required":["propertyId","title","date"],"properties":{"propertyId":{"type":"string","minLength":1},"title":{"type":"string","minLength":2,"maxLength":160},"status":{"enum":["open","in_progress","scheduled","resolved"],"default":"open"},"date":{"type":"string","format":"date"},"vendor":{"type":"string","maxLength":160},"vendorId":{"type":"string"},"cost":{"type":"number","minimum":0},"notes":{"type":"string","maxLength":1000},"applianceId":{"type":"string"},"urgency":{"enum":["routine","urgent","emergency"]},"suggestedVendorCategory":{"type":"string","maxLength":80},"landlordNotes":{"type":"string","maxLength":2000}}},"MaintenanceRecord":{"type":"object","required":["id","propertyId","date","title","status","notes"],"properties":{"id":{"type":"string"},"propertyId":{"type":"string"},"date":{"type":"string","format":"date"},"title":{"type":"string"},"status":{"enum":["open","in_progress","scheduled","resolved"]},"vendor":{"type":"string"},"vendorId":{"type":"string"},"cost":{"type":"number"},"notes":{"type":"string"},"landlordNotes":{"type":"string"},"applianceId":{"type":"string"},"urgency":{"enum":["routine","urgent","emergency"]},"suggestedVendorCategory":{"type":"string"}}},"Notification":{"type":"object","additionalProperties":false,"required":["id","title","body","actionUrl","createdAt"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"actionUrl":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}}},"WebhookEnvelope":{"type":"object","required":["id","event","createdAt","data"],"properties":{"id":{"type":"string","pattern":"^evt_"},"event":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"data":{"type":"object"}}},"TenantAddedEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"event":{"const":"tenant.added"},"data":{"type":"object","additionalProperties":false,"required":["tenantId","propertyId","name"],"properties":{"tenantId":{"type":"string"},"propertyId":{"type":"string"},"name":{"type":"string"}}}}}]},"LedgerCreatedEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"event":{"const":"ledger.created"},"data":{"type":"object","additionalProperties":false,"required":["ledgerEntryId","propertyId","lifecycleStatus","amount","type"],"properties":{"ledgerEntryId":{"type":"string"},"propertyId":{"type":"string"},"lifecycleStatus":{"enum":["proposed","provider_confirmed"]},"amount":{"type":"number"},"type":{"type":"string"}}}}}]},"LedgerConfirmedEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"event":{"const":"ledger.confirmed"},"data":{"type":"object","additionalProperties":false,"required":["ledgerEntryId","propertyId","lifecycleStatus"],"properties":{"ledgerEntryId":{"type":"string"},"propertyId":{"type":"string"},"lifecycleStatus":{"const":"user_confirmed"}}}}}]},"DocumentFiledEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"event":{"const":"document.filed"},"data":{"type":"object","additionalProperties":false,"required":["documentId","propertyId","filename","status"],"properties":{"documentId":{"type":"string"},"propertyId":{"type":"string"},"filename":{"type":"string"},"status":{"type":"string"}}}}}]},"MaintenanceReportedEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"event":{"const":"maintenance.reported"},"data":{"type":"object","additionalProperties":false,"required":["maintenanceRecordId","propertyId","title","status"],"properties":{"maintenanceRecordId":{"type":"string"},"propertyId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"}}}}}]},"MaintenanceUpdatedEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"event":{"const":"maintenance.updated"},"data":{"type":"object","additionalProperties":false,"required":["maintenanceRecordId","propertyId","status"],"properties":{"maintenanceRecordId":{"type":"string"},"propertyId":{"type":"string"},"status":{"type":"string"}}}}}]},"PaymentRecordedEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"event":{"const":"payment.recorded"},"data":{"type":"object","additionalProperties":false,"required":["portalPaymentId","propertyId","tenantId","amount","status"],"properties":{"portalPaymentId":{"type":"string"},"propertyId":{"type":"string"},"tenantId":{"type":"string"},"amount":{"type":"number"},"status":{"type":"string"}}}}}]},"LeaseRenewedEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"event":{"const":"lease.renewed"},"data":{"type":"object","additionalProperties":false,"required":["tenantId","propertyId","renewalStatus","leaseEnd"],"properties":{"tenantId":{"type":"string"},"propertyId":{"type":"string"},"renewalStatus":{"type":"string"},"leaseEnd":{"type":["string","null"],"format":"date"}}}}}]},"PropertyAddedEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"event":{"const":"property.added"},"data":{"type":"object","additionalProperties":false,"required":["propertyId","name","city","state","unitCount"],"properties":{"propertyId":{"type":"string"},"name":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"unitCount":{"type":"integer"}}}}}]}}}}