/v1/facilities/{facility_id}/leads/matchesAuthentication
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/facilities/<FACILITY_ID>/leads/matches' \
--header "Authorization: Bearer $FACILY_API_KEY"Try a request
Staging · read-onlyExplore your organization with a read-only request to staging.
Parameters
facility_idpath · stringrequiredFormat: uuid
first_namequery · string | nullGiven name typed so far; matched as a prefix.
last_namequery · string | nullFamily name typed so far; matched as a prefix.
emailquery · string | nullEmail address, matched ignoring case.
phonequery · string | nullTelephone number in any format; matched on its last ten digits.
Responses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
200Successful Response
{
"data": {
"leads": [
{
"created_at": "2026-10-29T12:00:00Z",
"first_name": "string",
"id": "00000000-0000-4000-8000-000000000001",
"matched_on": [
"string"
],
"status": "string",
"email": "string",
"last_name": "string",
"phone": "string"
}
],
"tenants": [
{
"first_name": "string",
"id": "00000000-0000-4000-8000-000000000001",
"last_name": "string",
"matched_on": [
"string"
],
"status": "string",
"unit_numbers": [
"string"
],
"email": "string",
"phone": "string"
}
]
},
"meta": {
"request_id": "string"
}
}application/json
dataLeadMatchesResponserequiredShow data schema
leadsLeadMatchedResponse[]requiredOpen leads at the facility that match the details typed.
Show leads schema
created_atstringrequiredWhen the lead was created.
Format: date-time
emailstring | nullContact email address.
Show email schema
string | nullContact email address.
Variant 1: string
stringVariant 2: null
nullfirst_namestringrequiredGiven name of the prospective tenant.
idstringrequiredUnique identifier for the matching open lead.
Format: uuid
last_namestring | nullFamily name of the prospective tenant.
Show last_name schema
string | nullFamily name of the prospective tenant.
Variant 1: string
stringVariant 2: null
nullmatched_onstring[]requiredWhich of email, phone and name matched, in that order.
Show matched_on schema
stringphonestring | nullContact telephone number, as stored.
Show phone schema
string | nullContact telephone number, as stored.
Variant 1: string
stringVariant 2: null
nullstatusstringrequiredThe lead's status.
tenantsTenantMatchResponse[]requiredTenants at the facility who match the details typed.
Show tenants schema
emailstring | nullContact email address.
Show email schema
string | nullContact email address.
Variant 1: string
stringVariant 2: null
nullfirst_namestringrequiredGiven name of the tenant.
idstringrequiredUnique identifier for the matching tenant.
Format: uuid
last_namestringrequiredFamily name of the tenant.
matched_onstring[]requiredWhich of email, phone and name matched, in that order.
Show matched_on schema
stringphonestring | nullContact telephone number, as stored.
Show phone schema
string | nullContact telephone number, as stored.
Variant 1: string
stringVariant 2: null
nullstatusstringrequiredThe tenant's status.
unit_numbersstring[]requiredNumbers of the units the tenant rents under active leases.
Show unit_numbers schema
stringmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired400Validation 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