GET
/api/public/v1/leads

List leads

Prospects a location has contact details for but no relationship with yet. Leads are kept off the customer list on purpose: a CSV drop of five thousand cold names would otherwise flood it and every count derived from it. A lead with an `accountId` has already been converted — read the customer record from then on.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.

leads:read

Query Parameters

NameTypeRequiredDescription
locationIdstringRequiredWhose leads to read.
limitnumberOptionalMaximum number of items to return (1-100).Default: 20
offsetnumberOptionalNumber of items to skip before starting to collect the result set.Default: 0
sortBystringOptionalField to sort by. Allowed values vary by endpoint.Default: createdAt
sortOrderstring
asc
desc
OptionalSort direction.Default: desc
searchstringOptionalFree-text search across the resource’s primary fields.
createdAfterstringOptionalISO 8601 timestamp — only return items created after this time.
createdBeforestringOptionalISO 8601 timestamp — only return items created before this time.
updatedAfterstringOptionalISO 8601 timestamp — only return items updated after this time.
statusstring
NEW
CONTACTED
DISQUALIFIED
OptionalNEW means nobody has reached out. CONTACTED means somebody has. DISQUALIFIED was ruled out before it was ever worth a customer record.
convertedbooleanOptional`true` for leads that already became customers, `false` for those that have not.
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/leads" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Leads retrieved successfully!",
  "content": {
    "leads": [
      {
        "id": "led_5c21",
        "locationId": "loc_abc123",
        "fullname": "Rae Nakamura",
        "email": "rae@northwind.example",
        "phoneNumber": "+15125550142",
        "companyName": "Northwind Traders",
        "title": "Operations lead",
        "website": "https://northwind.example",
        "city": "Austin",
        "state": "TX",
        "source": "Trade show",
        "notes": null,
        "status": "NEW",
        "lastContactedAt": null,
        "accountId": null,
        "createdAt": "2026-08-11T16:20:00.000Z",
        "updatedAt": "2026-08-11T16:20:00.000Z"
      }
    ],
    "pagination": {
      "total": 42,
      "limit": 20,
      "offset": 0,
      "hasMore": true
    }
  }
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

xRM → Leads
/xrm/leads