Skip to main content
POST

Headers

Authorization
string
required

Bearer [access_token]

Content-Type
string
required

application/json

Path Parameters

leadId
integer<int64>
required

ID of the lead to create the saved search for.

Required range: x >= 1

Body

application/json
category
enum<string>

Which emails the search sends. Required on create, cannot be changed on update.

Available options:
PROPERTY_ALERT,
MARKET_SNAPSHOT
Example:

"PROPERTY_ALERT"

name
string

Name given to the search, up to 255 characters. Required and not blank on create; on update it may be omitted but not sent blank.

Maximum string length: 255
Example:

"Cary 3BR under 600k"

alertFrequency
enum<string>

Delivery cadence: INSTANTLY, DAILY, WEEKLY, BIWEEKLY, MONTHLY, or NEVER to keep the search paused. Required on create. Setting NEVER on update works like the pause endpoint and keeps the schedule, so resume can switch it back on. A search created with NEVER had no earlier cadence: switch it on by setting alertFrequency here.

Available options:
INSTANTLY,
DAILY,
WEEKLY,
BIWEEKLY,
MONTHLY,
NEVER
Example:

"DAILY"

schedule
object

Delivery slots keyed by weekday (SUN to SAT), AM or PM, in the team owner's time zone. DAILY takes one or more days; WEEKLY, BIWEEKLY and MONTHLY take exactly one; INSTANTLY takes none. When omitted on create, Lofty picks the slots: every day for DAILY, the current day for WEEKLY, BIWEEKLY and MONTHLY. When omitted on an update that changes alertFrequency, the slots follow the new cadence: NEVER keeps them for a later resume, INSTANTLY clears them, DAILY keeps the days (Monday and Thursday morning if there were none), and WEEKLY, BIWEEKLY and MONTHLY keep the earliest day of the week (Monday morning if there were none).

Example:
criteria
object

Filters of a saved search. Shared by reads and writes; rules marked "When writing" apply to create and update only. On update, sending criteria replaces every writable filter at once.

recipientEmails
string[]

Email addresses of the lead (or the lead's family members) who receive the alerts. Each must be one of the lead's own email addresses. Defaults on create to the lead's primary email.

emailSubject
string

Subject line of the alert emails, up to 255 characters; blank uses the default subject

Maximum string length: 255
sendCopyToAgent
boolean

Whether the assigned agent gets a copy of every alert email. Defaults on create to true.

sendFirstEmailNow
boolean

Send the first alert email right away instead of waiting for the schedule. Defaults to true when creating a PROPERTY_ALERT, false otherwise; must not be true while the search is paused (NEVER).

Response

Success. A request rejected by validation or by a business rule also answers HTTP 200, with {"code": <error code>, "message": "..."} in place of the result: check code in the body, not the HTTP status. Codes are listed under Errors in the Saved Searches section.

The lead's saved searches