/v1/units/{unit_id}/leasesAuthentication
Bearer API key or Facily session, subject to permissions and facility scope.
Authentication and scopeRequest example
Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.
curl --request GET \
--url 'https://api.staging.facily.ai/v1/units/<UNIT_ID>/leases' \
--header "Authorization: Bearer $FACILY_API_KEY"Try a request
Staging · read-onlyExplore your organization with a read-only request to staging.
Parameters
unit_idpath · stringrequiredFormat: uuid
cursorquery · string | nulllimitquery · integerDefault: 50 · Minimum: 1 · Maximum: 200
Responses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
200Successful Response
{
"data": [
{
"id": "00000000-0000-4000-8000-000000000001",
"lease_number": "string",
"rate": "<VALUE_MATCHING_PATTERN>",
"start_date": "2026-10-29",
"status": "string",
"tenant_id": "00000000-0000-4000-8000-000000000001",
"tenant_name": "string",
"end_date": "2026-10-29",
"move_in_date": "2026-10-29",
"move_out_date": "2026-10-29",
"termination_date": "2026-10-29",
"termination_reason": "string"
}
],
"meta": {
"request_id": "string"
},
"pagination": {
"has_more": false,
"limit": 0,
"cursor": "string",
"total_count": 0
},
"metrics": {
"cards": {},
"computed_at": "2026-10-29T12:00:00Z",
"is_stale": false,
"scope": "facility"
}
}application/json
dataUnitLeaseHistoryResponse[]requiredShow data schema
end_datestring | nullBusiness date the lease ended; null while it is open.
Format: date
Show end_date schema
string | nullBusiness date the lease ended; null while it is open.
Variant 1: string
stringVariant 2: null
nullidstringrequiredUnique identifier for the lease.
Format: uuid
lease_numberstringrequiredOperator-facing lease reference, unique within the facility.
move_in_datestring | nullBusiness date the tenant took occupancy.
Format: date
Show move_in_date schema
string | nullBusiness date the tenant took occupancy.
Variant 1: string
stringVariant 2: null
nullmove_out_datestring | nullBusiness date the tenant vacated; null while occupied.
Format: date
Show move_out_date schema
string | nullBusiness date the tenant vacated; null while occupied.
Variant 1: string
stringVariant 2: null
nullratestringrequiredMonthly rent under this lease: current for an active lease, final for an ended one.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
start_datestringrequiredBusiness date the lease began.
Format: date
statusstringrequiredLifecycle state of the lease, for example active or terminated.
tenant_idstringrequiredThe tenant who rented the unit under this lease.
Format: uuid
tenant_namestringrequiredThe tenant's display name, denormalized so the history needs no second call.
termination_datestring | nullBusiness date the lease was terminated.
Format: date
Show termination_date schema
string | nullBusiness date the lease was terminated.
Variant 1: string
stringVariant 2: null
nulltermination_reasonstring | nullWhy the lease was terminated, where recorded.
Show termination_reason schema
string | nullWhy the lease was terminated, where recorded.
Variant 1: string
stringVariant 2: null
nullmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequiredmetricsEmbeddedMetrics | nullShow metrics schema
EmbeddedMetrics | nullVariant 1: EmbeddedMetrics
cardsobjectrequiredcomputed_atstring | nullrequiredFormat: date-time
Show computed_at schema
string | nullVariant 1: string
stringVariant 2: null
nullis_stalebooleanrequiredscopestringrequiredValues: "facility", "portfolio"
Variant 2: null
nullpaginationPaginationBlockrequiredPagination metadata for list responses.
Show pagination schema
cursorstring | nullShow cursor schema
string | nullVariant 1: string
stringVariant 2: null
nullhas_morebooleanrequiredlimitintegerrequiredtotal_countinteger | nullShow total_count schema
integer | nullVariant 1: integer
integerVariant 2: null
null400Validation error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired401Unauthenticated
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired403Permission denied
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired404Not found
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired409Business logic error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired503Temporary failure
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired