v1

latestOpenAPI 3.0.12026-07-22120163333.7 KB
Opportunity

Send Opportunity Alert

Sends an in-app notification to the agent(s) assigned to the given lead, representing a buyer/seller activity signal (e.g. viewed a listing, saved a search, requested CMA). Certain notificationType values also trigger SMS and Email delivery.

Use case: a partner system observes a user action on its own site and wants that action to surface as an opportunity in the assigned agent's Lofty inbox.

Delivery channels

ChannelTrigger
In-app pushAll notificationType values
SMS + EmailBrowse (11/48/138), Saved listing (9/52/136), Saved search (27/140), Mortgage calculator (89), Return-to-site (166)

If the lead belongs to a lead pond, the notification is broadcast to all pond members instead of the single assignee.

Important notes

  • The leadId must belong to the caller's own team.
  • Agents whose team has the OPPORTUNITY resource disabled are silently skipped.
  • This endpoint is not idempotent. Repeated calls produce repeated deliveries.
  • The data field in the response is a best-effort success hint, not a strict delivery confirmation. See the 200 response description for details.
post/v1.0/agent/send-notification

Headers

Authorizationstring required

Bearer [access_token]

Content-Typestring required

application/json

Request body

leadIdinteger required

Lead ID. Must belong to the caller's team.

descriptionstring

Free-text description shown in the notification body. description and link form a combo; both must be non-empty for the details block to render.

linkstring

Companion URL to description (see description field). Typically a listing / search / CMA URL.

messagestring

Optional free-text message. Rendered only for notificationType values that carry a leave-message context (e.g. 65); ignored by all other types.

notificationType9 | 10 | 11 | 27 | 46 | 47 | 48 | 50 | 52 | 65 | 66 | 89 | 136 | 137 | 138 | 139 | 140 | 141 | 162 | 164 | 165 | 166 | 167 | 168 required

Opportunity trigger type. Must match one of the supported activity codes.

Site-origin values: 9 = Saved a listing 10 = Searched 11 = Viewed a listing 27 = Saved a search 46 = Requested to sell a house 47 = Requested home evaluation 65 = Left a message 66 = Requested a showing 89 = Used mortgage calculator 162 = Requested CMA 164 = Requested financing options

NewHome-origin equivalents: 48 = Browsed a home 50 = Searched a home 52 = Favorited a home

CApp-origin equivalents: 136 = Favorited 137 = Searched 138 = Browsed 139 = Showing request 140 = Saved search 141 = House evaluation

Other: 165 = Re-inquired on text code 166 = Back to site (view a listing) 167 = Submitted a form 168 = Viewed CMA

Example request

{
  "leadId": 100001,
  "description": "123 Main St, San Francisco, CA 94102",
  "link": "https://example.com/listing/123",
  "message": "I'd like to schedule a tour this weekend.",
  "notificationType": 11
}

Response

Request accepted. Response body = {status:{code:0,msg:"success"}, data:<bool>}. data=true => notification(s) dispatched to at least one assignee (non-pond path). data=false => one of the silent-failure conditions: leadId=0, notificationType=null, lead not found, no agent-role assignee, or the lead is a lead-pond lead (where broadcast is still triggered but the API returns false due to a known quirk). Callers SHOULD NOT rely on data=true/false as a strict delivery confirmation.

databoolean

Rough success flag. true = notification dispatched. false = silent-failure condition (missing lead, no assignee) or pond-broadcast quirk (see endpoint description). Callers should not treat this as a strict delivery confirmation.

Example response

{
  "status": {
    "msg": "success"
  },
  "data": true
}