Table of Contents
Getting Started
Welcome to the Leaseora API documentation. Our APIs allow you to integrate Leaseora's powerful property management features into your own applications.
Prerequisites
- A Leaseora account with API access enabled
- API key and secret (available in your account dashboard)
- Basic understanding of RESTful APIs and HTTP requests
Base URL
All API requests should be made to the following base URL:
Request Format
The API accepts request data in JSON format. Always include the following headers with your requests:
Authorization: Bearer YOUR_API_KEY
Response Format
All responses are returned in JSON format with the following structure:
"success": true,
"data": { ... },
"meta": { ... }
}
For error responses:
"success": false,
"error": {
"code": "error_code",
"message": "Error message description"
}
}
Authentication
Leaseora API uses token-based authentication. You need to include your API key in the Authorization header of each request.
Obtaining API Keys
You can generate API keys from your Leaseora dashboard under Settings > API Access. Each key has specific permissions that you can configure.
Authentication Example
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Never share your API keys or include them in client-side code. Always make API requests from your server.
Token Expiration
API keys do not expire automatically but can be revoked at any time from your dashboard. We recommend rotating your keys periodically for security.
API Reference
Explore our comprehensive API endpoints organized by resource type.
Properties API
Manage properties in your Leaseora account.
Retrieve a list of properties with pagination.
Query Parameters
Parameter | Type | Description |
---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Results per page (default: 20, max: 100) |
status | string | Filter by status (active, inactive, all) |
Example Response
"success": true,
"data": [
{
"id": "prop_12345",
"name": "Sunset Apartments",
"address": {
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zip": "94103",
"country": "US"
},
"units": 24,
"status": "active",
"created_at": "2023-01-15T08:30:00Z"
},
{
"id": "prop_67890",
"name": "Mountain View Condos",
"address": {
"street": "456 Oak Ave",
"city": "Mountain View",
"state": "CA",
"zip": "94040",
"country": "US"
},
"units": 12,
"status": "active",
"created_at": "2023-02-20T14:15:00Z"
}
],
"meta": {
"current_page": 1,
"total_pages": 5,
"total_count": 98,
"limit": 20
}
}
View more Property API endpoints →
Leases API
Manage lease agreements between landlords and tenants.
Retrieve a list of leases with pagination.
Query Parameters
Parameter | Type | Description |
---|---|---|
property_id | string | Filter by property ID |
status | string | Filter by status (active, expired, terminated) |
page | integer | Page number (default: 1) |
limit | integer | Results per page (default: 20, max: 100) |
View example response and more details →
View more Lease API endpoints →
Tenants API
Manage tenant information and relationships.
View Tenant API endpoints →
Payments API
Process and manage rent payments and financial transactions.
View Payment API endpoints →
Maintenance API
Handle maintenance requests and property upkeep.
View Maintenance API endpoints →
AI Services API
Access Leaseora's AI-powered features for property management insights.
View AI Services API endpoints →
Webhooks
Leaseora provides webhooks to notify your application when events happen in your account.
Available Events
- lease.created - A new lease has been created
- lease.updated - A lease has been updated
- lease.terminated - A lease has been terminated
- payment.received - A payment has been received
- payment.failed - A payment has failed
- maintenance.requested - A maintenance request has been submitted
- maintenance.updated - A maintenance request has been updated
Setting Up Webhooks
You can configure webhooks in your Leaseora dashboard under Settings > API Access > Webhooks.
Webhook Payload Example
"event": "payment.received",
"created_at": "2023-06-01T12:00:00Z",
"data": {
"payment_id": "pay_12345",
"lease_id": "lease_67890",
"amount": 1500.00,
"currency": "USD",
"status": "completed",
"payment_method": "credit_card",
"payment_date": "2023-06-01T12:00:00Z"
}
}
Security
All webhook requests are signed with a signature in the X-Leaseora-Signature
header. You should verify this signature to ensure the request came from Leaseora.
Rate Limits
To ensure the stability of our API, we enforce rate limits on API requests.
Default Limits
Plan | Rate Limit | Burst Limit |
---|---|---|
Standard | 100 requests per minute | 150 requests |
Professional | 300 requests per minute | 450 requests |
Enterprise | 1000 requests per minute | 1500 requests |
Rate Limit Headers
Each API response includes headers that provide information about your current rate limit status:
X-RateLimit-Limit
: The maximum number of requests you're permitted to make per minute.X-RateLimit-Remaining
: The number of requests remaining in the current rate limit window.X-RateLimit-Reset
: The time at which the current rate limit window resets in UTC epoch seconds.
Exceeding Rate Limits
If you exceed your rate limit, you'll receive a 429 Too Many Requests response with a Retry-After header indicating how long to wait before making another request.
Error Handling
The Leaseora API uses conventional HTTP response codes to indicate the success or failure of an API request.
HTTP Status Codes
Code | Description |
---|---|
200 - OK | The request was successful. |
201 - Created | The resource was successfully created. |
400 - Bad Request | The request was invalid or cannot be otherwise served. |
401 - Unauthorized | Authentication credentials were missing or incorrect. |
403 - Forbidden | The authenticated user doesn't have permission to access the requested resource. |
404 - Not Found | The requested resource doesn't exist. |
422 - Unprocessable Entity | The request was well-formed but was unable to be followed due to semantic errors. |
429 - Too Many Requests | The user has sent too many requests in a given amount of time. |
500, 502, 503, 504 - Server Errors | Something went wrong on our end. |
Error Response Format
"success": false,
"error": {
"code": "validation_error",
"message": "The given data was invalid.",
"details": {
"name": [
"The name field is required."
],
"email": [
"The email must be a valid email address."
]
}
}
}
Common Error Codes
Error Code | Description |
---|---|
authentication_error | There was a problem with your API credentials. |
validation_error | The request parameters failed validation. |
resource_not_found | The requested resource does not exist. |
rate_limit_exceeded | You've exceeded your rate limit. |
permission_denied | You don't have permission to access this resource. |
server_error | An error occurred on our servers. |
SDKs & Libraries
We provide official client libraries to make integrating with the Leaseora API even easier.
JavaScript
Our JavaScript SDK works in both Node.js and browser environments.
PHP
Our PHP SDK is compatible with PHP 7.4 and above.
Community Libraries
Our community has developed libraries for additional languages:
Want to contribute a library for another language? Check out our contribution guidelines.
Frequently Asked Questions
API access is available on all paid Leaseora plans. You can generate API keys from your dashboard under Settings > API Access.
Yes, we have rate limits based on your subscription plan. See the Rate Limits section for details. If you need higher limits, please contact our sales team.
You can report bugs or request features by emailing api-support@leaseora.com or by opening an issue in our GitHub repository.
Yes, we provide a sandbox environment for testing your integration before going live. Use the base URL https://api-sandbox.leaseora.com/v1
for all sandbox requests.
All list endpoints return paginated results. You can control pagination using the page
and limit
query parameters. The response includes metadata with pagination details.