---
title: "List leads"
method: GET
path: "/api/business/{businessId}/branch/{branchId}/leads"
tags: ["Lead"]
---

# List leads

`GET /api/business/{businessId}/branch/{branchId}/leads`

Get a list of leads for the specified business id and branch id. List can be filtered by lead name, lead status, contactableByEmail flag and contactableByMobile flag with possibility to include message history for each lead

## Path parameters

- `businessId` string, required
- `branchId` string, required

## Query parameters

- `name` string
- `status` string[]
- `contactableByEmail` boolean
- `contactableByMobile` boolean
- `fetchMessageHistory` boolean

## Response `200`

Leads listed

- PagedModelLeadResponse
  - `_embedded` object
    - `leads` LeadResponse[]
      - `leadId` integer — Unique identifier for the lead
      - `businessId` string — Unique identifier for the business
      - `branchId` string — Unique identifier for the branch
      - `mobile` string — Mobile phone number of the lead
      - `email` string — Email address of the lead
      - `firstName` string — First name of the lead
      - `lastName` string — Last name of the lead
      - `contactableByEmail` boolean — Whether the lead can be contacted by email
      - `contactableByMobile` boolean — Whether the lead can be contacted by mobile
      - `status` 'NEW_LEAD' | 'CONTACT_ATTEMPTED' | 'CONTACT_MADE' | 'INTERESTED' | 'APPOINTMENT_SCHEDULED' | 'CONVERTED' | 'LOST' | 'DELETED' — Current status of the lead
      - `source` string — Source where the lead originated from
      - `lastActivityDate` string, date-time — Date and time of the last activity on this lead
      - `smsMarketingOptOut` boolean — Whether the lead has opted out of SMS marketing
      - `emailMarketingOptOut` boolean — Whether the lead has opted out of email marketing
      - `clientId` string — Client ID if the lead has been converted to a client
      - `updatedBy` string — ID of the user who last updated the lead
      - `updateAction` 'MANUAL_UPDATE' | 'APPOINTMENT_CONVERTED' | 'APPOINTMENT_CANCELLED' | 'APPOINTMENT_CANCELLED_OR_DELETED' | 'APPOINTMENT_DELETED' | 'APPOINTMENT_BOOKED' | 'CLIENT_MATCHED_BY_MOBILE' | 'CLIENT_MATCHED_BY_EMAIL' | 'EXISTING_CLIENT' | 'MARKETING_CONSENT' | 'ONE_CLICK_UNSUBSCRIBE' | 'SUBMITTED_FORM' — Action that triggered the last update to the lead
      - `adCampaignName` string — Name of the advertising campaign that generated this lead
      - `messageHistory` MessageHistory[] — History of messages sent to this lead
        - `type` string — Type of message sent
        - `sendDate` string, date-time — Date and time when the message was sent
        - `channel` string — Channel through which the message was sent
      - `note` string — Additional notes about the lead
  - `page` PageMetadata
    - `size` integer
    - `totalElements` integer
    - `totalPages` integer
    - `number` integer

## Other responses

- `400` — Bad Request
- `404` — Business with the specified id doesn't exist
- `429` — Request rate limit exceeded. Current limit set to 100 rps.
- `500` — Internal Server Error

---

[API](https://skmtc.net/phorest/apis/third-party-api.md) · [All operations](https://skmtc.net/phorest/apis/third-party-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phorest/third-party-api/revisions/2218bc90d39c/schema)
