{"openapi":"3.1.0","info":{"title":"Leasvio API","version":"2026-08-29","summary":"The tenant-scoped property operations API.","description":"Canonical v1 resources: organizations, companies, users, roles, owners, properties, buildings, units, rooms, beds, listings, leads, viewings, applications, screening, leases, signatures, tenancies, bookings, guests, charges, invoices, payments, refunds, accounting-entries, workorders, inspections, assets, vendors, purchase-orders, documents, tasks, messages, events, reports, webhooks. API keys are shown once, hashed at rest and separately scoped. OAuth authorization-code clients require PKCE S256."},"servers":[{"url":"https://api.leasv.io/v1","description":"Production"},{"url":"https://sandbox.api.leasv.io/v1","description":"Sandbox"}],"security":[{"apiKey":[]}],"tags":[{"name":"organizations"},{"name":"companies"},{"name":"users"},{"name":"roles"},{"name":"owners"},{"name":"properties"},{"name":"buildings"},{"name":"units"},{"name":"rooms"},{"name":"beds"},{"name":"listings"},{"name":"leads"},{"name":"viewings"},{"name":"applications"},{"name":"screening"},{"name":"leases"},{"name":"signatures"},{"name":"tenancies"},{"name":"bookings"},{"name":"guests"},{"name":"charges"},{"name":"invoices"},{"name":"payments"},{"name":"refunds"},{"name":"accounting-entries"},{"name":"workorders"},{"name":"inspections"},{"name":"assets"},{"name":"vendors"},{"name":"purchase-orders"},{"name":"documents"},{"name":"tasks"},{"name":"messages"},{"name":"events"},{"name":"reports"},{"name":"webhooks"}],"paths":{"/{resource}":{"parameters":[{"name":"resource","in":"path","required":true,"schema":{"type":"string","enum":["organizations","companies","users","roles","owners","properties","buildings","units","rooms","beds","listings","leads","viewings","applications","screening","leases","signatures","tenancies","bookings","guests","charges","invoices","payments","refunds","accounting-entries","workorders","inspections","assets","vendors","purchase-orders","documents","tasks","messages","events","reports","webhooks"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","description":"Field name; prefix - for descending.","schema":{"type":"string"}},{"name":"fields[{resource}]","in":"query","description":"Comma-separated sparse fieldset.","schema":{"type":"string"}}],"get":{"operationId":"listResources","summary":"List a cursor-paginated tenant resource","responses":{"200":{"$ref":"#/components/responses/List"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/{resource}/{id}":{"parameters":[{"name":"resource","in":"path","required":true,"schema":{"type":"string","enum":["organizations","companies","users","roles","owners","properties","buildings","units","rooms","beds","listings","leads","viewings","applications","screening","leases","signatures","tenancies","bookings","guests","charges","invoices","payments","refunds","accounting-entries","workorders","inspections","assets","vendors","purchase-orders","documents","tasks","messages","events","reports","webhooks"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getResource","summary":"Retrieve one tenant resource","responses":{"200":{"$ref":"#/components/responses/Item"},"404":{"$ref":"#/components/responses/Error"}}}},"/payments":{"post":{"operationId":"createTestPayment","summary":"Run an idempotent sandbox payment scenario","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scenario","amount","currency"],"properties":{"scenario":{"enum":["succeeded","failed","reversed"]},"amount":{"type":"number","exclusiveMinimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}}}}}},"responses":{"201":{"$ref":"#/components/responses/Item"},"409":{"$ref":"#/components/responses/Error"}}}}},"webhooks":{"listing.published":{"post":{"summary":"listing.published","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"lead.created":{"post":{"summary":"lead.created","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"viewing.booked":{"post":{"summary":"viewing.booked","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"application.submitted":{"post":{"summary":"application.submitted","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"application.status_changed":{"post":{"summary":"application.status_changed","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"lease.sent":{"post":{"summary":"lease.sent","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"lease.signed":{"post":{"summary":"lease.signed","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"tenancy.started":{"post":{"summary":"tenancy.started","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"rent.due":{"post":{"summary":"rent.due","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"payment.succeeded":{"post":{"summary":"payment.succeeded","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"payment.failed":{"post":{"summary":"payment.failed","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"payment.reversed":{"post":{"summary":"payment.reversed","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"booking.created":{"post":{"summary":"booking.created","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"booking.cancelled":{"post":{"summary":"booking.cancelled","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"guest.checked_in":{"post":{"summary":"guest.checked_in","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"guest.checked_out":{"post":{"summary":"guest.checked_out","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"workorder.created":{"post":{"summary":"workorder.created","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"workorder.completed":{"post":{"summary":"workorder.completed","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"inspection.completed":{"post":{"summary":"inspection.completed","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"document.expiring":{"post":{"summary":"document.expiring","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"lease.expiring":{"post":{"summary":"lease.expiring","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}},"tenant.moved_out":{"post":{"summary":"tenant.moved_out","parameters":[{"name":"Leasvio-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Leasvio-Event-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Acknowledge delivery"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"lv_live_…"},"oauth21":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://id.authv.io/oauth/authorize","tokenUrl":"https://id.authv.io/oauth/token","scopes":{"properties:read":"Read permitted properties","leases:read":"Read leases","payments:write":"Create payments"}}},"description":"OAuth 2.1 authorization code flow. PKCE S256 is mandatory."}},"schemas":{"Envelope":{"type":"object","properties":{"object":{"type":"string"},"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string","format":"uuid"},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"Error":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"}}}}}},"responses":{"List":{"description":"A paginated collection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"Item":{"description":"A tenant-scoped resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"Error":{"description":"Structured API error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}