POST /public-api/publicapi.v1.Customer/ListProspects
Lists the prospects of every customer the API key may read, oldest change
first (updatedAt, then id). A prospect changes when a contact attempt is
made for it (a call, message or visit and its result), when it gets a new
owner or details, and when it is won.
To sync, page with cursor until nextCursor is empty, remember the largest
updatedAt you received, and later ask again with that value as
updatedAfter: you get only the prospects that changed since. Prospects that
change within the same second may come back twice; never assume one is
missed. Filter with status (open or won), customerId, ownerMemberId,
sourceId or origin. pageSize is at most 100 and defaults to 50.
Lists the prospects of the customers the API key may read, oldest change first, for polling: pass updated_after (or the previous next_cursor) to get only prospects that changed since, such as a new contact attempt, a new owner or winning. Filter by status, customer, owner, source or origin. Read-only.
RequestListProspectsRequest
ResponseListProspectsResponse
ListProspectsRequest
Field
Type
Description
page_size
int32
At most 100; defaults to 50.
cursor
string
The next_cursor of the previous page; empty for the first page.
updated_after
optional int64
Only prospects changed after this time (Unix seconds).
status
string
"open" or "won"; empty for both.
customer_id
optional string
owner_member_id
optional string
source_id
optional string
origin
string
What opened them, as PublicProspect.origin.
ListProspectsResponse
Field
Type
Description
prospects
repeated Prospect
Oldest change first (updated_at, then id).
next_cursor
string
Pass as cursor for the next page; empty on the last page. To poll for later changes, pass the largest updated_at seen as updated_after.
Related Types
Prospect
Field
Type
Description
id
string
customer_id
string
status
string
"open" until the customer buys; then the one prospect credited with the sale is "won". There is no other closing: an open prospect's state is its latest contact attempt result.
origin
string
What opened it: create_prospect, website_form, website_form_headless, form_lead_widget, website_booking, workflow_webhook or public_api; empty when unknown.
source
ProspectSource
Where it came from; unset when no source was recorded.
source_url
string
The web page a website form was on; empty when none.
owner
CustomerOwner
The member working the prospect; unset when nobody claimed it.
opt_in
ProspectOptIn
The opt-in the person answered; unset when none was asked.
opened_at
int64
Unix seconds.
won_at
optional int64
Unix seconds; set when status is "won".
transaction_id
string
The flow run that opened it; empty when none did.
contact_attempt_count
int32
Contact attempts made for this prospect: how many, and the latest.
last_contact_attempt
ContactAttemptSummary
updated_at
int64
Unix seconds of the prospect's last change: a contact attempt made for it, a new owner, its details, its data fields or winning.
custom_fields
map<string, string>
The prospect's own data fields (ListDataFields with entity_type "prospect"), keyed by data field name; only fields with a value.
ProspectSource
Field
Type
Description
id
string
name
string
archived
bool
Archived sources stay on the prospects that recorded them but cannot be chosen for new ones.
CustomerOwner
Field
Type
member_id
string
first_name
string
last_name
string
ProspectOptIn
Field
Type
Description
agreed
bool
statement
string
terms_url
string
terms_label
string
answered_at
int64
Unix seconds.
ContactAttemptSummary
Field
Type
Description
occurred_at
int64
Unix seconds.
channel
string
phone, email, whatsapp, sms or in_person.
outcome
string
The result's name; empty when the attempt has no result.
outcome_kind
string
follow_up, negative or positive; empty without a result.