LeaseWizard API
Public API reference for API-key clients.
The LeaseWizard API is a stable, read-only API for accessing organization lease data.
Base URL
https://api.leasewizard.ai/api/v1/Authentication
Send your API key as a bearer token:
Authorization: Bearer lw_live_<prefix>_<secret>API keys are organization-wide. Scopes control which resources a key can read. Raw keys are shown once when created; store them securely and rotate them if exposed.
Quick start
curl https://api.leasewizard.ai/api/v1/lease-contracts/ \
-H "Authorization: Bearer lw_live_<prefix>_<secret>"Pagination
List endpoints use page pagination:
?page=1&page_size=50page_size can be up to 200.
Paginated responses use this shape:
{
"count": 123,
"next": "https://api.leasewizard.ai/api/v1/lease-contracts/?page=2",
"previous": null,
"results": []
}Requests
Clients may send X-Request-Id. If omitted, LeaseWizard generates one. Every response includes X-Request-Id.
Errors
Errors use this envelope:
{
"error": {
"code": "missing_or_invalid_auth",
"message": "API key required",
"request_id": "req_..."
}
}| Status | Meaning |
|---|---|
401 | Missing, malformed, invalid, revoked, or expired API key |
403 | API key is valid but missing the required scope |
404 | Resource not found |
429 | Rate limit exceeded |
Rate limits
Default limit: 60 requests per minute per API key. Some keys may have custom limits.
Scopes
| Scope | Grants access to |
|---|---|
contracts:read | Lease contracts, lease events, amendments, and payments |
documents:read | Documents, extracted facts, validations, and confidence records |
reminders:read | Reminders and reminder rules |
templates:read | Custom field templates |
reference:read | API key metadata, scopes, health, event types, and schema fields |
Endpoints
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /lease-contracts/ | contracts:read | List lease contracts. |
GET | /lease-contracts/{id}/ | contracts:read | Retrieve a lease contract. |
GET | /lease-contracts/events/ | contracts:read | List upcoming lease events. |
GET | /lease-contracts/{id}/amendments/ | contracts:read | List amendments for a lease contract. |
GET | /lease-contracts/{id}/payments/ | contracts:read | List payments for a lease contract. |
GET | /documents/ | documents:read | List documents. |
GET | /documents/{id}/ | documents:read | Retrieve a document. |
GET | /documents/{id}/facts/ | documents:read | List current extracted facts. |
GET | /documents/{id}/validations/ | documents:read | List document validations. |
GET | /documents/{id}/confidences/ | documents:read | List field confidence records. |
GET | /reminders/ | reminders:read | List reminders. |
GET | /reminders/{id}/ | reminders:read | Retrieve a reminder. |
GET | /reminder-rules/ | reminders:read | List reminder rules. |
GET | /reminder-rules/{id}/ | reminders:read | Retrieve a reminder rule. |
GET | /custom-field-templates/ | templates:read | List custom field templates. |
GET | /custom-field-templates/{id}/ | templates:read | Retrieve a custom field template. |
GET | /event-types/ | reference:read | List lease event types. |
GET | /schema-fields/ | reference:read | List extraction schema fields. |
GET | /me/ | reference:read | Get API key metadata. |
GET | /scopes/ | reference:read | List available API key scopes. |
GET | /health/ | reference:read | Check API health. |
Lease Contracts
List lease contracts
GET /lease-contracts/Returns lease contracts for the API key's organization.
Query parameters:
| Name | Type | Description |
|---|---|---|
page | integer | Page number. |
page_size | integer | Results per page. Maximum 200. |
status | string | Filter by lease status. |
lease_status | string | Alias for status. |
country | string | Filter by location country. |
city | string | Filter by location city. |
tenant | string | Case-insensitive tenant search. |
landlord | string | Case-insensitive landlord search. |
Response: paginated V1LeaseContract.
Retrieve a lease contract
GET /lease-contracts/{id}/Returns one lease contract by UUID.
List lease events
GET /lease-contracts/events/Query parameters:
| Name | Type | Description |
|---|---|---|
months | integer | Future window in months. Defaults to 24. Maximum 120. |
page | integer | Page number. |
page_size | integer | Results per page. Maximum 200. |
Response: paginated V1LeaseEvent.
List lease contract amendments
GET /lease-contracts/{id}/amendments/Response: paginated V1LeaseAmendment.
List lease contract payments
GET /lease-contracts/{id}/payments/Query parameters:
| Name | Type | Description |
|---|---|---|
payment_type | string | Filter by payment type. |
page | integer | Page number. |
page_size | integer | Results per page. Maximum 200. |
Response: paginated V1LeasePayment.
Documents
List documents
GET /documents/Response: paginated V1Document.
Retrieve a document
GET /documents/{id}/Returns one document by numeric ID.
List current document facts
GET /documents/{id}/facts/Response: paginated V1CurrentFact.
List document validations
GET /documents/{id}/validations/Query parameters:
| Name | Type | Description |
|---|---|---|
source | string | field for extraction validations or document for reviewed document fields. |
status | string | Filter field validations by status. |
page | integer | Page number. |
page_size | integer | Results per page. Maximum 200. |
Response: paginated V1FieldValidation.
List document field confidences
GET /documents/{id}/confidences/Response: paginated V1FieldConfidence.
Reminders
GET /reminders/
GET /reminders/{id}/
GET /reminder-rules/
GET /reminder-rules/{id}/Reminder IDs and reminder rule IDs are UUIDs.
Custom Field Templates
GET /custom-field-templates/
GET /custom-field-templates/{id}/Template IDs are numeric IDs.
Reference
GET /event-types/
GET /schema-fields/
GET /me/
GET /scopes/
GET /health/Use reference endpoints to discover supported event types, extraction schema fields, API key metadata, valid scopes, and health status.
Core response objects
LeaseContract
{
"id": "5a5f7d8e-2b4a-4a5d-9e9e-6c3b2a1f0d91",
"contract_id": "LW-2026-001",
"display_name": "Berlin Office Lease",
"tenant": "Acme GmbH",
"landlord": "Example Properties GmbH",
"lease_type": "commercial",
"initial_term": "5 years",
"contract_start_date": "2026-01-01",
"contract_end_date": "2030-12-31",
"lease_agreement_date": "2025-11-15",
"possession_date": "2025-12-15",
"rent_start_date": "2026-01-01",
"square_meterage": "1250.00",
"permitted_use": "Office use",
"service_charge": "EUR 4.50 per sqm monthly",
"lease_status": "ACTIVE",
"location": {
"full_address": "Alexanderplatz 1, 10178 Berlin, Germany",
"street_name": "Alexanderplatz",
"street_number": "1",
"unit_number": "Suite 400",
"floor": "4",
"city": "Berlin",
"state_province": "Berlin",
"postal_code": "10178",
"country": "Germany",
"country_code": "DE",
"region": "Berlin",
"building_name": "Alexander Tower",
"property_type": "office"
},
"created_at": "2026-01-02T10:15:30Z",
"updated_at": "2026-02-14T09:20:00Z"
}LeaseEvent
{
"id": "0f0d8c1a-1c3a-4f70-a6a8-1d2b3c4d5e6f",
"document_id": 4821,
"event_type": "RENEWAL_NOTICE",
"title": "Renewal notice deadline",
"description": "Notice must be provided 180 days before lease expiry.",
"calculated_date": "2030-07-04",
"status": "UPCOMING",
"requires_notice": true,
"notice_period_days": 180,
"related_amount": null,
"contract": {
"id": "5a5f7d8e-2b4a-4a5d-9e9e-6c3b2a1f0d91",
"contract_id": "LW-2026-001",
"display_name": "Berlin Office Lease",
"tenant": "Acme GmbH",
"landlord": "Example Properties GmbH",
"contract_start_date": "2026-01-01",
"contract_end_date": "2030-12-31"
}
}LeaseAmendment
{
"id": "7f0648a3-50c0-45d4-b1c1-d30f4f0a68fb",
"document_id": 4930,
"document_uuid": "b1d8a0e8-4d66-4b53-9b72-2386c2f4982e",
"amendment_type": "rent_adjustment",
"effective_date": "2027-01-01",
"execution_date": "2026-11-20",
"tenant": "Acme GmbH",
"landlord": "Example Properties GmbH",
"description": "Annual base rent adjusted for the renewal period.",
"changes": {
"base_rent": {
"from": "25000.00",
"to": "26500.00",
"currency": "EUR",
"frequency": "monthly"
}
},
"sequence": 1,
"parent_match_confirmed": true,
"created_at": "2026-11-21T08:30:00Z",
"updated_at": "2026-11-21T08:30:00Z"
}LeasePayment
{
"id": 92015,
"lease_contract_id": "5a5f7d8e-2b4a-4a5d-9e9e-6c3b2a1f0d91",
"document_id": 4821,
"source_document_id": 4930,
"payment_type": "base_rent",
"period_number": 1,
"start_date": "2027-01-01",
"end_date": "2027-12-31",
"amount": "26500.00",
"currency": "EUR",
"frequency": "monthly",
"source": "extracted",
"notes": "Adjusted base rent for 2027.",
"created_at": "2026-11-21T08:35:00Z",
"updated_at": "2026-11-21T08:35:00Z"
}Document
{
"id": 4821,
"uuid": "f9e76764-7911-42b6-b00f-6e4fe2b1a42d",
"document_type": "lease_contract",
"classification_confidence": {
"score": 0.98
},
"selected_fields": ["tenant", "landlord", "contract_end_date", "base_rent"],
"custom_fields": null,
"uploaded_at": "2026-01-02T09:45:00Z",
"status": "SUCCESS",
"task_id": "task_01HR6K8J9W4X2",
"error_message": null,
"processed_at": "2026-01-02T09:49:30Z",
"current_extraction_run_id": 12844
}CurrentFact
{
"id": 318901,
"field_key": "contract_end_date",
"idx": 0,
"value_json": "2030-12-31",
"has_override": false,
"override_id": null,
"extracted_value_json": "2030-12-31",
"raw_text": "The term expires on 31 December 2030.",
"unit": null,
"currency": null,
"confidence": 0.97,
"provenance_json": {
"page": 4,
"section": "Term"
},
"created_at": "2026-01-02T09:49:30Z"
}FieldValidation
{
"id": 7812,
"field_key": "rent_start_date",
"fact_idx": 0,
"level": "warning",
"code": "date_before_start",
"message": "Rent start date is before the contract start date.",
"status": "open",
"created_at": "2026-01-02T09:49:35Z"
}FieldConfidence
{
"id": 44219,
"field_key": "base_rent",
"page_number": 8,
"confidence": 0.94,
"text_snippet": "Tenant shall pay monthly base rent of EUR 25,000.",
"created_at": "2026-01-02T09:49:35Z"
}LeaseEventReminder
{
"id": "1a0c7c8e-9d9b-42aa-8f3d-d720b974f7a1",
"lease_event": {
"id": "0f0d8c1a-1c3a-4f70-a6a8-1d2b3c4d5e6f",
"event_type": "RENEWAL_NOTICE",
"title": "Renewal notice deadline",
"calculated_date": "2030-07-04",
"status": "UPCOMING"
},
"user_id": 1042,
"offset_days": -30,
"message": "Review renewal notice requirements.",
"paused": false,
"last_triggered_at": null,
"rule_id": "ab3c1c99-fac7-4264-a9ad-4e881b2b3306",
"next_send_at": "2030-06-04T09:00:00Z",
"created_at": "2026-01-03T10:00:00Z",
"updated_at": "2026-01-03T10:00:00Z"
}LeaseEventReminderRule
{
"id": "ab3c1c99-fac7-4264-a9ad-4e881b2b3306",
"name": "Renewal notice reminders",
"event_types": [
{
"code": "RENEWAL_NOTICE",
"label": "Renewal Notice Deadline"
}
],
"offset_days": -30,
"message": "Review renewal notice requirements.",
"recipient_id": 1042,
"paused": false,
"created_by_id": 1042,
"created_at": "2026-01-03T10:00:00Z",
"updated_at": "2026-01-03T10:00:00Z"
}CustomFieldTemplate
{
"id": 77,
"uuid": "0e39294d-073e-45f5-96da-a3e937760327",
"name": "Retail lease fields",
"fields": [
{
"key": "opening_hours",
"label": "Opening hours",
"type": "string"
},
{
"key": "turnover_rent",
"label": "Turnover rent",
"type": "number"
}
],
"visibility": "ORGANIZATION",
"created_by_id": 1042,
"created_at": "2026-01-05T12:00:00Z",
"updated_at": "2026-01-05T12:00:00Z"
}OpenAPI
Machine-readable schema:
https://api.leasewizard.ai/api/v1/openapi.yaml