Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsMatch Leads
Search the full API reference Esc to close

Match Leads

Leads · REST API reference

Get support
GET/v1/facilities/{facility_id}/leads/matches
Tenants and open leads at the facility that match what was typed, best matches first.

Authentication

Bearer API key or Facily session, subject to permissions and facility scope.

Authentication and scope

Request 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
curl --request GET \
  --url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/leads/matches' \
  --header "Authorization: Bearer $FACILY_API_KEY"
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Try a request

Staging · read-only

Explore your organization with a read-only request to staging.

Kept in this tab only. Sent directly to api.staging.facily.ai.

GET

Replace the {placeholders} in the path with your resource IDs.

Response
Your response will appear here.

Parameters

facility_idpath · stringrequired

Format: uuid

first_namequery · string | null

Given name typed so far; matched as a prefix.

last_namequery · string | null

Family name typed so far; matched as a prefix.

emailquery · string | null

Email address, matched ignoring case.

phonequery · string | null

Telephone 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
JSON · generated example
{
  "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

dataLeadMatchesResponserequired
Show data schema
leadsLeadMatchedResponse[]required

Open leads at the facility that match the details typed.

Show leads schema
created_atstringrequired

When the lead was created.

Format: date-time

emailstring | null

Contact email address.

Show email schema
string | null

Contact email address.

Variant 1: string
string
Variant 2: null
null
first_namestringrequired

Given name of the prospective tenant.

idstringrequired

Unique identifier for the matching open lead.

Format: uuid

last_namestring | null

Family name of the prospective tenant.

Show last_name schema
string | null

Family name of the prospective tenant.

Variant 1: string
string
Variant 2: null
null
matched_onstring[]required

Which of email, phone and name matched, in that order.

Show matched_on schema
string
phonestring | null

Contact telephone number, as stored.

Show phone schema
string | null

Contact telephone number, as stored.

Variant 1: string
string
Variant 2: null
null
statusstringrequired

The lead's status.

tenantsTenantMatchResponse[]required

Tenants at the facility who match the details typed.

Show tenants schema
emailstring | null

Contact email address.

Show email schema
string | null

Contact email address.

Variant 1: string
string
Variant 2: null
null
first_namestringrequired

Given name of the tenant.

idstringrequired

Unique identifier for the matching tenant.

Format: uuid

last_namestringrequired

Family name of the tenant.

matched_onstring[]required

Which of email, phone and name matched, in that order.

Show matched_on schema
string
phonestring | null

Contact telephone number, as stored.

Show phone schema
string | null

Contact telephone number, as stored.

Variant 1: string
string
Variant 2: null
null
statusstringrequired

The tenant's status.

unit_numbersstring[]required

Numbers of the units the tenant rents under active leases.

Show unit_numbers schema
string
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
400Validation error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
401Unauthenticated
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
403Permission denied
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
404Not found
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
409Business logic error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
503Temporary failure
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
Continue exploringAll leads operations
Build something that works beautifully.

Facily API · Contract v1.200 · Reviewed October 29, 2026

Match Leads | Facily Developers